From c5dce8fa900538b8a9fefca86112a3b720bd241c Mon Sep 17 00:00:00 2001 From: BenWhitehead Date: Fri, 21 Jun 2019 18:16:56 -0400 Subject: [PATCH] Import firestore conformance tests from googleapis/conformance-tests@32fd66cf7dffe8431643f08b5944108ac10c8bc2 * Add new script generate-conformance-tests.sh that can reliably update the various files that make up the conformance tests. * Currently the script only updates firestore tests. * Updating of the git-submodule linking to conformance-tests is not done by the script, it is expected that the developer will do the bumping. * import proto definition * generate updated TestDefinition from definition * Add individual test files * Add maven profile `gen-conformance-protos` that can be used to generate protos in `com.google.cloud:google-cloud-conformance-tests` --- .gitmodules | 3 + .../google-cloud-conformance-tests/README.md | 52 + .../conformance-tests | 1 + .../copyright-header.txt | 15 + .../generate-conformance-tests.sh | 79 + .../firestore/v1/TestDefinition.java | 24926 ++++++++++++++++ .../conformance/firestore/v1/tests.proto | 213 + .../firestore/v1/create-all-transforms.json | 73 + .../v1/create-arrayremove-multi.json | 69 + .../v1/create-arrayremove-nested.json | 53 + .../v1/create-arrayremove-noarray-nested.json | 13 + .../v1/create-arrayremove-noarray.json | 13 + .../v1/create-arrayremove-with-st.json | 13 + .../firestore/v1/create-arrayremove.json | 53 + .../firestore/v1/create-arrayunion-multi.json | 69 + .../v1/create-arrayunion-nested.json | 53 + .../v1/create-arrayunion-noarray-nested.json | 13 + .../v1/create-arrayunion-noarray.json | 13 + .../v1/create-arrayunion-with-st.json | 13 + .../firestore/v1/create-arrayunion.json | 53 + .../firestore/v1/create-basic.json | 30 + .../firestore/v1/create-complex.json | 63 + .../v1/create-del-noarray-nested.json | 13 + .../firestore/v1/create-del-noarray.json | 13 + .../firestore/v1/create-empty.json | 25 + .../firestore/v1/create-nodel.json | 13 + .../firestore/v1/create-nosplit.json | 39 + .../firestore/v1/create-special-chars.json | 39 + .../firestore/v1/create-st-alone.json | 31 + .../firestore/v1/create-st-multi.json | 45 + .../firestore/v1/create-st-nested.json | 41 + .../v1/create-st-noarray-nested.json | 13 + .../firestore/v1/create-st-noarray.json | 13 + .../v1/create-st-with-empty-map.json | 49 + .../conformance/firestore/v1/create-st.json | 41 + .../firestore/v1/delete-exists-precond.json | 25 + .../firestore/v1/delete-no-precond.json | 19 + .../firestore/v1/delete-time-precond.json | 25 + .../conformance/firestore/v1/get-basic.json | 14 + .../firestore/v1/listen-add-mod-del-add.json | 206 + .../firestore/v1/listen-add-one.json | 72 + .../firestore/v1/listen-add-three.json | 156 + .../firestore/v1/listen-doc-remove.json | 101 + .../firestore/v1/listen-empty.json | 27 + .../firestore/v1/listen-filter-nop.json | 203 + .../firestore/v1/listen-multi-docs.json | 414 + .../firestore/v1/listen-nocurrent.json | 119 + .../firestore/v1/listen-nomod.json | 123 + .../v1/listen-removed-target-ids.json | 113 + .../firestore/v1/listen-reset.json | 309 + .../firestore/v1/listen-target-add-nop.json | 81 + .../v1/listen-target-add-wrong-id.json | 49 + .../firestore/v1/listen-target-remove.json | 45 + .../v1/query-arrayremove-cursor.json | 31 + .../firestore/v1/query-arrayremove-where.json | 25 + .../firestore/v1/query-arrayunion-cursor.json | 31 + .../firestore/v1/query-arrayunion-where.json | 25 + .../firestore/v1/query-bad-NaN.json | 25 + .../firestore/v1/query-bad-null.json | 25 + .../v1/query-cursor-docsnap-order.json | 81 + .../v1/query-cursor-docsnap-orderby-name.json | 91 + .../v1/query-cursor-docsnap-where-eq.json | 65 + ...uery-cursor-docsnap-where-neq-orderby.json | 85 + .../v1/query-cursor-docsnap-where-neq.json | 75 + .../firestore/v1/query-cursor-docsnap.json | 44 + .../v1/query-cursor-endbefore-empty-map.json | 55 + .../v1/query-cursor-endbefore-empty.json | 27 + .../firestore/v1/query-cursor-no-order.json | 21 + .../v1/query-cursor-startat-empty-map.json | 55 + .../v1/query-cursor-startat-empty.json | 27 + .../firestore/v1/query-cursor-vals-1a.json | 68 + .../firestore/v1/query-cursor-vals-1b.json | 66 + .../firestore/v1/query-cursor-vals-2.json | 91 + .../firestore/v1/query-cursor-vals-docid.json | 67 + .../v1/query-cursor-vals-last-wins.json | 82 + .../firestore/v1/query-del-cursor.json | 31 + .../firestore/v1/query-del-where.json | 25 + .../firestore/v1/query-invalid-operator.json | 25 + .../v1/query-invalid-path-order.json | 25 + .../v1/query-invalid-path-select.json | 26 + .../v1/query-invalid-path-where.json | 26 + .../v1/query-offset-limit-last-wins.json | 34 + .../firestore/v1/query-offset-limit.json | 28 + .../conformance/firestore/v1/query-order.json | 54 + .../firestore/v1/query-select-empty.json | 32 + .../firestore/v1/query-select-last-wins.json | 54 + .../firestore/v1/query-select.json | 46 + .../firestore/v1/query-st-cursor.json | 31 + .../firestore/v1/query-st-where.json | 25 + .../firestore/v1/query-where-2.json | 71 + .../firestore/v1/query-where-NaN.json | 39 + .../firestore/v1/query-where-null.json | 39 + .../conformance/firestore/v1/query-where.json | 42 + .../firestore/v1/query-wrong-collection.json | 22 + .../firestore/v1/set-all-transforms.json | 70 + .../firestore/v1/set-arrayremove-multi.json | 66 + .../firestore/v1/set-arrayremove-nested.json | 50 + .../v1/set-arrayremove-noarray-nested.json | 13 + .../firestore/v1/set-arrayremove-noarray.json | 13 + .../firestore/v1/set-arrayremove-with-st.json | 13 + .../firestore/v1/set-arrayremove.json | 50 + .../firestore/v1/set-arrayunion-multi.json | 66 + .../firestore/v1/set-arrayunion-nested.json | 50 + .../v1/set-arrayunion-noarray-nested.json | 13 + .../firestore/v1/set-arrayunion-noarray.json | 13 + .../firestore/v1/set-arrayunion-with-st.json | 13 + .../firestore/v1/set-arrayunion.json | 50 + .../conformance/firestore/v1/set-basic.json | 27 + .../conformance/firestore/v1/set-complex.json | 60 + .../firestore/v1/set-del-merge-alone.json | 37 + .../firestore/v1/set-del-merge.json | 48 + .../firestore/v1/set-del-mergeall.json | 36 + .../firestore/v1/set-del-noarray-nested.json | 13 + .../firestore/v1/set-del-noarray.json | 13 + .../firestore/v1/set-del-nomerge.json | 22 + .../firestore/v1/set-del-nonleaf.json | 22 + .../firestore/v1/set-del-wo-merge.json | 13 + .../conformance/firestore/v1/set-empty.json | 22 + .../firestore/v1/set-merge-fp.json | 48 + .../firestore/v1/set-merge-nested.json | 48 + .../firestore/v1/set-merge-nonleaf.json | 50 + .../firestore/v1/set-merge-prefix.json | 28 + .../firestore/v1/set-merge-present.json | 27 + .../conformance/firestore/v1/set-merge.json | 41 + .../firestore/v1/set-mergeall-empty.json | 29 + .../firestore/v1/set-mergeall-nested.json | 45 + .../firestore/v1/set-mergeall.json | 39 + .../conformance/firestore/v1/set-nodel.json | 13 + .../conformance/firestore/v1/set-nosplit.json | 36 + .../firestore/v1/set-special-chars.json | 36 + .../firestore/v1/set-st-alone-mergeall.json | 31 + .../firestore/v1/set-st-alone.json | 34 + .../firestore/v1/set-st-merge-both.json | 57 + .../v1/set-st-merge-nonleaf-alone.json | 47 + .../firestore/v1/set-st-merge-nonleaf.json | 58 + .../firestore/v1/set-st-merge-nowrite.json | 37 + .../firestore/v1/set-st-mergeall.json | 46 + .../firestore/v1/set-st-multi.json | 42 + .../firestore/v1/set-st-nested.json | 38 + .../firestore/v1/set-st-noarray-nested.json | 13 + .../firestore/v1/set-st-noarray.json | 13 + .../firestore/v1/set-st-nomerge.json | 41 + .../firestore/v1/set-st-with-empty-map.json | 46 + .../conformance/firestore/v1/set-st.json | 38 + .../firestore/v1/update-all-transforms.json | 78 + .../v1/update-arrayremove-alone.json | 43 + .../v1/update-arrayremove-multi.json | 75 + .../v1/update-arrayremove-nested.json | 59 + .../v1/update-arrayremove-noarray-nested.json | 13 + .../v1/update-arrayremove-noarray.json | 13 + .../v1/update-arrayremove-with-st.json | 13 + .../firestore/v1/update-arrayremove.json | 58 + .../firestore/v1/update-arrayunion-alone.json | 43 + .../firestore/v1/update-arrayunion-multi.json | 75 + .../v1/update-arrayunion-nested.json | 59 + .../v1/update-arrayunion-noarray-nested.json | 13 + .../v1/update-arrayunion-noarray.json | 13 + .../v1/update-arrayunion-with-st.json | 13 + .../firestore/v1/update-arrayunion.json | 58 + .../firestore/v1/update-badchar.json | 13 + .../firestore/v1/update-basic.json | 35 + .../firestore/v1/update-complex.json | 69 + .../firestore/v1/update-del-alone.json | 30 + .../firestore/v1/update-del-dot.json | 46 + .../firestore/v1/update-del-nested.json | 13 + .../v1/update-del-noarray-nested.json | 13 + .../firestore/v1/update-del-noarray.json | 13 + .../conformance/firestore/v1/update-del.json | 36 + .../firestore/v1/update-exists-precond.json | 16 + .../v1/update-fp-empty-component.json | 13 + ...ate-nested-transform-and-nested-value.json | 52 + .../firestore/v1/update-no-paths.json | 13 + .../v1/update-paths-all-transforms.json | 105 + .../v1/update-paths-arrayremove-alone.json | 52 + .../v1/update-paths-arrayremove-multi.json | 96 + .../v1/update-paths-arrayremove-nested.json | 74 + ...date-paths-arrayremove-noarray-nested.json | 22 + .../v1/update-paths-arrayremove-noarray.json | 22 + .../v1/update-paths-arrayremove-with-st.json | 22 + .../v1/update-paths-arrayremove.json | 73 + .../v1/update-paths-arrayunion-alone.json | 52 + .../v1/update-paths-arrayunion-multi.json | 96 + .../v1/update-paths-arrayunion-nested.json | 74 + ...pdate-paths-arrayunion-noarray-nested.json | 22 + .../v1/update-paths-arrayunion-noarray.json | 22 + .../v1/update-paths-arrayunion-with-st.json | 22 + .../firestore/v1/update-paths-arrayunion.json | 73 + .../firestore/v1/update-paths-basic.json | 44 + .../firestore/v1/update-paths-complex.json | 84 + .../firestore/v1/update-paths-del-alone.json | 39 + .../firestore/v1/update-paths-del-nested.json | 22 + .../v1/update-paths-del-noarray-nested.json | 22 + .../v1/update-paths-del-noarray.json | 22 + .../firestore/v1/update-paths-del.json | 51 + .../v1/update-paths-exists-precond.json | 25 + .../firestore/v1/update-paths-fp-del.json | 59 + .../v1/update-paths-fp-dup-transforms.json | 34 + .../firestore/v1/update-paths-fp-dup.json | 34 + .../v1/update-paths-fp-empty-component.json | 23 + .../firestore/v1/update-paths-fp-empty.json | 20 + .../firestore/v1/update-paths-fp-multi.json | 51 + .../firestore/v1/update-paths-fp-nosplit.json | 57 + ...ths-nested-transform-and-nested-value.json | 69 + .../firestore/v1/update-paths-no-paths.json | 12 + .../firestore/v1/update-paths-prefix-1.json | 29 + .../firestore/v1/update-paths-prefix-2.json | 29 + .../firestore/v1/update-paths-prefix-3.json | 29 + .../v1/update-paths-special-chars.json | 62 + .../firestore/v1/update-paths-st-alone.json | 40 + .../firestore/v1/update-paths-st-multi.json | 72 + .../firestore/v1/update-paths-st-nested.json | 62 + .../v1/update-paths-st-noarray-nested.json | 22 + .../firestore/v1/update-paths-st-noarray.json | 22 + .../v1/update-paths-st-with-empty-map.json | 63 + .../firestore/v1/update-paths-st.json | 61 + .../firestore/v1/update-paths-uptime.json | 47 + .../firestore/v1/update-prefix-1.json | 13 + .../firestore/v1/update-prefix-2.json | 13 + .../firestore/v1/update-prefix-3.json | 13 + .../firestore/v1/update-quoting.json | 47 + .../firestore/v1/update-split-top-level.json | 47 + .../firestore/v1/update-split.json | 47 + .../firestore/v1/update-st-alone.json | 31 + .../firestore/v1/update-st-dot.json | 31 + .../firestore/v1/update-st-multi.json | 51 + .../firestore/v1/update-st-nested.json | 47 + .../v1/update-st-noarray-nested.json | 13 + .../firestore/v1/update-st-noarray.json | 13 + .../v1/update-st-with-empty-map.json | 54 + .../conformance/firestore/v1/update-st.json | 46 + .../firestore/v1/update-uptime.json | 38 + 231 files changed, 35495 insertions(+) create mode 100644 .gitmodules create mode 100644 google-cloud-testing/google-cloud-conformance-tests/README.md create mode 160000 google-cloud-testing/google-cloud-conformance-tests/conformance-tests create mode 100644 google-cloud-testing/google-cloud-conformance-tests/copyright-header.txt create mode 100755 google-cloud-testing/google-cloud-conformance-tests/generate-conformance-tests.sh create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/java/com/google/cloud/conformance/firestore/v1/TestDefinition.java create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/proto/google/cloud/conformance/firestore/v1/tests.proto create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-all-transforms.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-multi.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-with-st.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-multi.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-with-st.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-basic.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-complex.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-del-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-del-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-empty.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-nodel.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-nosplit.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-special-chars.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-alone.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-multi.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-with-empty-map.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/delete-exists-precond.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/delete-no-precond.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/delete-time-precond.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/get-basic.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-add-mod-del-add.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-add-one.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-add-three.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-doc-remove.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-empty.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-filter-nop.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-multi-docs.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-nocurrent.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-nomod.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-removed-target-ids.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-reset.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-target-add-nop.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-target-add-wrong-id.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-target-remove.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayremove-cursor.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayremove-where.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayunion-cursor.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayunion-where.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-bad-NaN.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-bad-null.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-order.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-orderby-name.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-where-eq.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-where-neq-orderby.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-where-neq.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-endbefore-empty-map.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-endbefore-empty.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-no-order.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-startat-empty-map.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-startat-empty.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-1a.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-1b.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-2.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-docid.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-last-wins.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-del-cursor.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-del-where.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-operator.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-path-order.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-path-select.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-path-where.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-offset-limit-last-wins.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-offset-limit.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-order.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-select-empty.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-select-last-wins.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-select.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-st-cursor.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-st-where.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where-2.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where-NaN.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where-null.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-wrong-collection.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-all-transforms.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-multi.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-with-st.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-multi.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-with-st.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-basic.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-complex.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-merge-alone.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-merge.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-mergeall.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-nomerge.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-nonleaf.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-wo-merge.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-empty.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-fp.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-nonleaf.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-prefix.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-present.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-mergeall-empty.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-mergeall-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-mergeall.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-nodel.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-nosplit.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-special-chars.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-alone-mergeall.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-alone.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-both.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-nonleaf-alone.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-nonleaf.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-nowrite.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-mergeall.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-multi.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-nomerge.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-with-empty-map.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-all-transforms.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-alone.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-multi.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-with-st.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-alone.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-multi.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-with-st.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-badchar.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-basic.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-complex.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-alone.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-dot.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-exists-precond.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-fp-empty-component.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-nested-transform-and-nested-value.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-no-paths.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-all-transforms.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-alone.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-multi.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-with-st.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-alone.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-multi.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-with-st.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-basic.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-complex.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-alone.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-exists-precond.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-del.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-dup-transforms.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-dup.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-empty-component.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-empty.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-multi.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-nosplit.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-nested-transform-and-nested-value.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-no-paths.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-prefix-1.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-prefix-2.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-prefix-3.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-special-chars.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-alone.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-multi.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-with-empty-map.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-uptime.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-prefix-1.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-prefix-2.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-prefix-3.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-quoting.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-split-top-level.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-split.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-alone.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-dot.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-multi.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-noarray-nested.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-noarray.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-with-empty-map.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st.json create mode 100644 google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-uptime.json diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000000..82e2f3350028 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "google-cloud-testing/google-cloud-conformance-tests/conformance-tests"] + path = google-cloud-testing/google-cloud-conformance-tests/conformance-tests + url = git@github.com:googleapis/conformance-tests.git diff --git a/google-cloud-testing/google-cloud-conformance-tests/README.md b/google-cloud-testing/google-cloud-conformance-tests/README.md new file mode 100644 index 000000000000..d16ea04e7672 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/README.md @@ -0,0 +1,52 @@ +# Google cloud conformance tests +This maven module is intended to function as a central location for integration with +[googleapis/conformance-tests](https://github.com/googleapis/conformance-tests). + +In this directory `conformance-tests` which is a git-submodule, containing the reference for which +the various conformance test resources are updated to. + +## Updating conformance-tests + +#### Prerequisites + +Part of the process of updating the conformance tests involves running maven a maven build for +this module. Ensure that all parent modules have been installed locally so the build can run. +```bash +pushd cd ../../ +mvn -Dmaven.test.skip.exec=true install +popd +``` + +#### Performing the update + +To update the conformance tests run the following commands from this module directory: +```bash +pushd conformance-tests +git pull +popd +./generate-conformance-tests.sh +git add . +``` + +If an error is encountered while generating the new resources please check the `generate.log` +written to the working directory. + + +## Test Suites + +### Firestore + +The conformance test suites for Firestore are located in the `com.google.cloud.conformance.firestore` +package. + +#### Files + +There are a number of files that together define the format of the tests as well as the tests +themselves. + +* `src/main/java/com/google/cloud/conformance/firestore/v1/TestDefinition.java` + * The generated protobuf objects used to read the tests definitions +* `src/main/proto/google/cloud/conformance/firestore/v1/tests.proto` + * The proto definition for the tests. `TestDefinition.java` is generated from this definition. +* `src/main/resources/com/google/cloud/conformance/firestore/v1/*.json` + * Each files is a json serialized `TestFile` definition (defined in tests.proto). diff --git a/google-cloud-testing/google-cloud-conformance-tests/conformance-tests b/google-cloud-testing/google-cloud-conformance-tests/conformance-tests new file mode 160000 index 000000000000..32fd66cf7dff --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/conformance-tests @@ -0,0 +1 @@ +Subproject commit 32fd66cf7dffe8431643f08b5944108ac10c8bc2 diff --git a/google-cloud-testing/google-cloud-conformance-tests/copyright-header.txt b/google-cloud-testing/google-cloud-conformance-tests/copyright-header.txt new file mode 100644 index 000000000000..1761adb96e2d --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/copyright-header.txt @@ -0,0 +1,15 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ diff --git a/google-cloud-testing/google-cloud-conformance-tests/generate-conformance-tests.sh b/google-cloud-testing/google-cloud-conformance-tests/generate-conformance-tests.sh new file mode 100755 index 000000000000..191b06476bde --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/generate-conformance-tests.sh @@ -0,0 +1,79 @@ +#!/bin/bash +# Copyright 2019 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -o errexit -o errtrace -o nounset -o pipefail + +function errNotify() { + echo "Error while generating conformance tests" >&2; + echo "See generate.log for details" >&2; + return 1 +} +trap errNotify ERR + +function generateFirestore() { + rm generate.log 2> /dev/null || true + + local javaPackage="com/google/cloud/conformance/firestore/v1" + + msg "Cleaning existing generated protos" + rm -rf src/main/java/${javaPackage}/* + msg "Cleaning existing test definitions" + rm -rf src/main/resources/${javaPackage}/* + msg "Cleaning existing proto files" + rm -rf src/main/proto/google/cloud/conformance/firestore/v1/* + + msg "Copying new proto files" + cp -R -t src/main/proto/ conformance-tests/firestore/v1/proto/* + msg "Copying new test definitions" + cp -R -t "src/main/resources/${javaPackage}/" conformance-tests/firestore/v1/*.json + + msg "Generating protos" + mvn -Pgen-conformance-protos clean verify > generate.log 2>&1 + + msg "Adding copyright header to generated sources" + ## java classes generated from protoc do not include the copyright header + ## prepend it to the generated files + local moduleDir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" + pushd target/generated-sources/protobuf/java/${javaPackage} + for f in $(find ./ -type f -name '*.java'); do + echo "Processing $f" + mv ${f} ${f}.tmp + cat ${moduleDir}/copyright-header.txt > ${f} + cat ${f}.tmp >> ${f} + rm ${f}.tmp + done + popd + + ## move generated proto class(es) into the main src root + cp -R -t src/main/java/${javaPackage} target/generated-sources/protobuf/java/${javaPackage}/* + + ## cleanup any generated files that may have not been moved over + mvn clean > /dev/null 2>&1 + + msg "Building module" + ## ensure building of the module still works + mvn clean package + +} + +function main() { + generateFirestore +} + +function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} +function msg { println "$*" >&2 ;} +function println { printf '%s\n' "$(now) $*" ;} + +main diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/java/com/google/cloud/conformance/firestore/v1/TestDefinition.java b/google-cloud-testing/google-cloud-conformance-tests/src/main/java/com/google/cloud/conformance/firestore/v1/TestDefinition.java new file mode 100644 index 000000000000..b7a5dd79e641 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/java/com/google/cloud/conformance/firestore/v1/TestDefinition.java @@ -0,0 +1,24926 @@ +/* + * Copyright 2019 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/conformance/firestore/v1/tests.proto + +package com.google.cloud.conformance.firestore.v1; + +public final class TestDefinition { + private TestDefinition() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + public interface TestFileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.TestFile) + com.google.protobuf.MessageOrBuilder { + + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + java.util.List getTestsList(); + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.Test getTests(int index); + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + int getTestsCount(); + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + java.util.List + getTestsOrBuilderList(); + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.TestOrBuilder getTestsOrBuilder( + int index); + } + /** + * + * + *
+   * A collection of tests.
+   * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.TestFile} + */ + public static final class TestFile extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.TestFile) + TestFileOrBuilder { + private static final long serialVersionUID = 0L; + // Use TestFile.newBuilder() to construct. + private TestFile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TestFile() { + tests_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TestFile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + tests_ = + new java.util.ArrayList< + com.google.cloud.conformance.firestore.v1.TestDefinition.Test>(); + mutable_bitField0_ |= 0x00000001; + } + tests_.add( + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.Test.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + tests_ = java.util.Collections.unmodifiableList(tests_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_TestFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_TestFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile.Builder.class); + } + + public static final int TESTS_FIELD_NUMBER = 1; + private java.util.List tests_; + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public java.util.List + getTestsList() { + return tests_; + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.TestOrBuilder> + getTestsOrBuilderList() { + return tests_; + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public int getTestsCount() { + return tests_.size(); + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Test getTests(int index) { + return tests_.get(index); + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.TestOrBuilder getTestsOrBuilder( + int index) { + return tests_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < tests_.size(); i++) { + output.writeMessage(1, tests_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < tests_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, tests_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile) obj; + + if (!getTestsList().equals(other.getTestsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getTestsCount() > 0) { + hash = (37 * hash) + TESTS_FIELD_NUMBER; + hash = (53 * hash) + getTestsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A collection of tests.
+     * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.TestFile} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.TestFile) + com.google.cloud.conformance.firestore.v1.TestDefinition.TestFileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_TestFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_TestFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTestsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (testsBuilder_ == null) { + tests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + testsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_TestFile_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile(this); + int from_bitField0_ = bitField0_; + if (testsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + tests_ = java.util.Collections.unmodifiableList(tests_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.tests_ = tests_; + } else { + result.tests_ = testsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile + .getDefaultInstance()) return this; + if (testsBuilder_ == null) { + if (!other.tests_.isEmpty()) { + if (tests_.isEmpty()) { + tests_ = other.tests_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTestsIsMutable(); + tests_.addAll(other.tests_); + } + onChanged(); + } + } else { + if (!other.tests_.isEmpty()) { + if (testsBuilder_.isEmpty()) { + testsBuilder_.dispose(); + testsBuilder_ = null; + tests_ = other.tests_; + bitField0_ = (bitField0_ & ~0x00000001); + testsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTestsFieldBuilder() + : null; + } else { + testsBuilder_.addAllMessages(other.tests_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List tests_ = + java.util.Collections.emptyList(); + + private void ensureTestsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + tests_ = + new java.util.ArrayList< + com.google.cloud.conformance.firestore.v1.TestDefinition.Test>(tests_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Test, + com.google.cloud.conformance.firestore.v1.TestDefinition.Test.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.TestOrBuilder> + testsBuilder_; + + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public java.util.List + getTestsList() { + if (testsBuilder_ == null) { + return java.util.Collections.unmodifiableList(tests_); + } else { + return testsBuilder_.getMessageList(); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public int getTestsCount() { + if (testsBuilder_ == null) { + return tests_.size(); + } else { + return testsBuilder_.getCount(); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Test getTests(int index) { + if (testsBuilder_ == null) { + return tests_.get(index); + } else { + return testsBuilder_.getMessage(index); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public Builder setTests( + int index, com.google.cloud.conformance.firestore.v1.TestDefinition.Test value) { + if (testsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestsIsMutable(); + tests_.set(index, value); + onChanged(); + } else { + testsBuilder_.setMessage(index, value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public Builder setTests( + int index, + com.google.cloud.conformance.firestore.v1.TestDefinition.Test.Builder builderForValue) { + if (testsBuilder_ == null) { + ensureTestsIsMutable(); + tests_.set(index, builderForValue.build()); + onChanged(); + } else { + testsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public Builder addTests(com.google.cloud.conformance.firestore.v1.TestDefinition.Test value) { + if (testsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestsIsMutable(); + tests_.add(value); + onChanged(); + } else { + testsBuilder_.addMessage(value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public Builder addTests( + int index, com.google.cloud.conformance.firestore.v1.TestDefinition.Test value) { + if (testsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTestsIsMutable(); + tests_.add(index, value); + onChanged(); + } else { + testsBuilder_.addMessage(index, value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public Builder addTests( + com.google.cloud.conformance.firestore.v1.TestDefinition.Test.Builder builderForValue) { + if (testsBuilder_ == null) { + ensureTestsIsMutable(); + tests_.add(builderForValue.build()); + onChanged(); + } else { + testsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public Builder addTests( + int index, + com.google.cloud.conformance.firestore.v1.TestDefinition.Test.Builder builderForValue) { + if (testsBuilder_ == null) { + ensureTestsIsMutable(); + tests_.add(index, builderForValue.build()); + onChanged(); + } else { + testsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public Builder addAllTests( + java.lang.Iterable< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.Test> + values) { + if (testsBuilder_ == null) { + ensureTestsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, tests_); + onChanged(); + } else { + testsBuilder_.addAllMessages(values); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public Builder clearTests() { + if (testsBuilder_ == null) { + tests_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + testsBuilder_.clear(); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public Builder removeTests(int index) { + if (testsBuilder_ == null) { + ensureTestsIsMutable(); + tests_.remove(index); + onChanged(); + } else { + testsBuilder_.remove(index); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Test.Builder getTestsBuilder( + int index) { + return getTestsFieldBuilder().getBuilder(index); + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.TestOrBuilder + getTestsOrBuilder(int index) { + if (testsBuilder_ == null) { + return tests_.get(index); + } else { + return testsBuilder_.getMessageOrBuilder(index); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.TestOrBuilder> + getTestsOrBuilderList() { + if (testsBuilder_ != null) { + return testsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(tests_); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Test.Builder + addTestsBuilder() { + return getTestsFieldBuilder() + .addBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.Test.getDefaultInstance()); + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Test.Builder addTestsBuilder( + int index) { + return getTestsFieldBuilder() + .addBuilder( + index, + com.google.cloud.conformance.firestore.v1.TestDefinition.Test.getDefaultInstance()); + } + /** repeated .google.cloud.conformance.firestore.v1.Test tests = 1; */ + public java.util.List + getTestsBuilderList() { + return getTestsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Test, + com.google.cloud.conformance.firestore.v1.TestDefinition.Test.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.TestOrBuilder> + getTestsFieldBuilder() { + if (testsBuilder_ == null) { + testsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Test, + com.google.cloud.conformance.firestore.v1.TestDefinition.Test.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.TestOrBuilder>( + tests_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + tests_ = null; + } + return testsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.TestFile) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.TestFile) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TestFile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TestFile(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.TestFile + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface TestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.Test) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * short description of the test
+     * 
+ * + * string description = 1; + */ + java.lang.String getDescription(); + /** + * + * + *
+     * short description of the test
+     * 
+ * + * string description = 1; + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * a comment describing the behavior being tested
+     * 
+ * + * string comment = 10; + */ + java.lang.String getComment(); + /** + * + * + *
+     * a comment describing the behavior being tested
+     * 
+ * + * string comment = 10; + */ + com.google.protobuf.ByteString getCommentBytes(); + + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + boolean hasGet(); + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest getGet(); + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTestOrBuilder getGetOrBuilder(); + + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + boolean hasCreate(); + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest getCreate(); + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTestOrBuilder + getCreateOrBuilder(); + + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + boolean hasSet(); + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest getSet(); + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTestOrBuilder getSetOrBuilder(); + + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + boolean hasUpdate(); + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest getUpdate(); + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTestOrBuilder + getUpdateOrBuilder(); + + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + boolean hasUpdatePaths(); + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest getUpdatePaths(); + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTestOrBuilder + getUpdatePathsOrBuilder(); + + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + boolean hasDelete(); + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest getDelete(); + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTestOrBuilder + getDeleteOrBuilder(); + + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + boolean hasQuery(); + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest getQuery(); + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTestOrBuilder getQueryOrBuilder(); + + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + boolean hasListen(); + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest getListen(); + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTestOrBuilder + getListenOrBuilder(); + + public com.google.cloud.conformance.firestore.v1.TestDefinition.Test.TestCase getTestCase(); + } + /** + * + * + *
+   * A Test describes a single client method call and its expected result.
+   * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.Test} + */ + public static final class Test extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.Test) + TestOrBuilder { + private static final long serialVersionUID = 0L; + // Use Test.newBuilder() to construct. + private Test(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Test() { + description_ = ""; + comment_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Test( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 18: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.Builder + subBuilder = null; + if (testCase_ == 2) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest) test_) + .toBuilder(); + } + test_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest) test_); + test_ = subBuilder.buildPartial(); + } + testCase_ = 2; + break; + } + case 26: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest.Builder + subBuilder = null; + if (testCase_ == 3) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest) test_) + .toBuilder(); + } + test_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest) test_); + test_ = subBuilder.buildPartial(); + } + testCase_ = 3; + break; + } + case 34: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.Builder + subBuilder = null; + if (testCase_ == 4) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest) test_) + .toBuilder(); + } + test_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest) test_); + test_ = subBuilder.buildPartial(); + } + testCase_ = 4; + break; + } + case 42: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest.Builder + subBuilder = null; + if (testCase_ == 5) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest) test_) + .toBuilder(); + } + test_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest) test_); + test_ = subBuilder.buildPartial(); + } + testCase_ = 5; + break; + } + case 50: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest.Builder + subBuilder = null; + if (testCase_ == 6) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest) + test_) + .toBuilder(); + } + test_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest) + test_); + test_ = subBuilder.buildPartial(); + } + testCase_ = 6; + break; + } + case 58: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest.Builder + subBuilder = null; + if (testCase_ == 7) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest) test_) + .toBuilder(); + } + test_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest) test_); + test_ = subBuilder.buildPartial(); + } + testCase_ = 7; + break; + } + case 66: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest.Builder + subBuilder = null; + if (testCase_ == 8) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest) test_) + .toBuilder(); + } + test_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest) test_); + test_ = subBuilder.buildPartial(); + } + testCase_ = 8; + break; + } + case 74: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest.Builder + subBuilder = null; + if (testCase_ == 9) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest) test_) + .toBuilder(); + } + test_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest) test_); + test_ = subBuilder.buildPartial(); + } + testCase_ = 9; + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + comment_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Test_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Test_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.Test.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.Test.Builder.class); + } + + private int testCase_ = 0; + private java.lang.Object test_; + + public enum TestCase implements com.google.protobuf.Internal.EnumLite { + GET(2), + CREATE(3), + SET(4), + UPDATE(5), + UPDATE_PATHS(6), + DELETE(7), + QUERY(8), + LISTEN(9), + TEST_NOT_SET(0); + private final int value; + + private TestCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static TestCase valueOf(int value) { + return forNumber(value); + } + + public static TestCase forNumber(int value) { + switch (value) { + case 2: + return GET; + case 3: + return CREATE; + case 4: + return SET; + case 5: + return UPDATE; + case 6: + return UPDATE_PATHS; + case 7: + return DELETE; + case 8: + return QUERY; + case 9: + return LISTEN; + case 0: + return TEST_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TestCase getTestCase() { + return TestCase.forNumber(testCase_); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 1; + private volatile java.lang.Object description_; + /** + * + * + *
+     * short description of the test
+     * 
+ * + * string description = 1; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } + } + /** + * + * + *
+     * short description of the test
+     * 
+ * + * string description = 1; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMENT_FIELD_NUMBER = 10; + private volatile java.lang.Object comment_; + /** + * + * + *
+     * a comment describing the behavior being tested
+     * 
+ * + * string comment = 10; + */ + public java.lang.String getComment() { + java.lang.Object ref = comment_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + comment_ = s; + return s; + } + } + /** + * + * + *
+     * a comment describing the behavior being tested
+     * 
+ * + * string comment = 10; + */ + public com.google.protobuf.ByteString getCommentBytes() { + java.lang.Object ref = comment_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + comment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GET_FIELD_NUMBER = 2; + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + public boolean hasGet() { + return testCase_ == 2; + } + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest getGet() { + if (testCase_ == 2) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.GetTestOrBuilder + getGetOrBuilder() { + if (testCase_ == 2) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.getDefaultInstance(); + } + + public static final int CREATE_FIELD_NUMBER = 3; + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + public boolean hasCreate() { + return testCase_ == 3; + } + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest getCreate() { + if (testCase_ == 3) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + .getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTestOrBuilder + getCreateOrBuilder() { + if (testCase_ == 3) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + .getDefaultInstance(); + } + + public static final int SET_FIELD_NUMBER = 4; + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + public boolean hasSet() { + return testCase_ == 4; + } + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest getSet() { + if (testCase_ == 4) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetTestOrBuilder + getSetOrBuilder() { + if (testCase_ == 4) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.getDefaultInstance(); + } + + public static final int UPDATE_FIELD_NUMBER = 5; + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + public boolean hasUpdate() { + return testCase_ == 5; + } + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest getUpdate() { + if (testCase_ == 5) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + .getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTestOrBuilder + getUpdateOrBuilder() { + if (testCase_ == 5) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + .getDefaultInstance(); + } + + public static final int UPDATE_PATHS_FIELD_NUMBER = 6; + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + public boolean hasUpdatePaths() { + return testCase_ == 6; + } + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + getUpdatePaths() { + if (testCase_ == 6) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + .getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTestOrBuilder + getUpdatePathsOrBuilder() { + if (testCase_ == 6) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + .getDefaultInstance(); + } + + public static final int DELETE_FIELD_NUMBER = 7; + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + public boolean hasDelete() { + return testCase_ == 7; + } + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest getDelete() { + if (testCase_ == 7) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + .getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTestOrBuilder + getDeleteOrBuilder() { + if (testCase_ == 7) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + .getDefaultInstance(); + } + + public static final int QUERY_FIELD_NUMBER = 8; + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + public boolean hasQuery() { + return testCase_ == 8; + } + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest getQuery() { + if (testCase_ == 8) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + .getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTestOrBuilder + getQueryOrBuilder() { + if (testCase_ == 8) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + .getDefaultInstance(); + } + + public static final int LISTEN_FIELD_NUMBER = 9; + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + public boolean hasListen() { + return testCase_ == 9; + } + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest getListen() { + if (testCase_ == 9) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + .getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTestOrBuilder + getListenOrBuilder() { + if (testCase_ == 9) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + .getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, description_); + } + if (testCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest) test_); + } + if (testCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest) test_); + } + if (testCase_ == 4) { + output.writeMessage( + 4, (com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest) test_); + } + if (testCase_ == 5) { + output.writeMessage( + 5, (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest) test_); + } + if (testCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest) test_); + } + if (testCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest) test_); + } + if (testCase_ == 8) { + output.writeMessage( + 8, (com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest) test_); + } + if (testCase_ == 9) { + output.writeMessage( + 9, (com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest) test_); + } + if (!getCommentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, comment_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, description_); + } + if (testCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest) test_); + } + if (testCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest) test_); + } + if (testCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest) test_); + } + if (testCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest) test_); + } + if (testCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, + (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest) test_); + } + if (testCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest) test_); + } + if (testCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest) test_); + } + if (testCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest) test_); + } + if (!getCommentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, comment_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.Test)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.Test other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.Test) obj; + + if (!getDescription().equals(other.getDescription())) return false; + if (!getComment().equals(other.getComment())) return false; + if (!getTestCase().equals(other.getTestCase())) return false; + switch (testCase_) { + case 2: + if (!getGet().equals(other.getGet())) return false; + break; + case 3: + if (!getCreate().equals(other.getCreate())) return false; + break; + case 4: + if (!getSet().equals(other.getSet())) return false; + break; + case 5: + if (!getUpdate().equals(other.getUpdate())) return false; + break; + case 6: + if (!getUpdatePaths().equals(other.getUpdatePaths())) return false; + break; + case 7: + if (!getDelete().equals(other.getDelete())) return false; + break; + case 8: + if (!getQuery().equals(other.getQuery())) return false; + break; + case 9: + if (!getListen().equals(other.getListen())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + COMMENT_FIELD_NUMBER; + hash = (53 * hash) + getComment().hashCode(); + switch (testCase_) { + case 2: + hash = (37 * hash) + GET_FIELD_NUMBER; + hash = (53 * hash) + getGet().hashCode(); + break; + case 3: + hash = (37 * hash) + CREATE_FIELD_NUMBER; + hash = (53 * hash) + getCreate().hashCode(); + break; + case 4: + hash = (37 * hash) + SET_FIELD_NUMBER; + hash = (53 * hash) + getSet().hashCode(); + break; + case 5: + hash = (37 * hash) + UPDATE_FIELD_NUMBER; + hash = (53 * hash) + getUpdate().hashCode(); + break; + case 6: + hash = (37 * hash) + UPDATE_PATHS_FIELD_NUMBER; + hash = (53 * hash) + getUpdatePaths().hashCode(); + break; + case 7: + hash = (37 * hash) + DELETE_FIELD_NUMBER; + hash = (53 * hash) + getDelete().hashCode(); + break; + case 8: + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + break; + case 9: + hash = (37 * hash) + LISTEN_FIELD_NUMBER; + hash = (53 * hash) + getListen().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Test parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Test parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Test parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Test parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Test parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Test parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Test parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Test parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Test parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Test parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Test parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Test parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.Test prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A Test describes a single client method call and its expected result.
+     * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.Test} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.Test) + com.google.cloud.conformance.firestore.v1.TestDefinition.TestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Test_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Test_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.Test.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.Test.Builder.class); + } + + // Construct using com.google.cloud.conformance.firestore.v1.TestDefinition.Test.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + description_ = ""; + + comment_ = ""; + + testCase_ = 0; + test_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Test_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Test + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.Test.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Test build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.Test result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Test buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.Test result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.Test(this); + result.description_ = description_; + result.comment_ = comment_; + if (testCase_ == 2) { + if (getBuilder_ == null) { + result.test_ = test_; + } else { + result.test_ = getBuilder_.build(); + } + } + if (testCase_ == 3) { + if (createBuilder_ == null) { + result.test_ = test_; + } else { + result.test_ = createBuilder_.build(); + } + } + if (testCase_ == 4) { + if (setBuilder_ == null) { + result.test_ = test_; + } else { + result.test_ = setBuilder_.build(); + } + } + if (testCase_ == 5) { + if (updateBuilder_ == null) { + result.test_ = test_; + } else { + result.test_ = updateBuilder_.build(); + } + } + if (testCase_ == 6) { + if (updatePathsBuilder_ == null) { + result.test_ = test_; + } else { + result.test_ = updatePathsBuilder_.build(); + } + } + if (testCase_ == 7) { + if (deleteBuilder_ == null) { + result.test_ = test_; + } else { + result.test_ = deleteBuilder_.build(); + } + } + if (testCase_ == 8) { + if (queryBuilder_ == null) { + result.test_ = test_; + } else { + result.test_ = queryBuilder_.build(); + } + } + if (testCase_ == 9) { + if (listenBuilder_ == null) { + result.test_ = test_; + } else { + result.test_ = listenBuilder_.build(); + } + } + result.testCase_ = testCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.Test) { + return mergeFrom((com.google.cloud.conformance.firestore.v1.TestDefinition.Test) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.Test other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.Test.getDefaultInstance()) + return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (!other.getComment().isEmpty()) { + comment_ = other.comment_; + onChanged(); + } + switch (other.getTestCase()) { + case GET: + { + mergeGet(other.getGet()); + break; + } + case CREATE: + { + mergeCreate(other.getCreate()); + break; + } + case SET: + { + mergeSet(other.getSet()); + break; + } + case UPDATE: + { + mergeUpdate(other.getUpdate()); + break; + } + case UPDATE_PATHS: + { + mergeUpdatePaths(other.getUpdatePaths()); + break; + } + case DELETE: + { + mergeDelete(other.getDelete()); + break; + } + case QUERY: + { + mergeQuery(other.getQuery()); + break; + } + case LISTEN: + { + mergeListen(other.getListen()); + break; + } + case TEST_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.Test parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.Test) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int testCase_ = 0; + private java.lang.Object test_; + + public TestCase getTestCase() { + return TestCase.forNumber(testCase_); + } + + public Builder clearTest() { + testCase_ = 0; + test_ = null; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+       * short description of the test
+       * 
+ * + * string description = 1; + */ + public java.lang.String getDescription() { + java.lang.Object ref = description_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + description_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * short description of the test
+       * 
+ * + * string description = 1; + */ + public com.google.protobuf.ByteString getDescriptionBytes() { + java.lang.Object ref = description_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + description_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * short description of the test
+       * 
+ * + * string description = 1; + */ + public Builder setDescription(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + description_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * short description of the test
+       * 
+ * + * string description = 1; + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+       * short description of the test
+       * 
+ * + * string description = 1; + */ + public Builder setDescriptionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + description_ = value; + onChanged(); + return this; + } + + private java.lang.Object comment_ = ""; + /** + * + * + *
+       * a comment describing the behavior being tested
+       * 
+ * + * string comment = 10; + */ + public java.lang.String getComment() { + java.lang.Object ref = comment_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + comment_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * a comment describing the behavior being tested
+       * 
+ * + * string comment = 10; + */ + public com.google.protobuf.ByteString getCommentBytes() { + java.lang.Object ref = comment_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + comment_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * a comment describing the behavior being tested
+       * 
+ * + * string comment = 10; + */ + public Builder setComment(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + comment_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * a comment describing the behavior being tested
+       * 
+ * + * string comment = 10; + */ + public Builder clearComment() { + + comment_ = getDefaultInstance().getComment(); + onChanged(); + return this; + } + /** + * + * + *
+       * a comment describing the behavior being tested
+       * 
+ * + * string comment = 10; + */ + public Builder setCommentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + comment_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTestOrBuilder> + getBuilder_; + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + public boolean hasGet() { + return testCase_ == 2; + } + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest getGet() { + if (getBuilder_ == null) { + if (testCase_ == 2) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest + .getDefaultInstance(); + } else { + if (testCase_ == 2) { + return getBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + public Builder setGet( + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest value) { + if (getBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + test_ = value; + onChanged(); + } else { + getBuilder_.setMessage(value); + } + testCase_ = 2; + return this; + } + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + public Builder setGet( + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.Builder + builderForValue) { + if (getBuilder_ == null) { + test_ = builderForValue.build(); + onChanged(); + } else { + getBuilder_.setMessage(builderForValue.build()); + } + testCase_ = 2; + return this; + } + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + public Builder mergeGet( + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest value) { + if (getBuilder_ == null) { + if (testCase_ == 2 + && test_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest + .getDefaultInstance()) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest) test_) + .mergeFrom(value) + .buildPartial(); + } else { + test_ = value; + } + onChanged(); + } else { + if (testCase_ == 2) { + getBuilder_.mergeFrom(value); + } + getBuilder_.setMessage(value); + } + testCase_ = 2; + return this; + } + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + public Builder clearGet() { + if (getBuilder_ == null) { + if (testCase_ == 2) { + testCase_ = 0; + test_ = null; + onChanged(); + } + } else { + if (testCase_ == 2) { + testCase_ = 0; + test_ = null; + } + getBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.Builder + getGetBuilder() { + return getGetFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.GetTestOrBuilder + getGetOrBuilder() { + if ((testCase_ == 2) && (getBuilder_ != null)) { + return getBuilder_.getMessageOrBuilder(); + } else { + if (testCase_ == 2) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.GetTest get = 2; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTestOrBuilder> + getGetFieldBuilder() { + if (getBuilder_ == null) { + if (!(testCase_ == 2)) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest + .getDefaultInstance(); + } + getBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTestOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest) test_, + getParentForChildren(), + isClean()); + test_ = null; + } + testCase_ = 2; + onChanged(); + ; + return getBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTestOrBuilder> + createBuilder_; + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + public boolean hasCreate() { + return testCase_ == 3; + } + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest getCreate() { + if (createBuilder_ == null) { + if (testCase_ == 3) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + .getDefaultInstance(); + } else { + if (testCase_ == 3) { + return createBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + public Builder setCreate( + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest value) { + if (createBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + test_ = value; + onChanged(); + } else { + createBuilder_.setMessage(value); + } + testCase_ = 3; + return this; + } + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + public Builder setCreate( + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest.Builder + builderForValue) { + if (createBuilder_ == null) { + test_ = builderForValue.build(); + onChanged(); + } else { + createBuilder_.setMessage(builderForValue.build()); + } + testCase_ = 3; + return this; + } + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + public Builder mergeCreate( + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest value) { + if (createBuilder_ == null) { + if (testCase_ == 3 + && test_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + .getDefaultInstance()) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest) test_) + .mergeFrom(value) + .buildPartial(); + } else { + test_ = value; + } + onChanged(); + } else { + if (testCase_ == 3) { + createBuilder_.mergeFrom(value); + } + createBuilder_.setMessage(value); + } + testCase_ = 3; + return this; + } + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + public Builder clearCreate() { + if (createBuilder_ == null) { + if (testCase_ == 3) { + testCase_ = 0; + test_ = null; + onChanged(); + } + } else { + if (testCase_ == 3) { + testCase_ = 0; + test_ = null; + } + createBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest.Builder + getCreateBuilder() { + return getCreateFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTestOrBuilder + getCreateOrBuilder() { + if ((testCase_ == 3) && (createBuilder_ != null)) { + return createBuilder_.getMessageOrBuilder(); + } else { + if (testCase_ == 3) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.CreateTest create = 3; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTestOrBuilder> + getCreateFieldBuilder() { + if (createBuilder_ == null) { + if (!(testCase_ == 3)) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + .getDefaultInstance(); + } + createBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTestOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest) test_, + getParentForChildren(), + isClean()); + test_ = null; + } + testCase_ = 3; + onChanged(); + ; + return createBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTestOrBuilder> + setBuilder_; + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + public boolean hasSet() { + return testCase_ == 4; + } + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest getSet() { + if (setBuilder_ == null) { + if (testCase_ == 4) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest + .getDefaultInstance(); + } else { + if (testCase_ == 4) { + return setBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + public Builder setSet( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest value) { + if (setBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + test_ = value; + onChanged(); + } else { + setBuilder_.setMessage(value); + } + testCase_ = 4; + return this; + } + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + public Builder setSet( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.Builder + builderForValue) { + if (setBuilder_ == null) { + test_ = builderForValue.build(); + onChanged(); + } else { + setBuilder_.setMessage(builderForValue.build()); + } + testCase_ = 4; + return this; + } + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + public Builder mergeSet( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest value) { + if (setBuilder_ == null) { + if (testCase_ == 4 + && test_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest + .getDefaultInstance()) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest) test_) + .mergeFrom(value) + .buildPartial(); + } else { + test_ = value; + } + onChanged(); + } else { + if (testCase_ == 4) { + setBuilder_.mergeFrom(value); + } + setBuilder_.setMessage(value); + } + testCase_ = 4; + return this; + } + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + public Builder clearSet() { + if (setBuilder_ == null) { + if (testCase_ == 4) { + testCase_ = 0; + test_ = null; + onChanged(); + } + } else { + if (testCase_ == 4) { + testCase_ = 0; + test_ = null; + } + setBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.Builder + getSetBuilder() { + return getSetFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetTestOrBuilder + getSetOrBuilder() { + if ((testCase_ == 4) && (setBuilder_ != null)) { + return setBuilder_.getMessageOrBuilder(); + } else { + if (testCase_ == 4) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.SetTest set = 4; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTestOrBuilder> + getSetFieldBuilder() { + if (setBuilder_ == null) { + if (!(testCase_ == 4)) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest + .getDefaultInstance(); + } + setBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTestOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest) test_, + getParentForChildren(), + isClean()); + test_ = null; + } + testCase_ = 4; + onChanged(); + ; + return setBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTestOrBuilder> + updateBuilder_; + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + public boolean hasUpdate() { + return testCase_ == 5; + } + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest getUpdate() { + if (updateBuilder_ == null) { + if (testCase_ == 5) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + .getDefaultInstance(); + } else { + if (testCase_ == 5) { + return updateBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + public Builder setUpdate( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest value) { + if (updateBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + test_ = value; + onChanged(); + } else { + updateBuilder_.setMessage(value); + } + testCase_ = 5; + return this; + } + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + public Builder setUpdate( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest.Builder + builderForValue) { + if (updateBuilder_ == null) { + test_ = builderForValue.build(); + onChanged(); + } else { + updateBuilder_.setMessage(builderForValue.build()); + } + testCase_ = 5; + return this; + } + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + public Builder mergeUpdate( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest value) { + if (updateBuilder_ == null) { + if (testCase_ == 5 + && test_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + .getDefaultInstance()) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest) test_) + .mergeFrom(value) + .buildPartial(); + } else { + test_ = value; + } + onChanged(); + } else { + if (testCase_ == 5) { + updateBuilder_.mergeFrom(value); + } + updateBuilder_.setMessage(value); + } + testCase_ = 5; + return this; + } + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + public Builder clearUpdate() { + if (updateBuilder_ == null) { + if (testCase_ == 5) { + testCase_ = 0; + test_ = null; + onChanged(); + } + } else { + if (testCase_ == 5) { + testCase_ = 0; + test_ = null; + } + updateBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest.Builder + getUpdateBuilder() { + return getUpdateFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTestOrBuilder + getUpdateOrBuilder() { + if ((testCase_ == 5) && (updateBuilder_ != null)) { + return updateBuilder_.getMessageOrBuilder(); + } else { + if (testCase_ == 5) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.UpdateTest update = 5; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTestOrBuilder> + getUpdateFieldBuilder() { + if (updateBuilder_ == null) { + if (!(testCase_ == 5)) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + .getDefaultInstance(); + } + updateBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTestOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest) test_, + getParentForChildren(), + isClean()); + test_ = null; + } + testCase_ = 5; + onChanged(); + ; + return updateBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTestOrBuilder> + updatePathsBuilder_; + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + public boolean hasUpdatePaths() { + return testCase_ == 6; + } + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + getUpdatePaths() { + if (updatePathsBuilder_ == null) { + if (testCase_ == 6) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + .getDefaultInstance(); + } else { + if (testCase_ == 6) { + return updatePathsBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + public Builder setUpdatePaths( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest value) { + if (updatePathsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + test_ = value; + onChanged(); + } else { + updatePathsBuilder_.setMessage(value); + } + testCase_ = 6; + return this; + } + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + public Builder setUpdatePaths( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest.Builder + builderForValue) { + if (updatePathsBuilder_ == null) { + test_ = builderForValue.build(); + onChanged(); + } else { + updatePathsBuilder_.setMessage(builderForValue.build()); + } + testCase_ = 6; + return this; + } + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + public Builder mergeUpdatePaths( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest value) { + if (updatePathsBuilder_ == null) { + if (testCase_ == 6 + && test_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + .getDefaultInstance()) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest) + test_) + .mergeFrom(value) + .buildPartial(); + } else { + test_ = value; + } + onChanged(); + } else { + if (testCase_ == 6) { + updatePathsBuilder_.mergeFrom(value); + } + updatePathsBuilder_.setMessage(value); + } + testCase_ = 6; + return this; + } + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + public Builder clearUpdatePaths() { + if (updatePathsBuilder_ == null) { + if (testCase_ == 6) { + testCase_ = 0; + test_ = null; + onChanged(); + } + } else { + if (testCase_ == 6) { + testCase_ = 0; + test_ = null; + } + updatePathsBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest.Builder + getUpdatePathsBuilder() { + return getUpdatePathsFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTestOrBuilder + getUpdatePathsOrBuilder() { + if ((testCase_ == 6) && (updatePathsBuilder_ != null)) { + return updatePathsBuilder_.getMessageOrBuilder(); + } else { + if (testCase_ == 6) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.UpdatePathsTest update_paths = 6; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTestOrBuilder> + getUpdatePathsFieldBuilder() { + if (updatePathsBuilder_ == null) { + if (!(testCase_ == 6)) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + .getDefaultInstance(); + } + updatePathsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition + .UpdatePathsTestOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest) test_, + getParentForChildren(), + isClean()); + test_ = null; + } + testCase_ = 6; + onChanged(); + ; + return updatePathsBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTestOrBuilder> + deleteBuilder_; + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + public boolean hasDelete() { + return testCase_ == 7; + } + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest getDelete() { + if (deleteBuilder_ == null) { + if (testCase_ == 7) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + .getDefaultInstance(); + } else { + if (testCase_ == 7) { + return deleteBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + public Builder setDelete( + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest value) { + if (deleteBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + test_ = value; + onChanged(); + } else { + deleteBuilder_.setMessage(value); + } + testCase_ = 7; + return this; + } + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + public Builder setDelete( + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest.Builder + builderForValue) { + if (deleteBuilder_ == null) { + test_ = builderForValue.build(); + onChanged(); + } else { + deleteBuilder_.setMessage(builderForValue.build()); + } + testCase_ = 7; + return this; + } + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + public Builder mergeDelete( + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest value) { + if (deleteBuilder_ == null) { + if (testCase_ == 7 + && test_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + .getDefaultInstance()) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest) test_) + .mergeFrom(value) + .buildPartial(); + } else { + test_ = value; + } + onChanged(); + } else { + if (testCase_ == 7) { + deleteBuilder_.mergeFrom(value); + } + deleteBuilder_.setMessage(value); + } + testCase_ = 7; + return this; + } + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + public Builder clearDelete() { + if (deleteBuilder_ == null) { + if (testCase_ == 7) { + testCase_ = 0; + test_ = null; + onChanged(); + } + } else { + if (testCase_ == 7) { + testCase_ = 0; + test_ = null; + } + deleteBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest.Builder + getDeleteBuilder() { + return getDeleteFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTestOrBuilder + getDeleteOrBuilder() { + if ((testCase_ == 7) && (deleteBuilder_ != null)) { + return deleteBuilder_.getMessageOrBuilder(); + } else { + if (testCase_ == 7) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.DeleteTest delete = 7; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTestOrBuilder> + getDeleteFieldBuilder() { + if (deleteBuilder_ == null) { + if (!(testCase_ == 7)) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + .getDefaultInstance(); + } + deleteBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTestOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest) test_, + getParentForChildren(), + isClean()); + test_ = null; + } + testCase_ = 7; + onChanged(); + ; + return deleteBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTestOrBuilder> + queryBuilder_; + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + public boolean hasQuery() { + return testCase_ == 8; + } + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest getQuery() { + if (queryBuilder_ == null) { + if (testCase_ == 8) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + .getDefaultInstance(); + } else { + if (testCase_ == 8) { + return queryBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + public Builder setQuery( + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + test_ = value; + onChanged(); + } else { + queryBuilder_.setMessage(value); + } + testCase_ = 8; + return this; + } + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + public Builder setQuery( + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest.Builder + builderForValue) { + if (queryBuilder_ == null) { + test_ = builderForValue.build(); + onChanged(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + testCase_ = 8; + return this; + } + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + public Builder mergeQuery( + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest value) { + if (queryBuilder_ == null) { + if (testCase_ == 8 + && test_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + .getDefaultInstance()) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest) test_) + .mergeFrom(value) + .buildPartial(); + } else { + test_ = value; + } + onChanged(); + } else { + if (testCase_ == 8) { + queryBuilder_.mergeFrom(value); + } + queryBuilder_.setMessage(value); + } + testCase_ = 8; + return this; + } + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + public Builder clearQuery() { + if (queryBuilder_ == null) { + if (testCase_ == 8) { + testCase_ = 0; + test_ = null; + onChanged(); + } + } else { + if (testCase_ == 8) { + testCase_ = 0; + test_ = null; + } + queryBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest.Builder + getQueryBuilder() { + return getQueryFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTestOrBuilder + getQueryOrBuilder() { + if ((testCase_ == 8) && (queryBuilder_ != null)) { + return queryBuilder_.getMessageOrBuilder(); + } else { + if (testCase_ == 8) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.QueryTest query = 8; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTestOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + if (!(testCase_ == 8)) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + .getDefaultInstance(); + } + queryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTestOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest) test_, + getParentForChildren(), + isClean()); + test_ = null; + } + testCase_ = 8; + onChanged(); + ; + return queryBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTestOrBuilder> + listenBuilder_; + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + public boolean hasListen() { + return testCase_ == 9; + } + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest getListen() { + if (listenBuilder_ == null) { + if (testCase_ == 9) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + .getDefaultInstance(); + } else { + if (testCase_ == 9) { + return listenBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + public Builder setListen( + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest value) { + if (listenBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + test_ = value; + onChanged(); + } else { + listenBuilder_.setMessage(value); + } + testCase_ = 9; + return this; + } + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + public Builder setListen( + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest.Builder + builderForValue) { + if (listenBuilder_ == null) { + test_ = builderForValue.build(); + onChanged(); + } else { + listenBuilder_.setMessage(builderForValue.build()); + } + testCase_ = 9; + return this; + } + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + public Builder mergeListen( + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest value) { + if (listenBuilder_ == null) { + if (testCase_ == 9 + && test_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + .getDefaultInstance()) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest) test_) + .mergeFrom(value) + .buildPartial(); + } else { + test_ = value; + } + onChanged(); + } else { + if (testCase_ == 9) { + listenBuilder_.mergeFrom(value); + } + listenBuilder_.setMessage(value); + } + testCase_ = 9; + return this; + } + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + public Builder clearListen() { + if (listenBuilder_ == null) { + if (testCase_ == 9) { + testCase_ = 0; + test_ = null; + onChanged(); + } + } else { + if (testCase_ == 9) { + testCase_ = 0; + test_ = null; + } + listenBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest.Builder + getListenBuilder() { + return getListenFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTestOrBuilder + getListenOrBuilder() { + if ((testCase_ == 9) && (listenBuilder_ != null)) { + return listenBuilder_.getMessageOrBuilder(); + } else { + if (testCase_ == 9) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest) test_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.ListenTest listen = 9; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTestOrBuilder> + getListenFieldBuilder() { + if (listenBuilder_ == null) { + if (!(testCase_ == 9)) { + test_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + .getDefaultInstance(); + } + listenBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest, + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTestOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest) test_, + getParentForChildren(), + isClean()); + test_ = null; + } + testCase_ = 9; + onChanged(); + ; + return listenBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.Test) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.Test) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.Test + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.Test(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Test + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Test parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Test(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Test + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface GetTestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.GetTest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+     * 
+ * + * string doc_ref_path = 1; + */ + java.lang.String getDocRefPath(); + /** + * + * + *
+     * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+     * 
+ * + * string doc_ref_path = 1; + */ + com.google.protobuf.ByteString getDocRefPathBytes(); + + /** + * + * + *
+     * The request that the call should send to the Firestore service.
+     * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + boolean hasRequest(); + /** + * + * + *
+     * The request that the call should send to the Firestore service.
+     * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + com.google.firestore.v1.GetDocumentRequest getRequest(); + /** + * + * + *
+     * The request that the call should send to the Firestore service.
+     * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + com.google.firestore.v1.GetDocumentRequestOrBuilder getRequestOrBuilder(); + } + /** + * + * + *
+   * Call to the DocumentRef.Get method.
+   * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.GetTest} + */ + public static final class GetTest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.GetTest) + GetTestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetTest.newBuilder() to construct. + private GetTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetTest() { + docRefPath_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetTest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + docRefPath_ = s; + break; + } + case 18: + { + com.google.firestore.v1.GetDocumentRequest.Builder subBuilder = null; + if (request_ != null) { + subBuilder = request_.toBuilder(); + } + request_ = + input.readMessage( + com.google.firestore.v1.GetDocumentRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(request_); + request_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_GetTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_GetTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.Builder.class); + } + + public static final int DOC_REF_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object docRefPath_; + /** + * + * + *
+     * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+     * 
+ * + * string doc_ref_path = 1; + */ + public java.lang.String getDocRefPath() { + java.lang.Object ref = docRefPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docRefPath_ = s; + return s; + } + } + /** + * + * + *
+     * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+     * 
+ * + * string doc_ref_path = 1; + */ + public com.google.protobuf.ByteString getDocRefPathBytes() { + java.lang.Object ref = docRefPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docRefPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_FIELD_NUMBER = 2; + private com.google.firestore.v1.GetDocumentRequest request_; + /** + * + * + *
+     * The request that the call should send to the Firestore service.
+     * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + public boolean hasRequest() { + return request_ != null; + } + /** + * + * + *
+     * The request that the call should send to the Firestore service.
+     * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + public com.google.firestore.v1.GetDocumentRequest getRequest() { + return request_ == null + ? com.google.firestore.v1.GetDocumentRequest.getDefaultInstance() + : request_; + } + /** + * + * + *
+     * The request that the call should send to the Firestore service.
+     * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + public com.google.firestore.v1.GetDocumentRequestOrBuilder getRequestOrBuilder() { + return getRequest(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDocRefPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, docRefPath_); + } + if (request_ != null) { + output.writeMessage(2, getRequest()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDocRefPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, docRefPath_); + } + if (request_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRequest()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest) obj; + + if (!getDocRefPath().equals(other.getDocRefPath())) return false; + if (hasRequest() != other.hasRequest()) return false; + if (hasRequest()) { + if (!getRequest().equals(other.getRequest())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOC_REF_PATH_FIELD_NUMBER; + hash = (53 * hash) + getDocRefPath().hashCode(); + if (hasRequest()) { + hash = (37 * hash) + REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRequest().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Call to the DocumentRef.Get method.
+     * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.GetTest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.GetTest) + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_GetTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_GetTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + docRefPath_ = ""; + + if (requestBuilder_ == null) { + request_ = null; + } else { + request_ = null; + requestBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_GetTest_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest(this); + result.docRefPath_ = docRefPath_; + if (requestBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = requestBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest + .getDefaultInstance()) return this; + if (!other.getDocRefPath().isEmpty()) { + docRefPath_ = other.docRefPath_; + onChanged(); + } + if (other.hasRequest()) { + mergeRequest(other.getRequest()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object docRefPath_ = ""; + /** + * + * + *
+       * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+       * 
+ * + * string doc_ref_path = 1; + */ + public java.lang.String getDocRefPath() { + java.lang.Object ref = docRefPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docRefPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+       * 
+ * + * string doc_ref_path = 1; + */ + public com.google.protobuf.ByteString getDocRefPathBytes() { + java.lang.Object ref = docRefPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docRefPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder setDocRefPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + docRefPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder clearDocRefPath() { + + docRefPath_ = getDefaultInstance().getDocRefPath(); + onChanged(); + return this; + } + /** + * + * + *
+       * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder setDocRefPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + docRefPath_ = value; + onChanged(); + return this; + } + + private com.google.firestore.v1.GetDocumentRequest request_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.GetDocumentRequest, + com.google.firestore.v1.GetDocumentRequest.Builder, + com.google.firestore.v1.GetDocumentRequestOrBuilder> + requestBuilder_; + /** + * + * + *
+       * The request that the call should send to the Firestore service.
+       * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + public boolean hasRequest() { + return requestBuilder_ != null || request_ != null; + } + /** + * + * + *
+       * The request that the call should send to the Firestore service.
+       * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + public com.google.firestore.v1.GetDocumentRequest getRequest() { + if (requestBuilder_ == null) { + return request_ == null + ? com.google.firestore.v1.GetDocumentRequest.getDefaultInstance() + : request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The request that the call should send to the Firestore service.
+       * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + public Builder setRequest(com.google.firestore.v1.GetDocumentRequest value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + requestBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The request that the call should send to the Firestore service.
+       * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + public Builder setRequest( + com.google.firestore.v1.GetDocumentRequest.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The request that the call should send to the Firestore service.
+       * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + public Builder mergeRequest(com.google.firestore.v1.GetDocumentRequest value) { + if (requestBuilder_ == null) { + if (request_ != null) { + request_ = + com.google.firestore.v1.GetDocumentRequest.newBuilder(request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + requestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The request that the call should send to the Firestore service.
+       * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = null; + onChanged(); + } else { + request_ = null; + requestBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The request that the call should send to the Firestore service.
+       * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + public com.google.firestore.v1.GetDocumentRequest.Builder getRequestBuilder() { + + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The request that the call should send to the Firestore service.
+       * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + public com.google.firestore.v1.GetDocumentRequestOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_ == null + ? com.google.firestore.v1.GetDocumentRequest.getDefaultInstance() + : request_; + } + } + /** + * + * + *
+       * The request that the call should send to the Firestore service.
+       * 
+ * + * .google.firestore.v1.GetDocumentRequest request = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.GetDocumentRequest, + com.google.firestore.v1.GetDocumentRequest.Builder, + com.google.firestore.v1.GetDocumentRequestOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.GetDocumentRequest, + com.google.firestore.v1.GetDocumentRequest.Builder, + com.google.firestore.v1.GetDocumentRequestOrBuilder>( + getRequest(), getParentForChildren(), isClean()); + request_ = null; + } + return requestBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.GetTest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.GetTest) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetTest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetTest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.GetTest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CreateTestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.CreateTest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+     * 
+ * + * string doc_ref_path = 1; + */ + java.lang.String getDocRefPath(); + /** + * + * + *
+     * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+     * 
+ * + * string doc_ref_path = 1; + */ + com.google.protobuf.ByteString getDocRefPathBytes(); + + /** + * + * + *
+     * The data passed to Create, as JSON. The strings "Delete" and "ServerTimestamp"
+     * denote the two special sentinel values. Values that could be interpreted as integers
+     * (i.e. digit strings) should be treated as integers.
+     * 
+ * + * string json_data = 2; + */ + java.lang.String getJsonData(); + /** + * + * + *
+     * The data passed to Create, as JSON. The strings "Delete" and "ServerTimestamp"
+     * denote the two special sentinel values. Values that could be interpreted as integers
+     * (i.e. digit strings) should be treated as integers.
+     * 
+ * + * string json_data = 2; + */ + com.google.protobuf.ByteString getJsonDataBytes(); + + /** + * + * + *
+     * The request that the call should generate.
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + boolean hasRequest(); + /** + * + * + *
+     * The request that the call should generate.
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + com.google.firestore.v1.CommitRequest getRequest(); + /** + * + * + *
+     * The request that the call should generate.
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder(); + + /** + * + * + *
+     * If true, the call should result in an error without generating a request.
+     * If this is true, request should not be set.
+     * 
+ * + * bool is_error = 4; + */ + boolean getIsError(); + } + /** + * + * + *
+   * Call to DocumentRef.Create.
+   * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.CreateTest} + */ + public static final class CreateTest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.CreateTest) + CreateTestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateTest.newBuilder() to construct. + private CreateTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateTest() { + docRefPath_ = ""; + jsonData_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateTest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + docRefPath_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + jsonData_ = s; + break; + } + case 26: + { + com.google.firestore.v1.CommitRequest.Builder subBuilder = null; + if (request_ != null) { + subBuilder = request_.toBuilder(); + } + request_ = + input.readMessage( + com.google.firestore.v1.CommitRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(request_); + request_ = subBuilder.buildPartial(); + } + + break; + } + case 32: + { + isError_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_CreateTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_CreateTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest.Builder.class); + } + + public static final int DOC_REF_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object docRefPath_; + /** + * + * + *
+     * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+     * 
+ * + * string doc_ref_path = 1; + */ + public java.lang.String getDocRefPath() { + java.lang.Object ref = docRefPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docRefPath_ = s; + return s; + } + } + /** + * + * + *
+     * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+     * 
+ * + * string doc_ref_path = 1; + */ + public com.google.protobuf.ByteString getDocRefPathBytes() { + java.lang.Object ref = docRefPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docRefPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JSON_DATA_FIELD_NUMBER = 2; + private volatile java.lang.Object jsonData_; + /** + * + * + *
+     * The data passed to Create, as JSON. The strings "Delete" and "ServerTimestamp"
+     * denote the two special sentinel values. Values that could be interpreted as integers
+     * (i.e. digit strings) should be treated as integers.
+     * 
+ * + * string json_data = 2; + */ + public java.lang.String getJsonData() { + java.lang.Object ref = jsonData_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonData_ = s; + return s; + } + } + /** + * + * + *
+     * The data passed to Create, as JSON. The strings "Delete" and "ServerTimestamp"
+     * denote the two special sentinel values. Values that could be interpreted as integers
+     * (i.e. digit strings) should be treated as integers.
+     * 
+ * + * string json_data = 2; + */ + public com.google.protobuf.ByteString getJsonDataBytes() { + java.lang.Object ref = jsonData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jsonData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_FIELD_NUMBER = 3; + private com.google.firestore.v1.CommitRequest request_; + /** + * + * + *
+     * The request that the call should generate.
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public boolean hasRequest() { + return request_ != null; + } + /** + * + * + *
+     * The request that the call should generate.
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public com.google.firestore.v1.CommitRequest getRequest() { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } + /** + * + * + *
+     * The request that the call should generate.
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder() { + return getRequest(); + } + + public static final int IS_ERROR_FIELD_NUMBER = 4; + private boolean isError_; + /** + * + * + *
+     * If true, the call should result in an error without generating a request.
+     * If this is true, request should not be set.
+     * 
+ * + * bool is_error = 4; + */ + public boolean getIsError() { + return isError_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDocRefPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, docRefPath_); + } + if (!getJsonDataBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jsonData_); + } + if (request_ != null) { + output.writeMessage(3, getRequest()); + } + if (isError_ != false) { + output.writeBool(4, isError_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDocRefPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, docRefPath_); + } + if (!getJsonDataBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jsonData_); + } + if (request_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRequest()); + } + if (isError_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, isError_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest) obj; + + if (!getDocRefPath().equals(other.getDocRefPath())) return false; + if (!getJsonData().equals(other.getJsonData())) return false; + if (hasRequest() != other.hasRequest()) return false; + if (hasRequest()) { + if (!getRequest().equals(other.getRequest())) return false; + } + if (getIsError() != other.getIsError()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOC_REF_PATH_FIELD_NUMBER; + hash = (53 * hash) + getDocRefPath().hashCode(); + hash = (37 * hash) + JSON_DATA_FIELD_NUMBER; + hash = (53 * hash) + getJsonData().hashCode(); + if (hasRequest()) { + hash = (37 * hash) + REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRequest().hashCode(); + } + hash = (37 * hash) + IS_ERROR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsError()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Call to DocumentRef.Create.
+     * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.CreateTest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.CreateTest) + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_CreateTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_CreateTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + docRefPath_ = ""; + + jsonData_ = ""; + + if (requestBuilder_ == null) { + request_ = null; + } else { + request_ = null; + requestBuilder_ = null; + } + isError_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_CreateTest_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest(this); + result.docRefPath_ = docRefPath_; + result.jsonData_ = jsonData_; + if (requestBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = requestBuilder_.build(); + } + result.isError_ = isError_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + .getDefaultInstance()) return this; + if (!other.getDocRefPath().isEmpty()) { + docRefPath_ = other.docRefPath_; + onChanged(); + } + if (!other.getJsonData().isEmpty()) { + jsonData_ = other.jsonData_; + onChanged(); + } + if (other.hasRequest()) { + mergeRequest(other.getRequest()); + } + if (other.getIsError() != false) { + setIsError(other.getIsError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object docRefPath_ = ""; + /** + * + * + *
+       * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+       * 
+ * + * string doc_ref_path = 1; + */ + public java.lang.String getDocRefPath() { + java.lang.Object ref = docRefPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docRefPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+       * 
+ * + * string doc_ref_path = 1; + */ + public com.google.protobuf.ByteString getDocRefPathBytes() { + java.lang.Object ref = docRefPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docRefPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder setDocRefPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + docRefPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder clearDocRefPath() { + + docRefPath_ = getDefaultInstance().getDocRefPath(); + onChanged(); + return this; + } + /** + * + * + *
+       * The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d"
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder setDocRefPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + docRefPath_ = value; + onChanged(); + return this; + } + + private java.lang.Object jsonData_ = ""; + /** + * + * + *
+       * The data passed to Create, as JSON. The strings "Delete" and "ServerTimestamp"
+       * denote the two special sentinel values. Values that could be interpreted as integers
+       * (i.e. digit strings) should be treated as integers.
+       * 
+ * + * string json_data = 2; + */ + public java.lang.String getJsonData() { + java.lang.Object ref = jsonData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * The data passed to Create, as JSON. The strings "Delete" and "ServerTimestamp"
+       * denote the two special sentinel values. Values that could be interpreted as integers
+       * (i.e. digit strings) should be treated as integers.
+       * 
+ * + * string json_data = 2; + */ + public com.google.protobuf.ByteString getJsonDataBytes() { + java.lang.Object ref = jsonData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jsonData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * The data passed to Create, as JSON. The strings "Delete" and "ServerTimestamp"
+       * denote the two special sentinel values. Values that could be interpreted as integers
+       * (i.e. digit strings) should be treated as integers.
+       * 
+ * + * string json_data = 2; + */ + public Builder setJsonData(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jsonData_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The data passed to Create, as JSON. The strings "Delete" and "ServerTimestamp"
+       * denote the two special sentinel values. Values that could be interpreted as integers
+       * (i.e. digit strings) should be treated as integers.
+       * 
+ * + * string json_data = 2; + */ + public Builder clearJsonData() { + + jsonData_ = getDefaultInstance().getJsonData(); + onChanged(); + return this; + } + /** + * + * + *
+       * The data passed to Create, as JSON. The strings "Delete" and "ServerTimestamp"
+       * denote the two special sentinel values. Values that could be interpreted as integers
+       * (i.e. digit strings) should be treated as integers.
+       * 
+ * + * string json_data = 2; + */ + public Builder setJsonDataBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jsonData_ = value; + onChanged(); + return this; + } + + private com.google.firestore.v1.CommitRequest request_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder> + requestBuilder_; + /** + * + * + *
+       * The request that the call should generate.
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public boolean hasRequest() { + return requestBuilder_ != null || request_ != null; + } + /** + * + * + *
+       * The request that the call should generate.
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public com.google.firestore.v1.CommitRequest getRequest() { + if (requestBuilder_ == null) { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * + * + *
+       * The request that the call should generate.
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public Builder setRequest(com.google.firestore.v1.CommitRequest value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + requestBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * The request that the call should generate.
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public Builder setRequest(com.google.firestore.v1.CommitRequest.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * The request that the call should generate.
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public Builder mergeRequest(com.google.firestore.v1.CommitRequest value) { + if (requestBuilder_ == null) { + if (request_ != null) { + request_ = + com.google.firestore.v1.CommitRequest.newBuilder(request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + requestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * The request that the call should generate.
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = null; + onChanged(); + } else { + request_ = null; + requestBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * The request that the call should generate.
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public com.google.firestore.v1.CommitRequest.Builder getRequestBuilder() { + + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * The request that the call should generate.
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } + } + /** + * + * + *
+       * The request that the call should generate.
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder>( + getRequest(), getParentForChildren(), isClean()); + request_ = null; + } + return requestBuilder_; + } + + private boolean isError_; + /** + * + * + *
+       * If true, the call should result in an error without generating a request.
+       * If this is true, request should not be set.
+       * 
+ * + * bool is_error = 4; + */ + public boolean getIsError() { + return isError_; + } + /** + * + * + *
+       * If true, the call should result in an error without generating a request.
+       * If this is true, request should not be set.
+       * 
+ * + * bool is_error = 4; + */ + public Builder setIsError(boolean value) { + + isError_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * If true, the call should result in an error without generating a request.
+       * If this is true, request should not be set.
+       * 
+ * + * bool is_error = 4; + */ + public Builder clearIsError() { + + isError_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.CreateTest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.CreateTest) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateTest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateTest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.CreateTest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SetTestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.SetTest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + java.lang.String getDocRefPath(); + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + com.google.protobuf.ByteString getDocRefPathBytes(); + + /** + * + * + *
+     * option to the Set call, if any
+     * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + boolean hasOption(); + /** + * + * + *
+     * option to the Set call, if any
+     * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption getOption(); + /** + * + * + *
+     * option to the Set call, if any
+     * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOptionOrBuilder + getOptionOrBuilder(); + + /** + * + * + *
+     * data (see CreateTest.json_data)
+     * 
+ * + * string json_data = 3; + */ + java.lang.String getJsonData(); + /** + * + * + *
+     * data (see CreateTest.json_data)
+     * 
+ * + * string json_data = 3; + */ + com.google.protobuf.ByteString getJsonDataBytes(); + + /** + * + * + *
+     * expected request
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + boolean hasRequest(); + /** + * + * + *
+     * expected request
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + com.google.firestore.v1.CommitRequest getRequest(); + /** + * + * + *
+     * expected request
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder(); + + /** + * + * + *
+     * call signals an error
+     * 
+ * + * bool is_error = 5; + */ + boolean getIsError(); + } + /** + * + * + *
+   * A call to DocumentRef.Set.
+   * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.SetTest} + */ + public static final class SetTest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.SetTest) + SetTestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SetTest.newBuilder() to construct. + private SetTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SetTest() { + docRefPath_ = ""; + jsonData_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SetTest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + docRefPath_ = s; + break; + } + case 18: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption.Builder + subBuilder = null; + if (option_ != null) { + subBuilder = option_.toBuilder(); + } + option_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(option_); + option_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + jsonData_ = s; + break; + } + case 34: + { + com.google.firestore.v1.CommitRequest.Builder subBuilder = null; + if (request_ != null) { + subBuilder = request_.toBuilder(); + } + request_ = + input.readMessage( + com.google.firestore.v1.CommitRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(request_); + request_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + isError_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_SetTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_SetTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.Builder.class); + } + + public static final int DOC_REF_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object docRefPath_; + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + public java.lang.String getDocRefPath() { + java.lang.Object ref = docRefPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docRefPath_ = s; + return s; + } + } + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + public com.google.protobuf.ByteString getDocRefPathBytes() { + java.lang.Object ref = docRefPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docRefPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTION_FIELD_NUMBER = 2; + private com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption option_; + /** + * + * + *
+     * option to the Set call, if any
+     * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + public boolean hasOption() { + return option_ != null; + } + /** + * + * + *
+     * option to the Set call, if any
+     * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption getOption() { + return option_ == null + ? com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption.getDefaultInstance() + : option_; + } + /** + * + * + *
+     * option to the Set call, if any
+     * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetOptionOrBuilder + getOptionOrBuilder() { + return getOption(); + } + + public static final int JSON_DATA_FIELD_NUMBER = 3; + private volatile java.lang.Object jsonData_; + /** + * + * + *
+     * data (see CreateTest.json_data)
+     * 
+ * + * string json_data = 3; + */ + public java.lang.String getJsonData() { + java.lang.Object ref = jsonData_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonData_ = s; + return s; + } + } + /** + * + * + *
+     * data (see CreateTest.json_data)
+     * 
+ * + * string json_data = 3; + */ + public com.google.protobuf.ByteString getJsonDataBytes() { + java.lang.Object ref = jsonData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jsonData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_FIELD_NUMBER = 4; + private com.google.firestore.v1.CommitRequest request_; + /** + * + * + *
+     * expected request
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public boolean hasRequest() { + return request_ != null; + } + /** + * + * + *
+     * expected request
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public com.google.firestore.v1.CommitRequest getRequest() { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } + /** + * + * + *
+     * expected request
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder() { + return getRequest(); + } + + public static final int IS_ERROR_FIELD_NUMBER = 5; + private boolean isError_; + /** + * + * + *
+     * call signals an error
+     * 
+ * + * bool is_error = 5; + */ + public boolean getIsError() { + return isError_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDocRefPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, docRefPath_); + } + if (option_ != null) { + output.writeMessage(2, getOption()); + } + if (!getJsonDataBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, jsonData_); + } + if (request_ != null) { + output.writeMessage(4, getRequest()); + } + if (isError_ != false) { + output.writeBool(5, isError_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDocRefPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, docRefPath_); + } + if (option_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOption()); + } + if (!getJsonDataBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, jsonData_); + } + if (request_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRequest()); + } + if (isError_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, isError_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest) obj; + + if (!getDocRefPath().equals(other.getDocRefPath())) return false; + if (hasOption() != other.hasOption()) return false; + if (hasOption()) { + if (!getOption().equals(other.getOption())) return false; + } + if (!getJsonData().equals(other.getJsonData())) return false; + if (hasRequest() != other.hasRequest()) return false; + if (hasRequest()) { + if (!getRequest().equals(other.getRequest())) return false; + } + if (getIsError() != other.getIsError()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOC_REF_PATH_FIELD_NUMBER; + hash = (53 * hash) + getDocRefPath().hashCode(); + if (hasOption()) { + hash = (37 * hash) + OPTION_FIELD_NUMBER; + hash = (53 * hash) + getOption().hashCode(); + } + hash = (37 * hash) + JSON_DATA_FIELD_NUMBER; + hash = (53 * hash) + getJsonData().hashCode(); + if (hasRequest()) { + hash = (37 * hash) + REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRequest().hashCode(); + } + hash = (37 * hash) + IS_ERROR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsError()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A call to DocumentRef.Set.
+     * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.SetTest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.SetTest) + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_SetTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_SetTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + docRefPath_ = ""; + + if (optionBuilder_ == null) { + option_ = null; + } else { + option_ = null; + optionBuilder_ = null; + } + jsonData_ = ""; + + if (requestBuilder_ == null) { + request_ = null; + } else { + request_ = null; + requestBuilder_ = null; + } + isError_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_SetTest_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest(this); + result.docRefPath_ = docRefPath_; + if (optionBuilder_ == null) { + result.option_ = option_; + } else { + result.option_ = optionBuilder_.build(); + } + result.jsonData_ = jsonData_; + if (requestBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = requestBuilder_.build(); + } + result.isError_ = isError_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest + .getDefaultInstance()) return this; + if (!other.getDocRefPath().isEmpty()) { + docRefPath_ = other.docRefPath_; + onChanged(); + } + if (other.hasOption()) { + mergeOption(other.getOption()); + } + if (!other.getJsonData().isEmpty()) { + jsonData_ = other.jsonData_; + onChanged(); + } + if (other.hasRequest()) { + mergeRequest(other.getRequest()); + } + if (other.getIsError() != false) { + setIsError(other.getIsError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object docRefPath_ = ""; + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public java.lang.String getDocRefPath() { + java.lang.Object ref = docRefPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docRefPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public com.google.protobuf.ByteString getDocRefPathBytes() { + java.lang.Object ref = docRefPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docRefPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder setDocRefPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + docRefPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder clearDocRefPath() { + + docRefPath_ = getDefaultInstance().getDocRefPath(); + onChanged(); + return this; + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder setDocRefPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + docRefPath_ = value; + onChanged(); + return this; + } + + private com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption option_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOptionOrBuilder> + optionBuilder_; + /** + * + * + *
+       * option to the Set call, if any
+       * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + public boolean hasOption() { + return optionBuilder_ != null || option_ != null; + } + /** + * + * + *
+       * option to the Set call, if any
+       * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption getOption() { + if (optionBuilder_ == null) { + return option_ == null + ? com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption + .getDefaultInstance() + : option_; + } else { + return optionBuilder_.getMessage(); + } + } + /** + * + * + *
+       * option to the Set call, if any
+       * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + public Builder setOption( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption value) { + if (optionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + option_ = value; + onChanged(); + } else { + optionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * option to the Set call, if any
+       * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + public Builder setOption( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption.Builder + builderForValue) { + if (optionBuilder_ == null) { + option_ = builderForValue.build(); + onChanged(); + } else { + optionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * option to the Set call, if any
+       * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + public Builder mergeOption( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption value) { + if (optionBuilder_ == null) { + if (option_ != null) { + option_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption.newBuilder( + option_) + .mergeFrom(value) + .buildPartial(); + } else { + option_ = value; + } + onChanged(); + } else { + optionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * option to the Set call, if any
+       * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + public Builder clearOption() { + if (optionBuilder_ == null) { + option_ = null; + onChanged(); + } else { + option_ = null; + optionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * option to the Set call, if any
+       * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption.Builder + getOptionBuilder() { + + onChanged(); + return getOptionFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * option to the Set call, if any
+       * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetOptionOrBuilder + getOptionOrBuilder() { + if (optionBuilder_ != null) { + return optionBuilder_.getMessageOrBuilder(); + } else { + return option_ == null + ? com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption + .getDefaultInstance() + : option_; + } + } + /** + * + * + *
+       * option to the Set call, if any
+       * 
+ * + * .google.cloud.conformance.firestore.v1.SetOption option = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOptionOrBuilder> + getOptionFieldBuilder() { + if (optionBuilder_ == null) { + optionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOptionOrBuilder>( + getOption(), getParentForChildren(), isClean()); + option_ = null; + } + return optionBuilder_; + } + + private java.lang.Object jsonData_ = ""; + /** + * + * + *
+       * data (see CreateTest.json_data)
+       * 
+ * + * string json_data = 3; + */ + public java.lang.String getJsonData() { + java.lang.Object ref = jsonData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * data (see CreateTest.json_data)
+       * 
+ * + * string json_data = 3; + */ + public com.google.protobuf.ByteString getJsonDataBytes() { + java.lang.Object ref = jsonData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jsonData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * data (see CreateTest.json_data)
+       * 
+ * + * string json_data = 3; + */ + public Builder setJsonData(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jsonData_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * data (see CreateTest.json_data)
+       * 
+ * + * string json_data = 3; + */ + public Builder clearJsonData() { + + jsonData_ = getDefaultInstance().getJsonData(); + onChanged(); + return this; + } + /** + * + * + *
+       * data (see CreateTest.json_data)
+       * 
+ * + * string json_data = 3; + */ + public Builder setJsonDataBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jsonData_ = value; + onChanged(); + return this; + } + + private com.google.firestore.v1.CommitRequest request_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder> + requestBuilder_; + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public boolean hasRequest() { + return requestBuilder_ != null || request_ != null; + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public com.google.firestore.v1.CommitRequest getRequest() { + if (requestBuilder_ == null) { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public Builder setRequest(com.google.firestore.v1.CommitRequest value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + requestBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public Builder setRequest(com.google.firestore.v1.CommitRequest.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public Builder mergeRequest(com.google.firestore.v1.CommitRequest value) { + if (requestBuilder_ == null) { + if (request_ != null) { + request_ = + com.google.firestore.v1.CommitRequest.newBuilder(request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + requestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = null; + onChanged(); + } else { + request_ = null; + requestBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public com.google.firestore.v1.CommitRequest.Builder getRequestBuilder() { + + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder>( + getRequest(), getParentForChildren(), isClean()); + request_ = null; + } + return requestBuilder_; + } + + private boolean isError_; + /** + * + * + *
+       * call signals an error
+       * 
+ * + * bool is_error = 5; + */ + public boolean getIsError() { + return isError_; + } + /** + * + * + *
+       * call signals an error
+       * 
+ * + * bool is_error = 5; + */ + public Builder setIsError(boolean value) { + + isError_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * call signals an error
+       * 
+ * + * bool is_error = 5; + */ + public Builder clearIsError() { + + isError_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.SetTest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.SetTest) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SetTest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SetTest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetTest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface UpdateTestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.UpdateTest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + java.lang.String getDocRefPath(); + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + com.google.protobuf.ByteString getDocRefPathBytes(); + + /** + * + * + *
+     * precondition in call, if any
+     * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + boolean hasPrecondition(); + /** + * + * + *
+     * precondition in call, if any
+     * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + com.google.firestore.v1.Precondition getPrecondition(); + /** + * + * + *
+     * precondition in call, if any
+     * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + com.google.firestore.v1.PreconditionOrBuilder getPreconditionOrBuilder(); + + /** + * + * + *
+     * data (see CreateTest.json_data)
+     * 
+ * + * string json_data = 3; + */ + java.lang.String getJsonData(); + /** + * + * + *
+     * data (see CreateTest.json_data)
+     * 
+ * + * string json_data = 3; + */ + com.google.protobuf.ByteString getJsonDataBytes(); + + /** + * + * + *
+     * expected request
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + boolean hasRequest(); + /** + * + * + *
+     * expected request
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + com.google.firestore.v1.CommitRequest getRequest(); + /** + * + * + *
+     * expected request
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder(); + + /** + * + * + *
+     * call signals an error
+     * 
+ * + * bool is_error = 5; + */ + boolean getIsError(); + } + /** + * + * + *
+   * A call to the form of DocumentRef.Update that represents the data as a map
+   * or dictionary.
+   * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.UpdateTest} + */ + public static final class UpdateTest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.UpdateTest) + UpdateTestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateTest.newBuilder() to construct. + private UpdateTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateTest() { + docRefPath_ = ""; + jsonData_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateTest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + docRefPath_ = s; + break; + } + case 18: + { + com.google.firestore.v1.Precondition.Builder subBuilder = null; + if (precondition_ != null) { + subBuilder = precondition_.toBuilder(); + } + precondition_ = + input.readMessage( + com.google.firestore.v1.Precondition.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(precondition_); + precondition_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + jsonData_ = s; + break; + } + case 34: + { + com.google.firestore.v1.CommitRequest.Builder subBuilder = null; + if (request_ != null) { + subBuilder = request_.toBuilder(); + } + request_ = + input.readMessage( + com.google.firestore.v1.CommitRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(request_); + request_ = subBuilder.buildPartial(); + } + + break; + } + case 40: + { + isError_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_UpdateTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_UpdateTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest.Builder.class); + } + + public static final int DOC_REF_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object docRefPath_; + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + public java.lang.String getDocRefPath() { + java.lang.Object ref = docRefPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docRefPath_ = s; + return s; + } + } + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + public com.google.protobuf.ByteString getDocRefPathBytes() { + java.lang.Object ref = docRefPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docRefPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRECONDITION_FIELD_NUMBER = 2; + private com.google.firestore.v1.Precondition precondition_; + /** + * + * + *
+     * precondition in call, if any
+     * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public boolean hasPrecondition() { + return precondition_ != null; + } + /** + * + * + *
+     * precondition in call, if any
+     * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public com.google.firestore.v1.Precondition getPrecondition() { + return precondition_ == null + ? com.google.firestore.v1.Precondition.getDefaultInstance() + : precondition_; + } + /** + * + * + *
+     * precondition in call, if any
+     * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public com.google.firestore.v1.PreconditionOrBuilder getPreconditionOrBuilder() { + return getPrecondition(); + } + + public static final int JSON_DATA_FIELD_NUMBER = 3; + private volatile java.lang.Object jsonData_; + /** + * + * + *
+     * data (see CreateTest.json_data)
+     * 
+ * + * string json_data = 3; + */ + public java.lang.String getJsonData() { + java.lang.Object ref = jsonData_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonData_ = s; + return s; + } + } + /** + * + * + *
+     * data (see CreateTest.json_data)
+     * 
+ * + * string json_data = 3; + */ + public com.google.protobuf.ByteString getJsonDataBytes() { + java.lang.Object ref = jsonData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jsonData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_FIELD_NUMBER = 4; + private com.google.firestore.v1.CommitRequest request_; + /** + * + * + *
+     * expected request
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public boolean hasRequest() { + return request_ != null; + } + /** + * + * + *
+     * expected request
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public com.google.firestore.v1.CommitRequest getRequest() { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } + /** + * + * + *
+     * expected request
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder() { + return getRequest(); + } + + public static final int IS_ERROR_FIELD_NUMBER = 5; + private boolean isError_; + /** + * + * + *
+     * call signals an error
+     * 
+ * + * bool is_error = 5; + */ + public boolean getIsError() { + return isError_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDocRefPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, docRefPath_); + } + if (precondition_ != null) { + output.writeMessage(2, getPrecondition()); + } + if (!getJsonDataBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, jsonData_); + } + if (request_ != null) { + output.writeMessage(4, getRequest()); + } + if (isError_ != false) { + output.writeBool(5, isError_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDocRefPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, docRefPath_); + } + if (precondition_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPrecondition()); + } + if (!getJsonDataBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, jsonData_); + } + if (request_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRequest()); + } + if (isError_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, isError_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest) obj; + + if (!getDocRefPath().equals(other.getDocRefPath())) return false; + if (hasPrecondition() != other.hasPrecondition()) return false; + if (hasPrecondition()) { + if (!getPrecondition().equals(other.getPrecondition())) return false; + } + if (!getJsonData().equals(other.getJsonData())) return false; + if (hasRequest() != other.hasRequest()) return false; + if (hasRequest()) { + if (!getRequest().equals(other.getRequest())) return false; + } + if (getIsError() != other.getIsError()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOC_REF_PATH_FIELD_NUMBER; + hash = (53 * hash) + getDocRefPath().hashCode(); + if (hasPrecondition()) { + hash = (37 * hash) + PRECONDITION_FIELD_NUMBER; + hash = (53 * hash) + getPrecondition().hashCode(); + } + hash = (37 * hash) + JSON_DATA_FIELD_NUMBER; + hash = (53 * hash) + getJsonData().hashCode(); + if (hasRequest()) { + hash = (37 * hash) + REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRequest().hashCode(); + } + hash = (37 * hash) + IS_ERROR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsError()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A call to the form of DocumentRef.Update that represents the data as a map
+     * or dictionary.
+     * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.UpdateTest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.UpdateTest) + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_UpdateTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_UpdateTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + docRefPath_ = ""; + + if (preconditionBuilder_ == null) { + precondition_ = null; + } else { + precondition_ = null; + preconditionBuilder_ = null; + } + jsonData_ = ""; + + if (requestBuilder_ == null) { + request_ = null; + } else { + request_ = null; + requestBuilder_ = null; + } + isError_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_UpdateTest_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest(this); + result.docRefPath_ = docRefPath_; + if (preconditionBuilder_ == null) { + result.precondition_ = precondition_; + } else { + result.precondition_ = preconditionBuilder_.build(); + } + result.jsonData_ = jsonData_; + if (requestBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = requestBuilder_.build(); + } + result.isError_ = isError_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + .getDefaultInstance()) return this; + if (!other.getDocRefPath().isEmpty()) { + docRefPath_ = other.docRefPath_; + onChanged(); + } + if (other.hasPrecondition()) { + mergePrecondition(other.getPrecondition()); + } + if (!other.getJsonData().isEmpty()) { + jsonData_ = other.jsonData_; + onChanged(); + } + if (other.hasRequest()) { + mergeRequest(other.getRequest()); + } + if (other.getIsError() != false) { + setIsError(other.getIsError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object docRefPath_ = ""; + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public java.lang.String getDocRefPath() { + java.lang.Object ref = docRefPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docRefPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public com.google.protobuf.ByteString getDocRefPathBytes() { + java.lang.Object ref = docRefPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docRefPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder setDocRefPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + docRefPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder clearDocRefPath() { + + docRefPath_ = getDefaultInstance().getDocRefPath(); + onChanged(); + return this; + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder setDocRefPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + docRefPath_ = value; + onChanged(); + return this; + } + + private com.google.firestore.v1.Precondition precondition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Precondition, + com.google.firestore.v1.Precondition.Builder, + com.google.firestore.v1.PreconditionOrBuilder> + preconditionBuilder_; + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public boolean hasPrecondition() { + return preconditionBuilder_ != null || precondition_ != null; + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public com.google.firestore.v1.Precondition getPrecondition() { + if (preconditionBuilder_ == null) { + return precondition_ == null + ? com.google.firestore.v1.Precondition.getDefaultInstance() + : precondition_; + } else { + return preconditionBuilder_.getMessage(); + } + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public Builder setPrecondition(com.google.firestore.v1.Precondition value) { + if (preconditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + precondition_ = value; + onChanged(); + } else { + preconditionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public Builder setPrecondition(com.google.firestore.v1.Precondition.Builder builderForValue) { + if (preconditionBuilder_ == null) { + precondition_ = builderForValue.build(); + onChanged(); + } else { + preconditionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public Builder mergePrecondition(com.google.firestore.v1.Precondition value) { + if (preconditionBuilder_ == null) { + if (precondition_ != null) { + precondition_ = + com.google.firestore.v1.Precondition.newBuilder(precondition_) + .mergeFrom(value) + .buildPartial(); + } else { + precondition_ = value; + } + onChanged(); + } else { + preconditionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public Builder clearPrecondition() { + if (preconditionBuilder_ == null) { + precondition_ = null; + onChanged(); + } else { + precondition_ = null; + preconditionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public com.google.firestore.v1.Precondition.Builder getPreconditionBuilder() { + + onChanged(); + return getPreconditionFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public com.google.firestore.v1.PreconditionOrBuilder getPreconditionOrBuilder() { + if (preconditionBuilder_ != null) { + return preconditionBuilder_.getMessageOrBuilder(); + } else { + return precondition_ == null + ? com.google.firestore.v1.Precondition.getDefaultInstance() + : precondition_; + } + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Precondition, + com.google.firestore.v1.Precondition.Builder, + com.google.firestore.v1.PreconditionOrBuilder> + getPreconditionFieldBuilder() { + if (preconditionBuilder_ == null) { + preconditionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Precondition, + com.google.firestore.v1.Precondition.Builder, + com.google.firestore.v1.PreconditionOrBuilder>( + getPrecondition(), getParentForChildren(), isClean()); + precondition_ = null; + } + return preconditionBuilder_; + } + + private java.lang.Object jsonData_ = ""; + /** + * + * + *
+       * data (see CreateTest.json_data)
+       * 
+ * + * string json_data = 3; + */ + public java.lang.String getJsonData() { + java.lang.Object ref = jsonData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * data (see CreateTest.json_data)
+       * 
+ * + * string json_data = 3; + */ + public com.google.protobuf.ByteString getJsonDataBytes() { + java.lang.Object ref = jsonData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jsonData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * data (see CreateTest.json_data)
+       * 
+ * + * string json_data = 3; + */ + public Builder setJsonData(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jsonData_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * data (see CreateTest.json_data)
+       * 
+ * + * string json_data = 3; + */ + public Builder clearJsonData() { + + jsonData_ = getDefaultInstance().getJsonData(); + onChanged(); + return this; + } + /** + * + * + *
+       * data (see CreateTest.json_data)
+       * 
+ * + * string json_data = 3; + */ + public Builder setJsonDataBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jsonData_ = value; + onChanged(); + return this; + } + + private com.google.firestore.v1.CommitRequest request_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder> + requestBuilder_; + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public boolean hasRequest() { + return requestBuilder_ != null || request_ != null; + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public com.google.firestore.v1.CommitRequest getRequest() { + if (requestBuilder_ == null) { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public Builder setRequest(com.google.firestore.v1.CommitRequest value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + requestBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public Builder setRequest(com.google.firestore.v1.CommitRequest.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public Builder mergeRequest(com.google.firestore.v1.CommitRequest value) { + if (requestBuilder_ == null) { + if (request_ != null) { + request_ = + com.google.firestore.v1.CommitRequest.newBuilder(request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + requestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = null; + onChanged(); + } else { + request_ = null; + requestBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public com.google.firestore.v1.CommitRequest.Builder getRequestBuilder() { + + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + public com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } + } + /** + * + * + *
+       * expected request
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder>( + getRequest(), getParentForChildren(), isClean()); + request_ = null; + } + return requestBuilder_; + } + + private boolean isError_; + /** + * + * + *
+       * call signals an error
+       * 
+ * + * bool is_error = 5; + */ + public boolean getIsError() { + return isError_; + } + /** + * + * + *
+       * call signals an error
+       * 
+ * + * bool is_error = 5; + */ + public Builder setIsError(boolean value) { + + isError_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * call signals an error
+       * 
+ * + * bool is_error = 5; + */ + public Builder clearIsError() { + + isError_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.UpdateTest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.UpdateTest) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateTest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateTest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdateTest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface UpdatePathsTestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.UpdatePathsTest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + java.lang.String getDocRefPath(); + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + com.google.protobuf.ByteString getDocRefPathBytes(); + + /** + * + * + *
+     * precondition in call, if any
+     * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + boolean hasPrecondition(); + /** + * + * + *
+     * precondition in call, if any
+     * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + com.google.firestore.v1.Precondition getPrecondition(); + /** + * + * + *
+     * precondition in call, if any
+     * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + com.google.firestore.v1.PreconditionOrBuilder getPreconditionOrBuilder(); + + /** + * + * + *
+     * parallel sequences: field_paths[i] corresponds to json_values[i]
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + java.util.List + getFieldPathsList(); + /** + * + * + *
+     * parallel sequences: field_paths[i] corresponds to json_values[i]
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getFieldPaths(int index); + /** + * + * + *
+     * parallel sequences: field_paths[i] corresponds to json_values[i]
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + int getFieldPathsCount(); + /** + * + * + *
+     * parallel sequences: field_paths[i] corresponds to json_values[i]
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + getFieldPathsOrBuilderList(); + /** + * + * + *
+     * parallel sequences: field_paths[i] corresponds to json_values[i]
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder + getFieldPathsOrBuilder(int index); + + /** + * + * + *
+     * the argument values, as JSON
+     * 
+ * + * repeated string json_values = 4; + */ + java.util.List getJsonValuesList(); + /** + * + * + *
+     * the argument values, as JSON
+     * 
+ * + * repeated string json_values = 4; + */ + int getJsonValuesCount(); + /** + * + * + *
+     * the argument values, as JSON
+     * 
+ * + * repeated string json_values = 4; + */ + java.lang.String getJsonValues(int index); + /** + * + * + *
+     * the argument values, as JSON
+     * 
+ * + * repeated string json_values = 4; + */ + com.google.protobuf.ByteString getJsonValuesBytes(int index); + + /** + * + * + *
+     * expected rquest
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + boolean hasRequest(); + /** + * + * + *
+     * expected rquest
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + com.google.firestore.v1.CommitRequest getRequest(); + /** + * + * + *
+     * expected rquest
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder(); + + /** + * + * + *
+     * call signals an error
+     * 
+ * + * bool is_error = 6; + */ + boolean getIsError(); + } + /** + * + * + *
+   * A call to the form of DocumentRef.Update that represents the data as a list
+   * of field paths and their values.
+   * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.UpdatePathsTest} + */ + public static final class UpdatePathsTest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.UpdatePathsTest) + UpdatePathsTestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdatePathsTest.newBuilder() to construct. + private UpdatePathsTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdatePathsTest() { + docRefPath_ = ""; + fieldPaths_ = java.util.Collections.emptyList(); + jsonValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdatePathsTest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + docRefPath_ = s; + break; + } + case 18: + { + com.google.firestore.v1.Precondition.Builder subBuilder = null; + if (precondition_ != null) { + subBuilder = precondition_.toBuilder(); + } + precondition_ = + input.readMessage( + com.google.firestore.v1.Precondition.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(precondition_); + precondition_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + fieldPaths_ = + new java.util.ArrayList< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath>(); + mutable_bitField0_ |= 0x00000004; + } + fieldPaths_.add( + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.parser(), + extensionRegistry)); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000008) != 0)) { + jsonValues_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000008; + } + jsonValues_.add(s); + break; + } + case 42: + { + com.google.firestore.v1.CommitRequest.Builder subBuilder = null; + if (request_ != null) { + subBuilder = request_.toBuilder(); + } + request_ = + input.readMessage( + com.google.firestore.v1.CommitRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(request_); + request_ = subBuilder.buildPartial(); + } + + break; + } + case 48: + { + isError_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000004) != 0)) { + fieldPaths_ = java.util.Collections.unmodifiableList(fieldPaths_); + } + if (((mutable_bitField0_ & 0x00000008) != 0)) { + jsonValues_ = jsonValues_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_UpdatePathsTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_UpdatePathsTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest.Builder + .class); + } + + private int bitField0_; + public static final int DOC_REF_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object docRefPath_; + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + public java.lang.String getDocRefPath() { + java.lang.Object ref = docRefPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docRefPath_ = s; + return s; + } + } + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + public com.google.protobuf.ByteString getDocRefPathBytes() { + java.lang.Object ref = docRefPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docRefPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRECONDITION_FIELD_NUMBER = 2; + private com.google.firestore.v1.Precondition precondition_; + /** + * + * + *
+     * precondition in call, if any
+     * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public boolean hasPrecondition() { + return precondition_ != null; + } + /** + * + * + *
+     * precondition in call, if any
+     * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public com.google.firestore.v1.Precondition getPrecondition() { + return precondition_ == null + ? com.google.firestore.v1.Precondition.getDefaultInstance() + : precondition_; + } + /** + * + * + *
+     * precondition in call, if any
+     * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public com.google.firestore.v1.PreconditionOrBuilder getPreconditionOrBuilder() { + return getPrecondition(); + } + + public static final int FIELD_PATHS_FIELD_NUMBER = 3; + private java.util.List + fieldPaths_; + /** + * + * + *
+     * parallel sequences: field_paths[i] corresponds to json_values[i]
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public java.util.List + getFieldPathsList() { + return fieldPaths_; + } + /** + * + * + *
+     * parallel sequences: field_paths[i] corresponds to json_values[i]
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + getFieldPathsOrBuilderList() { + return fieldPaths_; + } + /** + * + * + *
+     * parallel sequences: field_paths[i] corresponds to json_values[i]
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public int getFieldPathsCount() { + return fieldPaths_.size(); + } + /** + * + * + *
+     * parallel sequences: field_paths[i] corresponds to json_values[i]
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getFieldPaths( + int index) { + return fieldPaths_.get(index); + } + /** + * + * + *
+     * parallel sequences: field_paths[i] corresponds to json_values[i]
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder + getFieldPathsOrBuilder(int index) { + return fieldPaths_.get(index); + } + + public static final int JSON_VALUES_FIELD_NUMBER = 4; + private com.google.protobuf.LazyStringList jsonValues_; + /** + * + * + *
+     * the argument values, as JSON
+     * 
+ * + * repeated string json_values = 4; + */ + public com.google.protobuf.ProtocolStringList getJsonValuesList() { + return jsonValues_; + } + /** + * + * + *
+     * the argument values, as JSON
+     * 
+ * + * repeated string json_values = 4; + */ + public int getJsonValuesCount() { + return jsonValues_.size(); + } + /** + * + * + *
+     * the argument values, as JSON
+     * 
+ * + * repeated string json_values = 4; + */ + public java.lang.String getJsonValues(int index) { + return jsonValues_.get(index); + } + /** + * + * + *
+     * the argument values, as JSON
+     * 
+ * + * repeated string json_values = 4; + */ + public com.google.protobuf.ByteString getJsonValuesBytes(int index) { + return jsonValues_.getByteString(index); + } + + public static final int REQUEST_FIELD_NUMBER = 5; + private com.google.firestore.v1.CommitRequest request_; + /** + * + * + *
+     * expected rquest
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + public boolean hasRequest() { + return request_ != null; + } + /** + * + * + *
+     * expected rquest
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + public com.google.firestore.v1.CommitRequest getRequest() { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } + /** + * + * + *
+     * expected rquest
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + public com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder() { + return getRequest(); + } + + public static final int IS_ERROR_FIELD_NUMBER = 6; + private boolean isError_; + /** + * + * + *
+     * call signals an error
+     * 
+ * + * bool is_error = 6; + */ + public boolean getIsError() { + return isError_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDocRefPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, docRefPath_); + } + if (precondition_ != null) { + output.writeMessage(2, getPrecondition()); + } + for (int i = 0; i < fieldPaths_.size(); i++) { + output.writeMessage(3, fieldPaths_.get(i)); + } + for (int i = 0; i < jsonValues_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, jsonValues_.getRaw(i)); + } + if (request_ != null) { + output.writeMessage(5, getRequest()); + } + if (isError_ != false) { + output.writeBool(6, isError_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDocRefPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, docRefPath_); + } + if (precondition_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPrecondition()); + } + for (int i = 0; i < fieldPaths_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, fieldPaths_.get(i)); + } + { + int dataSize = 0; + for (int i = 0; i < jsonValues_.size(); i++) { + dataSize += computeStringSizeNoTag(jsonValues_.getRaw(i)); + } + size += dataSize; + size += 1 * getJsonValuesList().size(); + } + if (request_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRequest()); + } + if (isError_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, isError_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest) obj; + + if (!getDocRefPath().equals(other.getDocRefPath())) return false; + if (hasPrecondition() != other.hasPrecondition()) return false; + if (hasPrecondition()) { + if (!getPrecondition().equals(other.getPrecondition())) return false; + } + if (!getFieldPathsList().equals(other.getFieldPathsList())) return false; + if (!getJsonValuesList().equals(other.getJsonValuesList())) return false; + if (hasRequest() != other.hasRequest()) return false; + if (hasRequest()) { + if (!getRequest().equals(other.getRequest())) return false; + } + if (getIsError() != other.getIsError()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOC_REF_PATH_FIELD_NUMBER; + hash = (53 * hash) + getDocRefPath().hashCode(); + if (hasPrecondition()) { + hash = (37 * hash) + PRECONDITION_FIELD_NUMBER; + hash = (53 * hash) + getPrecondition().hashCode(); + } + if (getFieldPathsCount() > 0) { + hash = (37 * hash) + FIELD_PATHS_FIELD_NUMBER; + hash = (53 * hash) + getFieldPathsList().hashCode(); + } + if (getJsonValuesCount() > 0) { + hash = (37 * hash) + JSON_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getJsonValuesList().hashCode(); + } + if (hasRequest()) { + hash = (37 * hash) + REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRequest().hashCode(); + } + hash = (37 * hash) + IS_ERROR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsError()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A call to the form of DocumentRef.Update that represents the data as a list
+     * of field paths and their values.
+     * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.UpdatePathsTest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.UpdatePathsTest) + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_UpdatePathsTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_UpdatePathsTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest.Builder + .class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFieldPathsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + docRefPath_ = ""; + + if (preconditionBuilder_ == null) { + precondition_ = null; + } else { + precondition_ = null; + preconditionBuilder_ = null; + } + if (fieldPathsBuilder_ == null) { + fieldPaths_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + } else { + fieldPathsBuilder_.clear(); + } + jsonValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + if (requestBuilder_ == null) { + request_ = null; + } else { + request_ = null; + requestBuilder_ = null; + } + isError_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_UpdatePathsTest_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.docRefPath_ = docRefPath_; + if (preconditionBuilder_ == null) { + result.precondition_ = precondition_; + } else { + result.precondition_ = preconditionBuilder_.build(); + } + if (fieldPathsBuilder_ == null) { + if (((bitField0_ & 0x00000004) != 0)) { + fieldPaths_ = java.util.Collections.unmodifiableList(fieldPaths_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.fieldPaths_ = fieldPaths_; + } else { + result.fieldPaths_ = fieldPathsBuilder_.build(); + } + if (((bitField0_ & 0x00000008) != 0)) { + jsonValues_ = jsonValues_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000008); + } + result.jsonValues_ = jsonValues_; + if (requestBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = requestBuilder_.build(); + } + result.isError_ = isError_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + .getDefaultInstance()) return this; + if (!other.getDocRefPath().isEmpty()) { + docRefPath_ = other.docRefPath_; + onChanged(); + } + if (other.hasPrecondition()) { + mergePrecondition(other.getPrecondition()); + } + if (fieldPathsBuilder_ == null) { + if (!other.fieldPaths_.isEmpty()) { + if (fieldPaths_.isEmpty()) { + fieldPaths_ = other.fieldPaths_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureFieldPathsIsMutable(); + fieldPaths_.addAll(other.fieldPaths_); + } + onChanged(); + } + } else { + if (!other.fieldPaths_.isEmpty()) { + if (fieldPathsBuilder_.isEmpty()) { + fieldPathsBuilder_.dispose(); + fieldPathsBuilder_ = null; + fieldPaths_ = other.fieldPaths_; + bitField0_ = (bitField0_ & ~0x00000004); + fieldPathsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFieldPathsFieldBuilder() + : null; + } else { + fieldPathsBuilder_.addAllMessages(other.fieldPaths_); + } + } + } + if (!other.jsonValues_.isEmpty()) { + if (jsonValues_.isEmpty()) { + jsonValues_ = other.jsonValues_; + bitField0_ = (bitField0_ & ~0x00000008); + } else { + ensureJsonValuesIsMutable(); + jsonValues_.addAll(other.jsonValues_); + } + onChanged(); + } + if (other.hasRequest()) { + mergeRequest(other.getRequest()); + } + if (other.getIsError() != false) { + setIsError(other.getIsError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object docRefPath_ = ""; + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public java.lang.String getDocRefPath() { + java.lang.Object ref = docRefPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docRefPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public com.google.protobuf.ByteString getDocRefPathBytes() { + java.lang.Object ref = docRefPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docRefPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder setDocRefPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + docRefPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder clearDocRefPath() { + + docRefPath_ = getDefaultInstance().getDocRefPath(); + onChanged(); + return this; + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder setDocRefPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + docRefPath_ = value; + onChanged(); + return this; + } + + private com.google.firestore.v1.Precondition precondition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Precondition, + com.google.firestore.v1.Precondition.Builder, + com.google.firestore.v1.PreconditionOrBuilder> + preconditionBuilder_; + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public boolean hasPrecondition() { + return preconditionBuilder_ != null || precondition_ != null; + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public com.google.firestore.v1.Precondition getPrecondition() { + if (preconditionBuilder_ == null) { + return precondition_ == null + ? com.google.firestore.v1.Precondition.getDefaultInstance() + : precondition_; + } else { + return preconditionBuilder_.getMessage(); + } + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public Builder setPrecondition(com.google.firestore.v1.Precondition value) { + if (preconditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + precondition_ = value; + onChanged(); + } else { + preconditionBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public Builder setPrecondition(com.google.firestore.v1.Precondition.Builder builderForValue) { + if (preconditionBuilder_ == null) { + precondition_ = builderForValue.build(); + onChanged(); + } else { + preconditionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public Builder mergePrecondition(com.google.firestore.v1.Precondition value) { + if (preconditionBuilder_ == null) { + if (precondition_ != null) { + precondition_ = + com.google.firestore.v1.Precondition.newBuilder(precondition_) + .mergeFrom(value) + .buildPartial(); + } else { + precondition_ = value; + } + onChanged(); + } else { + preconditionBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public Builder clearPrecondition() { + if (preconditionBuilder_ == null) { + precondition_ = null; + onChanged(); + } else { + precondition_ = null; + preconditionBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public com.google.firestore.v1.Precondition.Builder getPreconditionBuilder() { + + onChanged(); + return getPreconditionFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + public com.google.firestore.v1.PreconditionOrBuilder getPreconditionOrBuilder() { + if (preconditionBuilder_ != null) { + return preconditionBuilder_.getMessageOrBuilder(); + } else { + return precondition_ == null + ? com.google.firestore.v1.Precondition.getDefaultInstance() + : precondition_; + } + } + /** + * + * + *
+       * precondition in call, if any
+       * 
+ * + * .google.firestore.v1.Precondition precondition = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Precondition, + com.google.firestore.v1.Precondition.Builder, + com.google.firestore.v1.PreconditionOrBuilder> + getPreconditionFieldBuilder() { + if (preconditionBuilder_ == null) { + preconditionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Precondition, + com.google.firestore.v1.Precondition.Builder, + com.google.firestore.v1.PreconditionOrBuilder>( + getPrecondition(), getParentForChildren(), isClean()); + precondition_ = null; + } + return preconditionBuilder_; + } + + private java.util.List + fieldPaths_ = java.util.Collections.emptyList(); + + private void ensureFieldPathsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + fieldPaths_ = + new java.util.ArrayList< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath>(fieldPaths_); + bitField0_ |= 0x00000004; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + fieldPathsBuilder_; + + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public java.util.List + getFieldPathsList() { + if (fieldPathsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fieldPaths_); + } else { + return fieldPathsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public int getFieldPathsCount() { + if (fieldPathsBuilder_ == null) { + return fieldPaths_.size(); + } else { + return fieldPathsBuilder_.getCount(); + } + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getFieldPaths( + int index) { + if (fieldPathsBuilder_ == null) { + return fieldPaths_.get(index); + } else { + return fieldPathsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public Builder setFieldPaths( + int index, com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath value) { + if (fieldPathsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldPathsIsMutable(); + fieldPaths_.set(index, value); + onChanged(); + } else { + fieldPathsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public Builder setFieldPaths( + int index, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + builderForValue) { + if (fieldPathsBuilder_ == null) { + ensureFieldPathsIsMutable(); + fieldPaths_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldPathsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public Builder addFieldPaths( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath value) { + if (fieldPathsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldPathsIsMutable(); + fieldPaths_.add(value); + onChanged(); + } else { + fieldPathsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public Builder addFieldPaths( + int index, com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath value) { + if (fieldPathsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldPathsIsMutable(); + fieldPaths_.add(index, value); + onChanged(); + } else { + fieldPathsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public Builder addFieldPaths( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + builderForValue) { + if (fieldPathsBuilder_ == null) { + ensureFieldPathsIsMutable(); + fieldPaths_.add(builderForValue.build()); + onChanged(); + } else { + fieldPathsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public Builder addFieldPaths( + int index, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + builderForValue) { + if (fieldPathsBuilder_ == null) { + ensureFieldPathsIsMutable(); + fieldPaths_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldPathsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public Builder addAllFieldPaths( + java.lang.Iterable< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath> + values) { + if (fieldPathsBuilder_ == null) { + ensureFieldPathsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fieldPaths_); + onChanged(); + } else { + fieldPathsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public Builder clearFieldPaths() { + if (fieldPathsBuilder_ == null) { + fieldPaths_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + } else { + fieldPathsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public Builder removeFieldPaths(int index) { + if (fieldPathsBuilder_ == null) { + ensureFieldPathsIsMutable(); + fieldPaths_.remove(index); + onChanged(); + } else { + fieldPathsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + getFieldPathsBuilder(int index) { + return getFieldPathsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder + getFieldPathsOrBuilder(int index) { + if (fieldPathsBuilder_ == null) { + return fieldPaths_.get(index); + } else { + return fieldPathsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + getFieldPathsOrBuilderList() { + if (fieldPathsBuilder_ != null) { + return fieldPathsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fieldPaths_); + } + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + addFieldPathsBuilder() { + return getFieldPathsFieldBuilder() + .addBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + .getDefaultInstance()); + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + addFieldPathsBuilder(int index) { + return getFieldPathsFieldBuilder() + .addBuilder( + index, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + .getDefaultInstance()); + } + /** + * + * + *
+       * parallel sequences: field_paths[i] corresponds to json_values[i]
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath field_paths = 3; + */ + public java.util.List< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder> + getFieldPathsBuilderList() { + return getFieldPathsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + getFieldPathsFieldBuilder() { + if (fieldPathsBuilder_ == null) { + fieldPathsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder>( + fieldPaths_, ((bitField0_ & 0x00000004) != 0), getParentForChildren(), isClean()); + fieldPaths_ = null; + } + return fieldPathsBuilder_; + } + + private com.google.protobuf.LazyStringList jsonValues_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureJsonValuesIsMutable() { + if (!((bitField0_ & 0x00000008) != 0)) { + jsonValues_ = new com.google.protobuf.LazyStringArrayList(jsonValues_); + bitField0_ |= 0x00000008; + } + } + /** + * + * + *
+       * the argument values, as JSON
+       * 
+ * + * repeated string json_values = 4; + */ + public com.google.protobuf.ProtocolStringList getJsonValuesList() { + return jsonValues_.getUnmodifiableView(); + } + /** + * + * + *
+       * the argument values, as JSON
+       * 
+ * + * repeated string json_values = 4; + */ + public int getJsonValuesCount() { + return jsonValues_.size(); + } + /** + * + * + *
+       * the argument values, as JSON
+       * 
+ * + * repeated string json_values = 4; + */ + public java.lang.String getJsonValues(int index) { + return jsonValues_.get(index); + } + /** + * + * + *
+       * the argument values, as JSON
+       * 
+ * + * repeated string json_values = 4; + */ + public com.google.protobuf.ByteString getJsonValuesBytes(int index) { + return jsonValues_.getByteString(index); + } + /** + * + * + *
+       * the argument values, as JSON
+       * 
+ * + * repeated string json_values = 4; + */ + public Builder setJsonValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureJsonValuesIsMutable(); + jsonValues_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * the argument values, as JSON
+       * 
+ * + * repeated string json_values = 4; + */ + public Builder addJsonValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureJsonValuesIsMutable(); + jsonValues_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * the argument values, as JSON
+       * 
+ * + * repeated string json_values = 4; + */ + public Builder addAllJsonValues(java.lang.Iterable values) { + ensureJsonValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jsonValues_); + onChanged(); + return this; + } + /** + * + * + *
+       * the argument values, as JSON
+       * 
+ * + * repeated string json_values = 4; + */ + public Builder clearJsonValues() { + jsonValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000008); + onChanged(); + return this; + } + /** + * + * + *
+       * the argument values, as JSON
+       * 
+ * + * repeated string json_values = 4; + */ + public Builder addJsonValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureJsonValuesIsMutable(); + jsonValues_.add(value); + onChanged(); + return this; + } + + private com.google.firestore.v1.CommitRequest request_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder> + requestBuilder_; + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + public boolean hasRequest() { + return requestBuilder_ != null || request_ != null; + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + public com.google.firestore.v1.CommitRequest getRequest() { + if (requestBuilder_ == null) { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + public Builder setRequest(com.google.firestore.v1.CommitRequest value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + requestBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + public Builder setRequest(com.google.firestore.v1.CommitRequest.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + public Builder mergeRequest(com.google.firestore.v1.CommitRequest value) { + if (requestBuilder_ == null) { + if (request_ != null) { + request_ = + com.google.firestore.v1.CommitRequest.newBuilder(request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + requestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = null; + onChanged(); + } else { + request_ = null; + requestBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + public com.google.firestore.v1.CommitRequest.Builder getRequestBuilder() { + + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + public com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder>( + getRequest(), getParentForChildren(), isClean()); + request_ = null; + } + return requestBuilder_; + } + + private boolean isError_; + /** + * + * + *
+       * call signals an error
+       * 
+ * + * bool is_error = 6; + */ + public boolean getIsError() { + return isError_; + } + /** + * + * + *
+       * call signals an error
+       * 
+ * + * bool is_error = 6; + */ + public Builder setIsError(boolean value) { + + isError_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * call signals an error
+       * 
+ * + * bool is_error = 6; + */ + public Builder clearIsError() { + + isError_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.UpdatePathsTest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.UpdatePathsTest) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdatePathsTest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdatePathsTest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.UpdatePathsTest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeleteTestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.DeleteTest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + java.lang.String getDocRefPath(); + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + com.google.protobuf.ByteString getDocRefPathBytes(); + + /** .google.firestore.v1.Precondition precondition = 2; */ + boolean hasPrecondition(); + /** .google.firestore.v1.Precondition precondition = 2; */ + com.google.firestore.v1.Precondition getPrecondition(); + /** .google.firestore.v1.Precondition precondition = 2; */ + com.google.firestore.v1.PreconditionOrBuilder getPreconditionOrBuilder(); + + /** + * + * + *
+     * expected rquest
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + boolean hasRequest(); + /** + * + * + *
+     * expected rquest
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + com.google.firestore.v1.CommitRequest getRequest(); + /** + * + * + *
+     * expected rquest
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder(); + + /** + * + * + *
+     * call signals an error
+     * 
+ * + * bool is_error = 4; + */ + boolean getIsError(); + } + /** + * + * + *
+   * A call to DocmentRef.Delete
+   * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.DeleteTest} + */ + public static final class DeleteTest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.DeleteTest) + DeleteTestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteTest.newBuilder() to construct. + private DeleteTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteTest() { + docRefPath_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteTest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + docRefPath_ = s; + break; + } + case 18: + { + com.google.firestore.v1.Precondition.Builder subBuilder = null; + if (precondition_ != null) { + subBuilder = precondition_.toBuilder(); + } + precondition_ = + input.readMessage( + com.google.firestore.v1.Precondition.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(precondition_); + precondition_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.firestore.v1.CommitRequest.Builder subBuilder = null; + if (request_ != null) { + subBuilder = request_.toBuilder(); + } + request_ = + input.readMessage( + com.google.firestore.v1.CommitRequest.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(request_); + request_ = subBuilder.buildPartial(); + } + + break; + } + case 32: + { + isError_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DeleteTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DeleteTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest.Builder.class); + } + + public static final int DOC_REF_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object docRefPath_; + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + public java.lang.String getDocRefPath() { + java.lang.Object ref = docRefPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docRefPath_ = s; + return s; + } + } + /** + * + * + *
+     * path of doc
+     * 
+ * + * string doc_ref_path = 1; + */ + public com.google.protobuf.ByteString getDocRefPathBytes() { + java.lang.Object ref = docRefPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docRefPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRECONDITION_FIELD_NUMBER = 2; + private com.google.firestore.v1.Precondition precondition_; + /** .google.firestore.v1.Precondition precondition = 2; */ + public boolean hasPrecondition() { + return precondition_ != null; + } + /** .google.firestore.v1.Precondition precondition = 2; */ + public com.google.firestore.v1.Precondition getPrecondition() { + return precondition_ == null + ? com.google.firestore.v1.Precondition.getDefaultInstance() + : precondition_; + } + /** .google.firestore.v1.Precondition precondition = 2; */ + public com.google.firestore.v1.PreconditionOrBuilder getPreconditionOrBuilder() { + return getPrecondition(); + } + + public static final int REQUEST_FIELD_NUMBER = 3; + private com.google.firestore.v1.CommitRequest request_; + /** + * + * + *
+     * expected rquest
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public boolean hasRequest() { + return request_ != null; + } + /** + * + * + *
+     * expected rquest
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public com.google.firestore.v1.CommitRequest getRequest() { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } + /** + * + * + *
+     * expected rquest
+     * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder() { + return getRequest(); + } + + public static final int IS_ERROR_FIELD_NUMBER = 4; + private boolean isError_; + /** + * + * + *
+     * call signals an error
+     * 
+ * + * bool is_error = 4; + */ + public boolean getIsError() { + return isError_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDocRefPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, docRefPath_); + } + if (precondition_ != null) { + output.writeMessage(2, getPrecondition()); + } + if (request_ != null) { + output.writeMessage(3, getRequest()); + } + if (isError_ != false) { + output.writeBool(4, isError_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDocRefPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, docRefPath_); + } + if (precondition_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPrecondition()); + } + if (request_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getRequest()); + } + if (isError_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, isError_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest) obj; + + if (!getDocRefPath().equals(other.getDocRefPath())) return false; + if (hasPrecondition() != other.hasPrecondition()) return false; + if (hasPrecondition()) { + if (!getPrecondition().equals(other.getPrecondition())) return false; + } + if (hasRequest() != other.hasRequest()) return false; + if (hasRequest()) { + if (!getRequest().equals(other.getRequest())) return false; + } + if (getIsError() != other.getIsError()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DOC_REF_PATH_FIELD_NUMBER; + hash = (53 * hash) + getDocRefPath().hashCode(); + if (hasPrecondition()) { + hash = (37 * hash) + PRECONDITION_FIELD_NUMBER; + hash = (53 * hash) + getPrecondition().hashCode(); + } + if (hasRequest()) { + hash = (37 * hash) + REQUEST_FIELD_NUMBER; + hash = (53 * hash) + getRequest().hashCode(); + } + hash = (37 * hash) + IS_ERROR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsError()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A call to DocmentRef.Delete
+     * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.DeleteTest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.DeleteTest) + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DeleteTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DeleteTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + docRefPath_ = ""; + + if (preconditionBuilder_ == null) { + precondition_ = null; + } else { + precondition_ = null; + preconditionBuilder_ = null; + } + if (requestBuilder_ == null) { + request_ = null; + } else { + request_ = null; + requestBuilder_ = null; + } + isError_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DeleteTest_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest(this); + result.docRefPath_ = docRefPath_; + if (preconditionBuilder_ == null) { + result.precondition_ = precondition_; + } else { + result.precondition_ = preconditionBuilder_.build(); + } + if (requestBuilder_ == null) { + result.request_ = request_; + } else { + result.request_ = requestBuilder_.build(); + } + result.isError_ = isError_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + .getDefaultInstance()) return this; + if (!other.getDocRefPath().isEmpty()) { + docRefPath_ = other.docRefPath_; + onChanged(); + } + if (other.hasPrecondition()) { + mergePrecondition(other.getPrecondition()); + } + if (other.hasRequest()) { + mergeRequest(other.getRequest()); + } + if (other.getIsError() != false) { + setIsError(other.getIsError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object docRefPath_ = ""; + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public java.lang.String getDocRefPath() { + java.lang.Object ref = docRefPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + docRefPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public com.google.protobuf.ByteString getDocRefPathBytes() { + java.lang.Object ref = docRefPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + docRefPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder setDocRefPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + docRefPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder clearDocRefPath() { + + docRefPath_ = getDefaultInstance().getDocRefPath(); + onChanged(); + return this; + } + /** + * + * + *
+       * path of doc
+       * 
+ * + * string doc_ref_path = 1; + */ + public Builder setDocRefPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + docRefPath_ = value; + onChanged(); + return this; + } + + private com.google.firestore.v1.Precondition precondition_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Precondition, + com.google.firestore.v1.Precondition.Builder, + com.google.firestore.v1.PreconditionOrBuilder> + preconditionBuilder_; + /** .google.firestore.v1.Precondition precondition = 2; */ + public boolean hasPrecondition() { + return preconditionBuilder_ != null || precondition_ != null; + } + /** .google.firestore.v1.Precondition precondition = 2; */ + public com.google.firestore.v1.Precondition getPrecondition() { + if (preconditionBuilder_ == null) { + return precondition_ == null + ? com.google.firestore.v1.Precondition.getDefaultInstance() + : precondition_; + } else { + return preconditionBuilder_.getMessage(); + } + } + /** .google.firestore.v1.Precondition precondition = 2; */ + public Builder setPrecondition(com.google.firestore.v1.Precondition value) { + if (preconditionBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + precondition_ = value; + onChanged(); + } else { + preconditionBuilder_.setMessage(value); + } + + return this; + } + /** .google.firestore.v1.Precondition precondition = 2; */ + public Builder setPrecondition(com.google.firestore.v1.Precondition.Builder builderForValue) { + if (preconditionBuilder_ == null) { + precondition_ = builderForValue.build(); + onChanged(); + } else { + preconditionBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .google.firestore.v1.Precondition precondition = 2; */ + public Builder mergePrecondition(com.google.firestore.v1.Precondition value) { + if (preconditionBuilder_ == null) { + if (precondition_ != null) { + precondition_ = + com.google.firestore.v1.Precondition.newBuilder(precondition_) + .mergeFrom(value) + .buildPartial(); + } else { + precondition_ = value; + } + onChanged(); + } else { + preconditionBuilder_.mergeFrom(value); + } + + return this; + } + /** .google.firestore.v1.Precondition precondition = 2; */ + public Builder clearPrecondition() { + if (preconditionBuilder_ == null) { + precondition_ = null; + onChanged(); + } else { + precondition_ = null; + preconditionBuilder_ = null; + } + + return this; + } + /** .google.firestore.v1.Precondition precondition = 2; */ + public com.google.firestore.v1.Precondition.Builder getPreconditionBuilder() { + + onChanged(); + return getPreconditionFieldBuilder().getBuilder(); + } + /** .google.firestore.v1.Precondition precondition = 2; */ + public com.google.firestore.v1.PreconditionOrBuilder getPreconditionOrBuilder() { + if (preconditionBuilder_ != null) { + return preconditionBuilder_.getMessageOrBuilder(); + } else { + return precondition_ == null + ? com.google.firestore.v1.Precondition.getDefaultInstance() + : precondition_; + } + } + /** .google.firestore.v1.Precondition precondition = 2; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Precondition, + com.google.firestore.v1.Precondition.Builder, + com.google.firestore.v1.PreconditionOrBuilder> + getPreconditionFieldBuilder() { + if (preconditionBuilder_ == null) { + preconditionBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Precondition, + com.google.firestore.v1.Precondition.Builder, + com.google.firestore.v1.PreconditionOrBuilder>( + getPrecondition(), getParentForChildren(), isClean()); + precondition_ = null; + } + return preconditionBuilder_; + } + + private com.google.firestore.v1.CommitRequest request_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder> + requestBuilder_; + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public boolean hasRequest() { + return requestBuilder_ != null || request_ != null; + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public com.google.firestore.v1.CommitRequest getRequest() { + if (requestBuilder_ == null) { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } else { + return requestBuilder_.getMessage(); + } + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public Builder setRequest(com.google.firestore.v1.CommitRequest value) { + if (requestBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + request_ = value; + onChanged(); + } else { + requestBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public Builder setRequest(com.google.firestore.v1.CommitRequest.Builder builderForValue) { + if (requestBuilder_ == null) { + request_ = builderForValue.build(); + onChanged(); + } else { + requestBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public Builder mergeRequest(com.google.firestore.v1.CommitRequest value) { + if (requestBuilder_ == null) { + if (request_ != null) { + request_ = + com.google.firestore.v1.CommitRequest.newBuilder(request_) + .mergeFrom(value) + .buildPartial(); + } else { + request_ = value; + } + onChanged(); + } else { + requestBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public Builder clearRequest() { + if (requestBuilder_ == null) { + request_ = null; + onChanged(); + } else { + request_ = null; + requestBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public com.google.firestore.v1.CommitRequest.Builder getRequestBuilder() { + + onChanged(); + return getRequestFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + public com.google.firestore.v1.CommitRequestOrBuilder getRequestOrBuilder() { + if (requestBuilder_ != null) { + return requestBuilder_.getMessageOrBuilder(); + } else { + return request_ == null + ? com.google.firestore.v1.CommitRequest.getDefaultInstance() + : request_; + } + } + /** + * + * + *
+       * expected rquest
+       * 
+ * + * .google.firestore.v1.CommitRequest request = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder> + getRequestFieldBuilder() { + if (requestBuilder_ == null) { + requestBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.CommitRequest, + com.google.firestore.v1.CommitRequest.Builder, + com.google.firestore.v1.CommitRequestOrBuilder>( + getRequest(), getParentForChildren(), isClean()); + request_ = null; + } + return requestBuilder_; + } + + private boolean isError_; + /** + * + * + *
+       * call signals an error
+       * 
+ * + * bool is_error = 4; + */ + public boolean getIsError() { + return isError_; + } + /** + * + * + *
+       * call signals an error
+       * 
+ * + * bool is_error = 4; + */ + public Builder setIsError(boolean value) { + + isError_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * call signals an error
+       * 
+ * + * bool is_error = 4; + */ + public Builder clearIsError() { + + isError_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.DeleteTest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.DeleteTest) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteTest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteTest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.DeleteTest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SetOptionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.SetOption) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * if true, merge all fields ("fields" is ignored).
+     * 
+ * + * bool all = 1; + */ + boolean getAll(); + + /** + * + * + *
+     * field paths for a Merge option
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + java.util.List + getFieldsList(); + /** + * + * + *
+     * field paths for a Merge option
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getFields(int index); + /** + * + * + *
+     * field paths for a Merge option
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + int getFieldsCount(); + /** + * + * + *
+     * field paths for a Merge option
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + getFieldsOrBuilderList(); + /** + * + * + *
+     * field paths for a Merge option
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder getFieldsOrBuilder( + int index); + } + /** + * + * + *
+   * An option to the DocumentRef.Set call.
+   * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.SetOption} + */ + public static final class SetOption extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.SetOption) + SetOptionOrBuilder { + private static final long serialVersionUID = 0L; + // Use SetOption.newBuilder() to construct. + private SetOption(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SetOption() { + fields_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SetOption( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + all_ = input.readBool(); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + fields_ = + new java.util.ArrayList< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath>(); + mutable_bitField0_ |= 0x00000002; + } + fields_.add( + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_SetOption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_SetOption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption.Builder.class); + } + + private int bitField0_; + public static final int ALL_FIELD_NUMBER = 1; + private boolean all_; + /** + * + * + *
+     * if true, merge all fields ("fields" is ignored).
+     * 
+ * + * bool all = 1; + */ + public boolean getAll() { + return all_; + } + + public static final int FIELDS_FIELD_NUMBER = 2; + private java.util.List + fields_; + /** + * + * + *
+     * field paths for a Merge option
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public java.util.List + getFieldsList() { + return fields_; + } + /** + * + * + *
+     * field paths for a Merge option
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + getFieldsOrBuilderList() { + return fields_; + } + /** + * + * + *
+     * field paths for a Merge option
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public int getFieldsCount() { + return fields_.size(); + } + /** + * + * + *
+     * field paths for a Merge option
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getFields(int index) { + return fields_.get(index); + } + /** + * + * + *
+     * field paths for a Merge option
+     * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder + getFieldsOrBuilder(int index) { + return fields_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (all_ != false) { + output.writeBool(1, all_); + } + for (int i = 0; i < fields_.size(); i++) { + output.writeMessage(2, fields_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (all_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, all_); + } + for (int i = 0; i < fields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, fields_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption) obj; + + if (getAll() != other.getAll()) return false; + if (!getFieldsList().equals(other.getFieldsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ALL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAll()); + if (getFieldsCount() > 0) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getFieldsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * An option to the DocumentRef.Set call.
+     * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.SetOption} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.SetOption) + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOptionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_SetOption_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_SetOption_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFieldsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + all_ = false; + + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + fieldsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_SetOption_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.all_ = all_; + if (fieldsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.fields_ = fields_; + } else { + result.fields_ = fieldsBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption + .getDefaultInstance()) return this; + if (other.getAll() != false) { + setAll(other.getAll()); + } + if (fieldsBuilder_ == null) { + if (!other.fields_.isEmpty()) { + if (fields_.isEmpty()) { + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureFieldsIsMutable(); + fields_.addAll(other.fields_); + } + onChanged(); + } + } else { + if (!other.fields_.isEmpty()) { + if (fieldsBuilder_.isEmpty()) { + fieldsBuilder_.dispose(); + fieldsBuilder_ = null; + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000002); + fieldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFieldsFieldBuilder() + : null; + } else { + fieldsBuilder_.addAllMessages(other.fields_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private boolean all_; + /** + * + * + *
+       * if true, merge all fields ("fields" is ignored).
+       * 
+ * + * bool all = 1; + */ + public boolean getAll() { + return all_; + } + /** + * + * + *
+       * if true, merge all fields ("fields" is ignored).
+       * 
+ * + * bool all = 1; + */ + public Builder setAll(boolean value) { + + all_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * if true, merge all fields ("fields" is ignored).
+       * 
+ * + * bool all = 1; + */ + public Builder clearAll() { + + all_ = false; + onChanged(); + return this; + } + + private java.util.List + fields_ = java.util.Collections.emptyList(); + + private void ensureFieldsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + fields_ = + new java.util.ArrayList< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath>(fields_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + fieldsBuilder_; + + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public java.util.List + getFieldsList() { + if (fieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fields_); + } else { + return fieldsBuilder_.getMessageList(); + } + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public int getFieldsCount() { + if (fieldsBuilder_ == null) { + return fields_.size(); + } else { + return fieldsBuilder_.getCount(); + } + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getFields( + int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessage(index); + } + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public Builder setFields( + int index, com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.set(index, value); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public Builder setFields( + int index, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public Builder addFields( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(value); + onChanged(); + } else { + fieldsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public Builder addFields( + int index, com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(index, value); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public Builder addFields( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public Builder addFields( + int index, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public Builder addAllFields( + java.lang.Iterable< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath> + values) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); + onChanged(); + } else { + fieldsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public Builder clearFields() { + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + fieldsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public Builder removeFields(int index) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.remove(index); + onChanged(); + } else { + fieldsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + getFieldsBuilder(int index) { + return getFieldsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder + getFieldsOrBuilder(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + getFieldsOrBuilderList() { + if (fieldsBuilder_ != null) { + return fieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fields_); + } + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + addFieldsBuilder() { + return getFieldsFieldBuilder() + .addBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + .getDefaultInstance()); + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + addFieldsBuilder(int index) { + return getFieldsFieldBuilder() + .addBuilder( + index, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + .getDefaultInstance()); + } + /** + * + * + *
+       * field paths for a Merge option
+       * 
+ * + * repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 2; + */ + public java.util.List< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder> + getFieldsBuilderList() { + return getFieldsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + getFieldsFieldBuilder() { + if (fieldsBuilder_ == null) { + fieldsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder>( + fields_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + fields_ = null; + } + return fieldsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.SetOption) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.SetOption) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SetOption parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SetOption(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.SetOption + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface QueryTestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.QueryTest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * path of collection, e.g. "projects/projectID/databases/(default)/documents/C"
+     * 
+ * + * string coll_path = 1; + */ + java.lang.String getCollPath(); + /** + * + * + *
+     * path of collection, e.g. "projects/projectID/databases/(default)/documents/C"
+     * 
+ * + * string coll_path = 1; + */ + com.google.protobuf.ByteString getCollPathBytes(); + + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + java.util.List + getClausesList(); + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause getClauses(int index); + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + int getClausesCount(); + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.ClauseOrBuilder> + getClausesOrBuilderList(); + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.ClauseOrBuilder getClausesOrBuilder( + int index); + + /** .google.firestore.v1.StructuredQuery query = 3; */ + boolean hasQuery(); + /** .google.firestore.v1.StructuredQuery query = 3; */ + com.google.firestore.v1.StructuredQuery getQuery(); + /** .google.firestore.v1.StructuredQuery query = 3; */ + com.google.firestore.v1.StructuredQueryOrBuilder getQueryOrBuilder(); + + /** bool is_error = 4; */ + boolean getIsError(); + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.QueryTest} */ + public static final class QueryTest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.QueryTest) + QueryTestOrBuilder { + private static final long serialVersionUID = 0L; + // Use QueryTest.newBuilder() to construct. + private QueryTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private QueryTest() { + collPath_ = ""; + clauses_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private QueryTest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + collPath_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + clauses_ = + new java.util.ArrayList< + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause>(); + mutable_bitField0_ |= 0x00000002; + } + clauses_.add( + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.parser(), + extensionRegistry)); + break; + } + case 26: + { + com.google.firestore.v1.StructuredQuery.Builder subBuilder = null; + if (query_ != null) { + subBuilder = query_.toBuilder(); + } + query_ = + input.readMessage( + com.google.firestore.v1.StructuredQuery.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(query_); + query_ = subBuilder.buildPartial(); + } + + break; + } + case 32: + { + isError_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + clauses_ = java.util.Collections.unmodifiableList(clauses_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_QueryTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_QueryTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest.Builder.class); + } + + private int bitField0_; + public static final int COLL_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object collPath_; + /** + * + * + *
+     * path of collection, e.g. "projects/projectID/databases/(default)/documents/C"
+     * 
+ * + * string coll_path = 1; + */ + public java.lang.String getCollPath() { + java.lang.Object ref = collPath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collPath_ = s; + return s; + } + } + /** + * + * + *
+     * path of collection, e.g. "projects/projectID/databases/(default)/documents/C"
+     * 
+ * + * string coll_path = 1; + */ + public com.google.protobuf.ByteString getCollPathBytes() { + java.lang.Object ref = collPath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + collPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLAUSES_FIELD_NUMBER = 2; + private java.util.List + clauses_; + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public java.util.List + getClausesList() { + return clauses_; + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.ClauseOrBuilder> + getClausesOrBuilderList() { + return clauses_; + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public int getClausesCount() { + return clauses_.size(); + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Clause getClauses(int index) { + return clauses_.get(index); + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.ClauseOrBuilder + getClausesOrBuilder(int index) { + return clauses_.get(index); + } + + public static final int QUERY_FIELD_NUMBER = 3; + private com.google.firestore.v1.StructuredQuery query_; + /** .google.firestore.v1.StructuredQuery query = 3; */ + public boolean hasQuery() { + return query_ != null; + } + /** .google.firestore.v1.StructuredQuery query = 3; */ + public com.google.firestore.v1.StructuredQuery getQuery() { + return query_ == null ? com.google.firestore.v1.StructuredQuery.getDefaultInstance() : query_; + } + /** .google.firestore.v1.StructuredQuery query = 3; */ + public com.google.firestore.v1.StructuredQueryOrBuilder getQueryOrBuilder() { + return getQuery(); + } + + public static final int IS_ERROR_FIELD_NUMBER = 4; + private boolean isError_; + /** bool is_error = 4; */ + public boolean getIsError() { + return isError_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getCollPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, collPath_); + } + for (int i = 0; i < clauses_.size(); i++) { + output.writeMessage(2, clauses_.get(i)); + } + if (query_ != null) { + output.writeMessage(3, getQuery()); + } + if (isError_ != false) { + output.writeBool(4, isError_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCollPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, collPath_); + } + for (int i = 0; i < clauses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, clauses_.get(i)); + } + if (query_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getQuery()); + } + if (isError_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, isError_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest) obj; + + if (!getCollPath().equals(other.getCollPath())) return false; + if (!getClausesList().equals(other.getClausesList())) return false; + if (hasQuery() != other.hasQuery()) return false; + if (hasQuery()) { + if (!getQuery().equals(other.getQuery())) return false; + } + if (getIsError() != other.getIsError()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + COLL_PATH_FIELD_NUMBER; + hash = (53 * hash) + getCollPath().hashCode(); + if (getClausesCount() > 0) { + hash = (37 * hash) + CLAUSES_FIELD_NUMBER; + hash = (53 * hash) + getClausesList().hashCode(); + } + if (hasQuery()) { + hash = (37 * hash) + QUERY_FIELD_NUMBER; + hash = (53 * hash) + getQuery().hashCode(); + } + hash = (37 * hash) + IS_ERROR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsError()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.QueryTest} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.QueryTest) + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_QueryTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_QueryTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getClausesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + collPath_ = ""; + + if (clausesBuilder_ == null) { + clauses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + clausesBuilder_.clear(); + } + if (queryBuilder_ == null) { + query_ = null; + } else { + query_ = null; + queryBuilder_ = null; + } + isError_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_QueryTest_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + result.collPath_ = collPath_; + if (clausesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + clauses_ = java.util.Collections.unmodifiableList(clauses_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.clauses_ = clauses_; + } else { + result.clauses_ = clausesBuilder_.build(); + } + if (queryBuilder_ == null) { + result.query_ = query_; + } else { + result.query_ = queryBuilder_.build(); + } + result.isError_ = isError_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + .getDefaultInstance()) return this; + if (!other.getCollPath().isEmpty()) { + collPath_ = other.collPath_; + onChanged(); + } + if (clausesBuilder_ == null) { + if (!other.clauses_.isEmpty()) { + if (clauses_.isEmpty()) { + clauses_ = other.clauses_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureClausesIsMutable(); + clauses_.addAll(other.clauses_); + } + onChanged(); + } + } else { + if (!other.clauses_.isEmpty()) { + if (clausesBuilder_.isEmpty()) { + clausesBuilder_.dispose(); + clausesBuilder_ = null; + clauses_ = other.clauses_; + bitField0_ = (bitField0_ & ~0x00000002); + clausesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getClausesFieldBuilder() + : null; + } else { + clausesBuilder_.addAllMessages(other.clauses_); + } + } + } + if (other.hasQuery()) { + mergeQuery(other.getQuery()); + } + if (other.getIsError() != false) { + setIsError(other.getIsError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object collPath_ = ""; + /** + * + * + *
+       * path of collection, e.g. "projects/projectID/databases/(default)/documents/C"
+       * 
+ * + * string coll_path = 1; + */ + public java.lang.String getCollPath() { + java.lang.Object ref = collPath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + collPath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * path of collection, e.g. "projects/projectID/databases/(default)/documents/C"
+       * 
+ * + * string coll_path = 1; + */ + public com.google.protobuf.ByteString getCollPathBytes() { + java.lang.Object ref = collPath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + collPath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * path of collection, e.g. "projects/projectID/databases/(default)/documents/C"
+       * 
+ * + * string coll_path = 1; + */ + public Builder setCollPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + collPath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * path of collection, e.g. "projects/projectID/databases/(default)/documents/C"
+       * 
+ * + * string coll_path = 1; + */ + public Builder clearCollPath() { + + collPath_ = getDefaultInstance().getCollPath(); + onChanged(); + return this; + } + /** + * + * + *
+       * path of collection, e.g. "projects/projectID/databases/(default)/documents/C"
+       * 
+ * + * string coll_path = 1; + */ + public Builder setCollPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + collPath_ = value; + onChanged(); + return this; + } + + private java.util.List + clauses_ = java.util.Collections.emptyList(); + + private void ensureClausesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + clauses_ = + new java.util.ArrayList< + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause>(clauses_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause, + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.ClauseOrBuilder> + clausesBuilder_; + + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public java.util.List + getClausesList() { + if (clausesBuilder_ == null) { + return java.util.Collections.unmodifiableList(clauses_); + } else { + return clausesBuilder_.getMessageList(); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public int getClausesCount() { + if (clausesBuilder_ == null) { + return clauses_.size(); + } else { + return clausesBuilder_.getCount(); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Clause getClauses(int index) { + if (clausesBuilder_ == null) { + return clauses_.get(index); + } else { + return clausesBuilder_.getMessage(index); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public Builder setClauses( + int index, com.google.cloud.conformance.firestore.v1.TestDefinition.Clause value) { + if (clausesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClausesIsMutable(); + clauses_.set(index, value); + onChanged(); + } else { + clausesBuilder_.setMessage(index, value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public Builder setClauses( + int index, + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.Builder builderForValue) { + if (clausesBuilder_ == null) { + ensureClausesIsMutable(); + clauses_.set(index, builderForValue.build()); + onChanged(); + } else { + clausesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public Builder addClauses( + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause value) { + if (clausesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClausesIsMutable(); + clauses_.add(value); + onChanged(); + } else { + clausesBuilder_.addMessage(value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public Builder addClauses( + int index, com.google.cloud.conformance.firestore.v1.TestDefinition.Clause value) { + if (clausesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureClausesIsMutable(); + clauses_.add(index, value); + onChanged(); + } else { + clausesBuilder_.addMessage(index, value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public Builder addClauses( + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.Builder builderForValue) { + if (clausesBuilder_ == null) { + ensureClausesIsMutable(); + clauses_.add(builderForValue.build()); + onChanged(); + } else { + clausesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public Builder addClauses( + int index, + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.Builder builderForValue) { + if (clausesBuilder_ == null) { + ensureClausesIsMutable(); + clauses_.add(index, builderForValue.build()); + onChanged(); + } else { + clausesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public Builder addAllClauses( + java.lang.Iterable< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.Clause> + values) { + if (clausesBuilder_ == null) { + ensureClausesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, clauses_); + onChanged(); + } else { + clausesBuilder_.addAllMessages(values); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public Builder clearClauses() { + if (clausesBuilder_ == null) { + clauses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + clausesBuilder_.clear(); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public Builder removeClauses(int index) { + if (clausesBuilder_ == null) { + ensureClausesIsMutable(); + clauses_.remove(index); + onChanged(); + } else { + clausesBuilder_.remove(index); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.Builder + getClausesBuilder(int index) { + return getClausesFieldBuilder().getBuilder(index); + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.ClauseOrBuilder + getClausesOrBuilder(int index) { + if (clausesBuilder_ == null) { + return clauses_.get(index); + } else { + return clausesBuilder_.getMessageOrBuilder(index); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.ClauseOrBuilder> + getClausesOrBuilderList() { + if (clausesBuilder_ != null) { + return clausesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(clauses_); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.Builder + addClausesBuilder() { + return getClausesFieldBuilder() + .addBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause + .getDefaultInstance()); + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.Builder + addClausesBuilder(int index) { + return getClausesFieldBuilder() + .addBuilder( + index, + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause + .getDefaultInstance()); + } + /** repeated .google.cloud.conformance.firestore.v1.Clause clauses = 2; */ + public java.util.List + getClausesBuilderList() { + return getClausesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause, + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.ClauseOrBuilder> + getClausesFieldBuilder() { + if (clausesBuilder_ == null) { + clausesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause, + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.ClauseOrBuilder>( + clauses_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + clauses_ = null; + } + return clausesBuilder_; + } + + private com.google.firestore.v1.StructuredQuery query_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery, + com.google.firestore.v1.StructuredQuery.Builder, + com.google.firestore.v1.StructuredQueryOrBuilder> + queryBuilder_; + /** .google.firestore.v1.StructuredQuery query = 3; */ + public boolean hasQuery() { + return queryBuilder_ != null || query_ != null; + } + /** .google.firestore.v1.StructuredQuery query = 3; */ + public com.google.firestore.v1.StructuredQuery getQuery() { + if (queryBuilder_ == null) { + return query_ == null + ? com.google.firestore.v1.StructuredQuery.getDefaultInstance() + : query_; + } else { + return queryBuilder_.getMessage(); + } + } + /** .google.firestore.v1.StructuredQuery query = 3; */ + public Builder setQuery(com.google.firestore.v1.StructuredQuery value) { + if (queryBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + query_ = value; + onChanged(); + } else { + queryBuilder_.setMessage(value); + } + + return this; + } + /** .google.firestore.v1.StructuredQuery query = 3; */ + public Builder setQuery(com.google.firestore.v1.StructuredQuery.Builder builderForValue) { + if (queryBuilder_ == null) { + query_ = builderForValue.build(); + onChanged(); + } else { + queryBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .google.firestore.v1.StructuredQuery query = 3; */ + public Builder mergeQuery(com.google.firestore.v1.StructuredQuery value) { + if (queryBuilder_ == null) { + if (query_ != null) { + query_ = + com.google.firestore.v1.StructuredQuery.newBuilder(query_) + .mergeFrom(value) + .buildPartial(); + } else { + query_ = value; + } + onChanged(); + } else { + queryBuilder_.mergeFrom(value); + } + + return this; + } + /** .google.firestore.v1.StructuredQuery query = 3; */ + public Builder clearQuery() { + if (queryBuilder_ == null) { + query_ = null; + onChanged(); + } else { + query_ = null; + queryBuilder_ = null; + } + + return this; + } + /** .google.firestore.v1.StructuredQuery query = 3; */ + public com.google.firestore.v1.StructuredQuery.Builder getQueryBuilder() { + + onChanged(); + return getQueryFieldBuilder().getBuilder(); + } + /** .google.firestore.v1.StructuredQuery query = 3; */ + public com.google.firestore.v1.StructuredQueryOrBuilder getQueryOrBuilder() { + if (queryBuilder_ != null) { + return queryBuilder_.getMessageOrBuilder(); + } else { + return query_ == null + ? com.google.firestore.v1.StructuredQuery.getDefaultInstance() + : query_; + } + } + /** .google.firestore.v1.StructuredQuery query = 3; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery, + com.google.firestore.v1.StructuredQuery.Builder, + com.google.firestore.v1.StructuredQueryOrBuilder> + getQueryFieldBuilder() { + if (queryBuilder_ == null) { + queryBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.StructuredQuery, + com.google.firestore.v1.StructuredQuery.Builder, + com.google.firestore.v1.StructuredQueryOrBuilder>( + getQuery(), getParentForChildren(), isClean()); + query_ = null; + } + return queryBuilder_; + } + + private boolean isError_; + /** bool is_error = 4; */ + public boolean getIsError() { + return isError_; + } + /** bool is_error = 4; */ + public Builder setIsError(boolean value) { + + isError_ = value; + onChanged(); + return this; + } + /** bool is_error = 4; */ + public Builder clearIsError() { + + isError_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.QueryTest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.QueryTest) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public QueryTest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new QueryTest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.QueryTest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ClauseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.Clause) + com.google.protobuf.MessageOrBuilder { + + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + boolean hasSelect(); + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.Select getSelect(); + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.SelectOrBuilder getSelectOrBuilder(); + + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + boolean hasWhere(); + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.Where getWhere(); + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.WhereOrBuilder getWhereOrBuilder(); + + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + boolean hasOrderBy(); + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy getOrderBy(); + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderByOrBuilder getOrderByOrBuilder(); + + /** int32 offset = 4; */ + int getOffset(); + + /** int32 limit = 5; */ + int getLimit(); + + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + boolean hasStartAt(); + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor getStartAt(); + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder getStartAtOrBuilder(); + + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + boolean hasStartAfter(); + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor getStartAfter(); + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder + getStartAfterOrBuilder(); + + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + boolean hasEndAt(); + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor getEndAt(); + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder getEndAtOrBuilder(); + + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + boolean hasEndBefore(); + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor getEndBefore(); + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder + getEndBeforeOrBuilder(); + + public com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.ClauseCase + getClauseCase(); + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.Clause} */ + public static final class Clause extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.Clause) + ClauseOrBuilder { + private static final long serialVersionUID = 0L; + // Use Clause.newBuilder() to construct. + private Clause(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Clause() {} + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Clause( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.Select.Builder subBuilder = + null; + if (clauseCase_ == 1) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.Select) clause_) + .toBuilder(); + } + clause_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.Select.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Select) clause_); + clause_ = subBuilder.buildPartial(); + } + clauseCase_ = 1; + break; + } + case 18: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.Where.Builder subBuilder = + null; + if (clauseCase_ == 2) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.Where) clause_) + .toBuilder(); + } + clause_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.Where.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Where) clause_); + clause_ = subBuilder.buildPartial(); + } + clauseCase_ = 2; + break; + } + case 26: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.Builder + subBuilder = null; + if (clauseCase_ == 3) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy) clause_) + .toBuilder(); + } + clause_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy) clause_); + clause_ = subBuilder.buildPartial(); + } + clauseCase_ = 3; + break; + } + case 32: + { + clauseCase_ = 4; + clause_ = input.readInt32(); + break; + } + case 40: + { + clauseCase_ = 5; + clause_ = input.readInt32(); + break; + } + case 50: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder subBuilder = + null; + if (clauseCase_ == 6) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_) + .toBuilder(); + } + clause_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_); + clause_ = subBuilder.buildPartial(); + } + clauseCase_ = 6; + break; + } + case 58: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder subBuilder = + null; + if (clauseCase_ == 7) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_) + .toBuilder(); + } + clause_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_); + clause_ = subBuilder.buildPartial(); + } + clauseCase_ = 7; + break; + } + case 66: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder subBuilder = + null; + if (clauseCase_ == 8) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_) + .toBuilder(); + } + clause_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_); + clause_ = subBuilder.buildPartial(); + } + clauseCase_ = 8; + break; + } + case 74: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder subBuilder = + null; + if (clauseCase_ == 9) { + subBuilder = + ((com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_) + .toBuilder(); + } + clause_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_); + clause_ = subBuilder.buildPartial(); + } + clauseCase_ = 9; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Clause_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Clause_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.Builder.class); + } + + private int clauseCase_ = 0; + private java.lang.Object clause_; + + public enum ClauseCase implements com.google.protobuf.Internal.EnumLite { + SELECT(1), + WHERE(2), + ORDER_BY(3), + OFFSET(4), + LIMIT(5), + START_AT(6), + START_AFTER(7), + END_AT(8), + END_BEFORE(9), + CLAUSE_NOT_SET(0); + private final int value; + + private ClauseCase(int value) { + this.value = value; + } + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static ClauseCase valueOf(int value) { + return forNumber(value); + } + + public static ClauseCase forNumber(int value) { + switch (value) { + case 1: + return SELECT; + case 2: + return WHERE; + case 3: + return ORDER_BY; + case 4: + return OFFSET; + case 5: + return LIMIT; + case 6: + return START_AT; + case 7: + return START_AFTER; + case 8: + return END_AT; + case 9: + return END_BEFORE; + case 0: + return CLAUSE_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public ClauseCase getClauseCase() { + return ClauseCase.forNumber(clauseCase_); + } + + public static final int SELECT_FIELD_NUMBER = 1; + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + public boolean hasSelect() { + return clauseCase_ == 1; + } + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Select getSelect() { + if (clauseCase_ == 1) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Select) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Select.getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.SelectOrBuilder + getSelectOrBuilder() { + if (clauseCase_ == 1) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Select) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Select.getDefaultInstance(); + } + + public static final int WHERE_FIELD_NUMBER = 2; + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + public boolean hasWhere() { + return clauseCase_ == 2; + } + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Where getWhere() { + if (clauseCase_ == 2) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Where) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Where.getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.WhereOrBuilder + getWhereOrBuilder() { + if (clauseCase_ == 2) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Where) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Where.getDefaultInstance(); + } + + public static final int ORDER_BY_FIELD_NUMBER = 3; + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + public boolean hasOrderBy() { + return clauseCase_ == 3; + } + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy getOrderBy() { + if (clauseCase_ == 3) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.OrderByOrBuilder + getOrderByOrBuilder() { + if (clauseCase_ == 3) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.getDefaultInstance(); + } + + public static final int OFFSET_FIELD_NUMBER = 4; + /** int32 offset = 4; */ + public int getOffset() { + if (clauseCase_ == 4) { + return (java.lang.Integer) clause_; + } + return 0; + } + + public static final int LIMIT_FIELD_NUMBER = 5; + /** int32 limit = 5; */ + public int getLimit() { + if (clauseCase_ == 5) { + return (java.lang.Integer) clause_; + } + return 0; + } + + public static final int START_AT_FIELD_NUMBER = 6; + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + public boolean hasStartAt() { + return clauseCase_ == 6; + } + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor getStartAt() { + if (clauseCase_ == 6) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder + getStartAtOrBuilder() { + if (clauseCase_ == 6) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.getDefaultInstance(); + } + + public static final int START_AFTER_FIELD_NUMBER = 7; + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + public boolean hasStartAfter() { + return clauseCase_ == 7; + } + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor getStartAfter() { + if (clauseCase_ == 7) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder + getStartAfterOrBuilder() { + if (clauseCase_ == 7) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.getDefaultInstance(); + } + + public static final int END_AT_FIELD_NUMBER = 8; + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + public boolean hasEndAt() { + return clauseCase_ == 8; + } + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor getEndAt() { + if (clauseCase_ == 8) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder + getEndAtOrBuilder() { + if (clauseCase_ == 8) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.getDefaultInstance(); + } + + public static final int END_BEFORE_FIELD_NUMBER = 9; + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + public boolean hasEndBefore() { + return clauseCase_ == 9; + } + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor getEndBefore() { + if (clauseCase_ == 9) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.getDefaultInstance(); + } + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder + getEndBeforeOrBuilder() { + if (clauseCase_ == 9) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (clauseCase_ == 1) { + output.writeMessage( + 1, (com.google.cloud.conformance.firestore.v1.TestDefinition.Select) clause_); + } + if (clauseCase_ == 2) { + output.writeMessage( + 2, (com.google.cloud.conformance.firestore.v1.TestDefinition.Where) clause_); + } + if (clauseCase_ == 3) { + output.writeMessage( + 3, (com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy) clause_); + } + if (clauseCase_ == 4) { + output.writeInt32(4, (int) ((java.lang.Integer) clause_)); + } + if (clauseCase_ == 5) { + output.writeInt32(5, (int) ((java.lang.Integer) clause_)); + } + if (clauseCase_ == 6) { + output.writeMessage( + 6, (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_); + } + if (clauseCase_ == 7) { + output.writeMessage( + 7, (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_); + } + if (clauseCase_ == 8) { + output.writeMessage( + 8, (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_); + } + if (clauseCase_ == 9) { + output.writeMessage( + 9, (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (clauseCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, (com.google.cloud.conformance.firestore.v1.TestDefinition.Select) clause_); + } + if (clauseCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, (com.google.cloud.conformance.firestore.v1.TestDefinition.Where) clause_); + } + if (clauseCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, (com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy) clause_); + } + if (clauseCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 4, (int) ((java.lang.Integer) clause_)); + } + if (clauseCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeInt32Size( + 5, (int) ((java.lang.Integer) clause_)); + } + if (clauseCase_ == 6) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 6, (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_); + } + if (clauseCase_ == 7) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 7, (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_); + } + if (clauseCase_ == 8) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_); + } + if (clauseCase_ == 9) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 9, (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.Clause)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.Clause) obj; + + if (!getClauseCase().equals(other.getClauseCase())) return false; + switch (clauseCase_) { + case 1: + if (!getSelect().equals(other.getSelect())) return false; + break; + case 2: + if (!getWhere().equals(other.getWhere())) return false; + break; + case 3: + if (!getOrderBy().equals(other.getOrderBy())) return false; + break; + case 4: + if (getOffset() != other.getOffset()) return false; + break; + case 5: + if (getLimit() != other.getLimit()) return false; + break; + case 6: + if (!getStartAt().equals(other.getStartAt())) return false; + break; + case 7: + if (!getStartAfter().equals(other.getStartAfter())) return false; + break; + case 8: + if (!getEndAt().equals(other.getEndAt())) return false; + break; + case 9: + if (!getEndBefore().equals(other.getEndBefore())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (clauseCase_) { + case 1: + hash = (37 * hash) + SELECT_FIELD_NUMBER; + hash = (53 * hash) + getSelect().hashCode(); + break; + case 2: + hash = (37 * hash) + WHERE_FIELD_NUMBER; + hash = (53 * hash) + getWhere().hashCode(); + break; + case 3: + hash = (37 * hash) + ORDER_BY_FIELD_NUMBER; + hash = (53 * hash) + getOrderBy().hashCode(); + break; + case 4: + hash = (37 * hash) + OFFSET_FIELD_NUMBER; + hash = (53 * hash) + getOffset(); + break; + case 5: + hash = (37 * hash) + LIMIT_FIELD_NUMBER; + hash = (53 * hash) + getLimit(); + break; + case 6: + hash = (37 * hash) + START_AT_FIELD_NUMBER; + hash = (53 * hash) + getStartAt().hashCode(); + break; + case 7: + hash = (37 * hash) + START_AFTER_FIELD_NUMBER; + hash = (53 * hash) + getStartAfter().hashCode(); + break; + case 8: + hash = (37 * hash) + END_AT_FIELD_NUMBER; + hash = (53 * hash) + getEndAt().hashCode(); + break; + case 9: + hash = (37 * hash) + END_BEFORE_FIELD_NUMBER; + hash = (53 * hash) + getEndBefore().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Clause parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Clause parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Clause parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Clause parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Clause parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Clause parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Clause parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Clause parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Clause + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Clause + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Clause parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Clause parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.Clause} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.Clause) + com.google.cloud.conformance.firestore.v1.TestDefinition.ClauseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Clause_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Clause_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + clauseCase_ = 0; + clause_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Clause_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Clause + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Clause build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Clause buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.Clause(this); + if (clauseCase_ == 1) { + if (selectBuilder_ == null) { + result.clause_ = clause_; + } else { + result.clause_ = selectBuilder_.build(); + } + } + if (clauseCase_ == 2) { + if (whereBuilder_ == null) { + result.clause_ = clause_; + } else { + result.clause_ = whereBuilder_.build(); + } + } + if (clauseCase_ == 3) { + if (orderByBuilder_ == null) { + result.clause_ = clause_; + } else { + result.clause_ = orderByBuilder_.build(); + } + } + if (clauseCase_ == 4) { + result.clause_ = clause_; + } + if (clauseCase_ == 5) { + result.clause_ = clause_; + } + if (clauseCase_ == 6) { + if (startAtBuilder_ == null) { + result.clause_ = clause_; + } else { + result.clause_ = startAtBuilder_.build(); + } + } + if (clauseCase_ == 7) { + if (startAfterBuilder_ == null) { + result.clause_ = clause_; + } else { + result.clause_ = startAfterBuilder_.build(); + } + } + if (clauseCase_ == 8) { + if (endAtBuilder_ == null) { + result.clause_ = clause_; + } else { + result.clause_ = endAtBuilder_.build(); + } + } + if (clauseCase_ == 9) { + if (endBeforeBuilder_ == null) { + result.clause_ = clause_; + } else { + result.clause_ = endBeforeBuilder_.build(); + } + } + result.clauseCase_ = clauseCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.Clause) { + return mergeFrom((com.google.cloud.conformance.firestore.v1.TestDefinition.Clause) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.Clause.getDefaultInstance()) + return this; + switch (other.getClauseCase()) { + case SELECT: + { + mergeSelect(other.getSelect()); + break; + } + case WHERE: + { + mergeWhere(other.getWhere()); + break; + } + case ORDER_BY: + { + mergeOrderBy(other.getOrderBy()); + break; + } + case OFFSET: + { + setOffset(other.getOffset()); + break; + } + case LIMIT: + { + setLimit(other.getLimit()); + break; + } + case START_AT: + { + mergeStartAt(other.getStartAt()); + break; + } + case START_AFTER: + { + mergeStartAfter(other.getStartAfter()); + break; + } + case END_AT: + { + mergeEndAt(other.getEndAt()); + break; + } + case END_BEFORE: + { + mergeEndBefore(other.getEndBefore()); + break; + } + case CLAUSE_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.Clause parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.Clause) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int clauseCase_ = 0; + private java.lang.Object clause_; + + public ClauseCase getClauseCase() { + return ClauseCase.forNumber(clauseCase_); + } + + public Builder clearClause() { + clauseCase_ = 0; + clause_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Select, + com.google.cloud.conformance.firestore.v1.TestDefinition.Select.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.SelectOrBuilder> + selectBuilder_; + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + public boolean hasSelect() { + return clauseCase_ == 1; + } + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Select getSelect() { + if (selectBuilder_ == null) { + if (clauseCase_ == 1) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Select) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Select + .getDefaultInstance(); + } else { + if (clauseCase_ == 1) { + return selectBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Select + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + public Builder setSelect( + com.google.cloud.conformance.firestore.v1.TestDefinition.Select value) { + if (selectBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clause_ = value; + onChanged(); + } else { + selectBuilder_.setMessage(value); + } + clauseCase_ = 1; + return this; + } + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + public Builder setSelect( + com.google.cloud.conformance.firestore.v1.TestDefinition.Select.Builder builderForValue) { + if (selectBuilder_ == null) { + clause_ = builderForValue.build(); + onChanged(); + } else { + selectBuilder_.setMessage(builderForValue.build()); + } + clauseCase_ = 1; + return this; + } + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + public Builder mergeSelect( + com.google.cloud.conformance.firestore.v1.TestDefinition.Select value) { + if (selectBuilder_ == null) { + if (clauseCase_ == 1 + && clause_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.Select + .getDefaultInstance()) { + clause_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.Select.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Select) clause_) + .mergeFrom(value) + .buildPartial(); + } else { + clause_ = value; + } + onChanged(); + } else { + if (clauseCase_ == 1) { + selectBuilder_.mergeFrom(value); + } + selectBuilder_.setMessage(value); + } + clauseCase_ = 1; + return this; + } + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + public Builder clearSelect() { + if (selectBuilder_ == null) { + if (clauseCase_ == 1) { + clauseCase_ = 0; + clause_ = null; + onChanged(); + } + } else { + if (clauseCase_ == 1) { + clauseCase_ = 0; + clause_ = null; + } + selectBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Select.Builder + getSelectBuilder() { + return getSelectFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.SelectOrBuilder + getSelectOrBuilder() { + if ((clauseCase_ == 1) && (selectBuilder_ != null)) { + return selectBuilder_.getMessageOrBuilder(); + } else { + if (clauseCase_ == 1) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Select) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Select + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.Select select = 1; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Select, + com.google.cloud.conformance.firestore.v1.TestDefinition.Select.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.SelectOrBuilder> + getSelectFieldBuilder() { + if (selectBuilder_ == null) { + if (!(clauseCase_ == 1)) { + clause_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.Select + .getDefaultInstance(); + } + selectBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Select, + com.google.cloud.conformance.firestore.v1.TestDefinition.Select.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.SelectOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Select) clause_, + getParentForChildren(), + isClean()); + clause_ = null; + } + clauseCase_ = 1; + onChanged(); + ; + return selectBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Where, + com.google.cloud.conformance.firestore.v1.TestDefinition.Where.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.WhereOrBuilder> + whereBuilder_; + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + public boolean hasWhere() { + return clauseCase_ == 2; + } + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Where getWhere() { + if (whereBuilder_ == null) { + if (clauseCase_ == 2) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Where) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Where + .getDefaultInstance(); + } else { + if (clauseCase_ == 2) { + return whereBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Where + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + public Builder setWhere( + com.google.cloud.conformance.firestore.v1.TestDefinition.Where value) { + if (whereBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clause_ = value; + onChanged(); + } else { + whereBuilder_.setMessage(value); + } + clauseCase_ = 2; + return this; + } + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + public Builder setWhere( + com.google.cloud.conformance.firestore.v1.TestDefinition.Where.Builder builderForValue) { + if (whereBuilder_ == null) { + clause_ = builderForValue.build(); + onChanged(); + } else { + whereBuilder_.setMessage(builderForValue.build()); + } + clauseCase_ = 2; + return this; + } + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + public Builder mergeWhere( + com.google.cloud.conformance.firestore.v1.TestDefinition.Where value) { + if (whereBuilder_ == null) { + if (clauseCase_ == 2 + && clause_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.Where + .getDefaultInstance()) { + clause_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.Where.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Where) clause_) + .mergeFrom(value) + .buildPartial(); + } else { + clause_ = value; + } + onChanged(); + } else { + if (clauseCase_ == 2) { + whereBuilder_.mergeFrom(value); + } + whereBuilder_.setMessage(value); + } + clauseCase_ = 2; + return this; + } + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + public Builder clearWhere() { + if (whereBuilder_ == null) { + if (clauseCase_ == 2) { + clauseCase_ = 0; + clause_ = null; + onChanged(); + } + } else { + if (clauseCase_ == 2) { + clauseCase_ = 0; + clause_ = null; + } + whereBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Where.Builder + getWhereBuilder() { + return getWhereFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.WhereOrBuilder + getWhereOrBuilder() { + if ((clauseCase_ == 2) && (whereBuilder_ != null)) { + return whereBuilder_.getMessageOrBuilder(); + } else { + if (clauseCase_ == 2) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Where) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Where + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.Where where = 2; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Where, + com.google.cloud.conformance.firestore.v1.TestDefinition.Where.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.WhereOrBuilder> + getWhereFieldBuilder() { + if (whereBuilder_ == null) { + if (!(clauseCase_ == 2)) { + clause_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.Where.getDefaultInstance(); + } + whereBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Where, + com.google.cloud.conformance.firestore.v1.TestDefinition.Where.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.WhereOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Where) clause_, + getParentForChildren(), + isClean()); + clause_ = null; + } + clauseCase_ = 2; + onChanged(); + ; + return whereBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy, + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderByOrBuilder> + orderByBuilder_; + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + public boolean hasOrderBy() { + return clauseCase_ == 3; + } + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy getOrderBy() { + if (orderByBuilder_ == null) { + if (clauseCase_ == 3) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy + .getDefaultInstance(); + } else { + if (clauseCase_ == 3) { + return orderByBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + public Builder setOrderBy( + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy value) { + if (orderByBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clause_ = value; + onChanged(); + } else { + orderByBuilder_.setMessage(value); + } + clauseCase_ = 3; + return this; + } + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + public Builder setOrderBy( + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.Builder + builderForValue) { + if (orderByBuilder_ == null) { + clause_ = builderForValue.build(); + onChanged(); + } else { + orderByBuilder_.setMessage(builderForValue.build()); + } + clauseCase_ = 3; + return this; + } + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + public Builder mergeOrderBy( + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy value) { + if (orderByBuilder_ == null) { + if (clauseCase_ == 3 + && clause_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy + .getDefaultInstance()) { + clause_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy) clause_) + .mergeFrom(value) + .buildPartial(); + } else { + clause_ = value; + } + onChanged(); + } else { + if (clauseCase_ == 3) { + orderByBuilder_.mergeFrom(value); + } + orderByBuilder_.setMessage(value); + } + clauseCase_ = 3; + return this; + } + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + public Builder clearOrderBy() { + if (orderByBuilder_ == null) { + if (clauseCase_ == 3) { + clauseCase_ = 0; + clause_ = null; + onChanged(); + } + } else { + if (clauseCase_ == 3) { + clauseCase_ = 0; + clause_ = null; + } + orderByBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.Builder + getOrderByBuilder() { + return getOrderByFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.OrderByOrBuilder + getOrderByOrBuilder() { + if ((clauseCase_ == 3) && (orderByBuilder_ != null)) { + return orderByBuilder_.getMessageOrBuilder(); + } else { + if (clauseCase_ == 3) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.OrderBy order_by = 3; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy, + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderByOrBuilder> + getOrderByFieldBuilder() { + if (orderByBuilder_ == null) { + if (!(clauseCase_ == 3)) { + clause_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy + .getDefaultInstance(); + } + orderByBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy, + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderByOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy) clause_, + getParentForChildren(), + isClean()); + clause_ = null; + } + clauseCase_ = 3; + onChanged(); + ; + return orderByBuilder_; + } + + /** int32 offset = 4; */ + public int getOffset() { + if (clauseCase_ == 4) { + return (java.lang.Integer) clause_; + } + return 0; + } + /** int32 offset = 4; */ + public Builder setOffset(int value) { + clauseCase_ = 4; + clause_ = value; + onChanged(); + return this; + } + /** int32 offset = 4; */ + public Builder clearOffset() { + if (clauseCase_ == 4) { + clauseCase_ = 0; + clause_ = null; + onChanged(); + } + return this; + } + + /** int32 limit = 5; */ + public int getLimit() { + if (clauseCase_ == 5) { + return (java.lang.Integer) clause_; + } + return 0; + } + /** int32 limit = 5; */ + public Builder setLimit(int value) { + clauseCase_ = 5; + clause_ = value; + onChanged(); + return this; + } + /** int32 limit = 5; */ + public Builder clearLimit() { + if (clauseCase_ == 5) { + clauseCase_ = 0; + clause_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor, + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder> + startAtBuilder_; + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + public boolean hasStartAt() { + return clauseCase_ == 6; + } + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor getStartAt() { + if (startAtBuilder_ == null) { + if (clauseCase_ == 6) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } else { + if (clauseCase_ == 6) { + return startAtBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + public Builder setStartAt( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor value) { + if (startAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clause_ = value; + onChanged(); + } else { + startAtBuilder_.setMessage(value); + } + clauseCase_ = 6; + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + public Builder setStartAt( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder builderForValue) { + if (startAtBuilder_ == null) { + clause_ = builderForValue.build(); + onChanged(); + } else { + startAtBuilder_.setMessage(builderForValue.build()); + } + clauseCase_ = 6; + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + public Builder mergeStartAt( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor value) { + if (startAtBuilder_ == null) { + if (clauseCase_ == 6 + && clause_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance()) { + clause_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_) + .mergeFrom(value) + .buildPartial(); + } else { + clause_ = value; + } + onChanged(); + } else { + if (clauseCase_ == 6) { + startAtBuilder_.mergeFrom(value); + } + startAtBuilder_.setMessage(value); + } + clauseCase_ = 6; + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + public Builder clearStartAt() { + if (startAtBuilder_ == null) { + if (clauseCase_ == 6) { + clauseCase_ = 0; + clause_ = null; + onChanged(); + } + } else { + if (clauseCase_ == 6) { + clauseCase_ = 0; + clause_ = null; + } + startAtBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder + getStartAtBuilder() { + return getStartAtFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder + getStartAtOrBuilder() { + if ((clauseCase_ == 6) && (startAtBuilder_ != null)) { + return startAtBuilder_.getMessageOrBuilder(); + } else { + if (clauseCase_ == 6) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.Cursor start_at = 6; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor, + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder> + getStartAtFieldBuilder() { + if (startAtBuilder_ == null) { + if (!(clauseCase_ == 6)) { + clause_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } + startAtBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor, + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_, + getParentForChildren(), + isClean()); + clause_ = null; + } + clauseCase_ = 6; + onChanged(); + ; + return startAtBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor, + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder> + startAfterBuilder_; + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + public boolean hasStartAfter() { + return clauseCase_ == 7; + } + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor getStartAfter() { + if (startAfterBuilder_ == null) { + if (clauseCase_ == 7) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } else { + if (clauseCase_ == 7) { + return startAfterBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + public Builder setStartAfter( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor value) { + if (startAfterBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clause_ = value; + onChanged(); + } else { + startAfterBuilder_.setMessage(value); + } + clauseCase_ = 7; + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + public Builder setStartAfter( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder builderForValue) { + if (startAfterBuilder_ == null) { + clause_ = builderForValue.build(); + onChanged(); + } else { + startAfterBuilder_.setMessage(builderForValue.build()); + } + clauseCase_ = 7; + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + public Builder mergeStartAfter( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor value) { + if (startAfterBuilder_ == null) { + if (clauseCase_ == 7 + && clause_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance()) { + clause_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_) + .mergeFrom(value) + .buildPartial(); + } else { + clause_ = value; + } + onChanged(); + } else { + if (clauseCase_ == 7) { + startAfterBuilder_.mergeFrom(value); + } + startAfterBuilder_.setMessage(value); + } + clauseCase_ = 7; + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + public Builder clearStartAfter() { + if (startAfterBuilder_ == null) { + if (clauseCase_ == 7) { + clauseCase_ = 0; + clause_ = null; + onChanged(); + } + } else { + if (clauseCase_ == 7) { + clauseCase_ = 0; + clause_ = null; + } + startAfterBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder + getStartAfterBuilder() { + return getStartAfterFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder + getStartAfterOrBuilder() { + if ((clauseCase_ == 7) && (startAfterBuilder_ != null)) { + return startAfterBuilder_.getMessageOrBuilder(); + } else { + if (clauseCase_ == 7) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.Cursor start_after = 7; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor, + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder> + getStartAfterFieldBuilder() { + if (startAfterBuilder_ == null) { + if (!(clauseCase_ == 7)) { + clause_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } + startAfterBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor, + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_, + getParentForChildren(), + isClean()); + clause_ = null; + } + clauseCase_ = 7; + onChanged(); + ; + return startAfterBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor, + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder> + endAtBuilder_; + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + public boolean hasEndAt() { + return clauseCase_ == 8; + } + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor getEndAt() { + if (endAtBuilder_ == null) { + if (clauseCase_ == 8) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } else { + if (clauseCase_ == 8) { + return endAtBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + public Builder setEndAt( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor value) { + if (endAtBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clause_ = value; + onChanged(); + } else { + endAtBuilder_.setMessage(value); + } + clauseCase_ = 8; + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + public Builder setEndAt( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder builderForValue) { + if (endAtBuilder_ == null) { + clause_ = builderForValue.build(); + onChanged(); + } else { + endAtBuilder_.setMessage(builderForValue.build()); + } + clauseCase_ = 8; + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + public Builder mergeEndAt( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor value) { + if (endAtBuilder_ == null) { + if (clauseCase_ == 8 + && clause_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance()) { + clause_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_) + .mergeFrom(value) + .buildPartial(); + } else { + clause_ = value; + } + onChanged(); + } else { + if (clauseCase_ == 8) { + endAtBuilder_.mergeFrom(value); + } + endAtBuilder_.setMessage(value); + } + clauseCase_ = 8; + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + public Builder clearEndAt() { + if (endAtBuilder_ == null) { + if (clauseCase_ == 8) { + clauseCase_ = 0; + clause_ = null; + onChanged(); + } + } else { + if (clauseCase_ == 8) { + clauseCase_ = 0; + clause_ = null; + } + endAtBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder + getEndAtBuilder() { + return getEndAtFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder + getEndAtOrBuilder() { + if ((clauseCase_ == 8) && (endAtBuilder_ != null)) { + return endAtBuilder_.getMessageOrBuilder(); + } else { + if (clauseCase_ == 8) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.Cursor end_at = 8; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor, + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder> + getEndAtFieldBuilder() { + if (endAtBuilder_ == null) { + if (!(clauseCase_ == 8)) { + clause_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } + endAtBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor, + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_, + getParentForChildren(), + isClean()); + clause_ = null; + } + clauseCase_ = 8; + onChanged(); + ; + return endAtBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor, + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder> + endBeforeBuilder_; + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + public boolean hasEndBefore() { + return clauseCase_ == 9; + } + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor getEndBefore() { + if (endBeforeBuilder_ == null) { + if (clauseCase_ == 9) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } else { + if (clauseCase_ == 9) { + return endBeforeBuilder_.getMessage(); + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + public Builder setEndBefore( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor value) { + if (endBeforeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + clause_ = value; + onChanged(); + } else { + endBeforeBuilder_.setMessage(value); + } + clauseCase_ = 9; + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + public Builder setEndBefore( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder builderForValue) { + if (endBeforeBuilder_ == null) { + clause_ = builderForValue.build(); + onChanged(); + } else { + endBeforeBuilder_.setMessage(builderForValue.build()); + } + clauseCase_ = 9; + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + public Builder mergeEndBefore( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor value) { + if (endBeforeBuilder_ == null) { + if (clauseCase_ == 9 + && clause_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance()) { + clause_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.newBuilder( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_) + .mergeFrom(value) + .buildPartial(); + } else { + clause_ = value; + } + onChanged(); + } else { + if (clauseCase_ == 9) { + endBeforeBuilder_.mergeFrom(value); + } + endBeforeBuilder_.setMessage(value); + } + clauseCase_ = 9; + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + public Builder clearEndBefore() { + if (endBeforeBuilder_ == null) { + if (clauseCase_ == 9) { + clauseCase_ = 0; + clause_ = null; + onChanged(); + } + } else { + if (clauseCase_ == 9) { + clauseCase_ = 0; + clause_ = null; + } + endBeforeBuilder_.clear(); + } + return this; + } + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder + getEndBeforeBuilder() { + return getEndBeforeFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder + getEndBeforeOrBuilder() { + if ((clauseCase_ == 9) && (endBeforeBuilder_ != null)) { + return endBeforeBuilder_.getMessageOrBuilder(); + } else { + if (clauseCase_ == 9) { + return (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_; + } + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } + } + /** .google.cloud.conformance.firestore.v1.Cursor end_before = 9; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor, + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder> + getEndBeforeFieldBuilder() { + if (endBeforeBuilder_ == null) { + if (!(clauseCase_ == 9)) { + clause_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + .getDefaultInstance(); + } + endBeforeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor, + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder>( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) clause_, + getParentForChildren(), + isClean()); + clause_ = null; + } + clauseCase_ = 9; + onChanged(); + ; + return endBeforeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.Clause) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.Clause) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.Clause + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.Clause(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Clause + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Clause parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Clause(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Clause + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SelectOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.Select) + com.google.protobuf.MessageOrBuilder { + + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + java.util.List + getFieldsList(); + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getFields(int index); + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + int getFieldsCount(); + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + getFieldsOrBuilderList(); + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder getFieldsOrBuilder( + int index); + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.Select} */ + public static final class Select extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.Select) + SelectOrBuilder { + private static final long serialVersionUID = 0L; + // Use Select.newBuilder() to construct. + private Select(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Select() { + fields_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Select( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = + new java.util.ArrayList< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath>(); + mutable_bitField0_ |= 0x00000001; + } + fields_.add( + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.parser(), + extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Select_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Select_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.Select.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.Select.Builder.class); + } + + public static final int FIELDS_FIELD_NUMBER = 1; + private java.util.List + fields_; + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public java.util.List + getFieldsList() { + return fields_; + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + getFieldsOrBuilderList() { + return fields_; + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public int getFieldsCount() { + return fields_.size(); + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getFields(int index) { + return fields_.get(index); + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder + getFieldsOrBuilder(int index) { + return fields_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < fields_.size(); i++) { + output.writeMessage(1, fields_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < fields_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, fields_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.Select)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.Select other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.Select) obj; + + if (!getFieldsList().equals(other.getFieldsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldsCount() > 0) { + hash = (37 * hash) + FIELDS_FIELD_NUMBER; + hash = (53 * hash) + getFieldsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Select parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Select parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Select parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Select parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Select parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Select parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Select parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Select parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Select + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Select + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Select parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Select parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.Select prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.Select} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.Select) + com.google.cloud.conformance.firestore.v1.TestDefinition.SelectOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Select_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Select_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.Select.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.Select.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.Select.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFieldsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + fieldsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Select_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Select + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.Select.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Select build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.Select result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Select buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.Select result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.Select(this); + int from_bitField0_ = bitField0_; + if (fieldsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + fields_ = java.util.Collections.unmodifiableList(fields_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.fields_ = fields_; + } else { + result.fields_ = fieldsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.Select) { + return mergeFrom((com.google.cloud.conformance.firestore.v1.TestDefinition.Select) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.Select other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.Select.getDefaultInstance()) + return this; + if (fieldsBuilder_ == null) { + if (!other.fields_.isEmpty()) { + if (fields_.isEmpty()) { + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldsIsMutable(); + fields_.addAll(other.fields_); + } + onChanged(); + } + } else { + if (!other.fields_.isEmpty()) { + if (fieldsBuilder_.isEmpty()) { + fieldsBuilder_.dispose(); + fieldsBuilder_ = null; + fields_ = other.fields_; + bitField0_ = (bitField0_ & ~0x00000001); + fieldsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFieldsFieldBuilder() + : null; + } else { + fieldsBuilder_.addAllMessages(other.fields_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.Select parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.Select) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + fields_ = java.util.Collections.emptyList(); + + private void ensureFieldsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + fields_ = + new java.util.ArrayList< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath>(fields_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + fieldsBuilder_; + + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public java.util.List + getFieldsList() { + if (fieldsBuilder_ == null) { + return java.util.Collections.unmodifiableList(fields_); + } else { + return fieldsBuilder_.getMessageList(); + } + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public int getFieldsCount() { + if (fieldsBuilder_ == null) { + return fields_.size(); + } else { + return fieldsBuilder_.getCount(); + } + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getFields( + int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessage(index); + } + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public Builder setFields( + int index, com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.set(index, value); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public Builder setFields( + int index, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.set(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public Builder addFields( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(value); + onChanged(); + } else { + fieldsBuilder_.addMessage(value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public Builder addFields( + int index, com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath value) { + if (fieldsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldsIsMutable(); + fields_.add(index, value); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public Builder addFields( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public Builder addFields( + int index, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + builderForValue) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.add(index, builderForValue.build()); + onChanged(); + } else { + fieldsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public Builder addAllFields( + java.lang.Iterable< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath> + values) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, fields_); + onChanged(); + } else { + fieldsBuilder_.addAllMessages(values); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public Builder clearFields() { + if (fieldsBuilder_ == null) { + fields_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + fieldsBuilder_.clear(); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public Builder removeFields(int index) { + if (fieldsBuilder_ == null) { + ensureFieldsIsMutable(); + fields_.remove(index); + onChanged(); + } else { + fieldsBuilder_.remove(index); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + getFieldsBuilder(int index) { + return getFieldsFieldBuilder().getBuilder(index); + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder + getFieldsOrBuilder(int index) { + if (fieldsBuilder_ == null) { + return fields_.get(index); + } else { + return fieldsBuilder_.getMessageOrBuilder(index); + } + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + getFieldsOrBuilderList() { + if (fieldsBuilder_ != null) { + return fieldsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(fields_); + } + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + addFieldsBuilder() { + return getFieldsFieldBuilder() + .addBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + .getDefaultInstance()); + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + addFieldsBuilder(int index) { + return getFieldsFieldBuilder() + .addBuilder( + index, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + .getDefaultInstance()); + } + /** repeated .google.cloud.conformance.firestore.v1.FieldPath fields = 1; */ + public java.util.List< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder> + getFieldsBuilderList() { + return getFieldsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + getFieldsFieldBuilder() { + if (fieldsBuilder_ == null) { + fieldsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder>( + fields_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + fields_ = null; + } + return fieldsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.Select) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.Select) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.Select + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.Select(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Select + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser() { + @java.lang.Override + public Select parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Select(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Select + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface WhereOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.Where) + com.google.protobuf.MessageOrBuilder { + + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + boolean hasPath(); + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getPath(); + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder getPathOrBuilder(); + + /** string op = 2; */ + java.lang.String getOp(); + /** string op = 2; */ + com.google.protobuf.ByteString getOpBytes(); + + /** string json_value = 3; */ + java.lang.String getJsonValue(); + /** string json_value = 3; */ + com.google.protobuf.ByteString getJsonValueBytes(); + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.Where} */ + public static final class Where extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.Where) + WhereOrBuilder { + private static final long serialVersionUID = 0L; + // Use Where.newBuilder() to construct. + private Where(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Where() { + op_ = ""; + jsonValue_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Where( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + subBuilder = null; + if (path_ != null) { + subBuilder = path_.toBuilder(); + } + path_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(path_); + path_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + op_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + jsonValue_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Where_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Where_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.Where.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.Where.Builder.class); + } + + public static final int PATH_FIELD_NUMBER = 1; + private com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath path_; + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public boolean hasPath() { + return path_ != null; + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getPath() { + return path_ == null + ? com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.getDefaultInstance() + : path_; + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder + getPathOrBuilder() { + return getPath(); + } + + public static final int OP_FIELD_NUMBER = 2; + private volatile java.lang.Object op_; + /** string op = 2; */ + public java.lang.String getOp() { + java.lang.Object ref = op_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + op_ = s; + return s; + } + } + /** string op = 2; */ + public com.google.protobuf.ByteString getOpBytes() { + java.lang.Object ref = op_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + op_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JSON_VALUE_FIELD_NUMBER = 3; + private volatile java.lang.Object jsonValue_; + /** string json_value = 3; */ + public java.lang.String getJsonValue() { + java.lang.Object ref = jsonValue_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonValue_ = s; + return s; + } + } + /** string json_value = 3; */ + public com.google.protobuf.ByteString getJsonValueBytes() { + java.lang.Object ref = jsonValue_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jsonValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (path_ != null) { + output.writeMessage(1, getPath()); + } + if (!getOpBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, op_); + } + if (!getJsonValueBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, jsonValue_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (path_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPath()); + } + if (!getOpBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, op_); + } + if (!getJsonValueBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, jsonValue_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.Where)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.Where other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.Where) obj; + + if (hasPath() != other.hasPath()) return false; + if (hasPath()) { + if (!getPath().equals(other.getPath())) return false; + } + if (!getOp().equals(other.getOp())) return false; + if (!getJsonValue().equals(other.getJsonValue())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPath()) { + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + } + hash = (37 * hash) + OP_FIELD_NUMBER; + hash = (53 * hash) + getOp().hashCode(); + hash = (37 * hash) + JSON_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getJsonValue().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Where parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Where parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Where parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Where parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Where parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Where parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Where parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Where parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Where parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Where parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Where parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Where parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.Where prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.Where} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.Where) + com.google.cloud.conformance.firestore.v1.TestDefinition.WhereOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Where_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Where_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.Where.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.Where.Builder.class); + } + + // Construct using com.google.cloud.conformance.firestore.v1.TestDefinition.Where.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (pathBuilder_ == null) { + path_ = null; + } else { + path_ = null; + pathBuilder_ = null; + } + op_ = ""; + + jsonValue_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Where_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Where + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.Where.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Where build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.Where result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Where buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.Where result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.Where(this); + if (pathBuilder_ == null) { + result.path_ = path_; + } else { + result.path_ = pathBuilder_.build(); + } + result.op_ = op_; + result.jsonValue_ = jsonValue_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.Where) { + return mergeFrom((com.google.cloud.conformance.firestore.v1.TestDefinition.Where) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.Where other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.Where.getDefaultInstance()) + return this; + if (other.hasPath()) { + mergePath(other.getPath()); + } + if (!other.getOp().isEmpty()) { + op_ = other.op_; + onChanged(); + } + if (!other.getJsonValue().isEmpty()) { + jsonValue_ = other.jsonValue_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.Where parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.Where) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath path_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + pathBuilder_; + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public boolean hasPath() { + return pathBuilder_ != null || path_ != null; + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getPath() { + if (pathBuilder_ == null) { + return path_ == null + ? com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + .getDefaultInstance() + : path_; + } else { + return pathBuilder_.getMessage(); + } + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public Builder setPath( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath value) { + if (pathBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + path_ = value; + onChanged(); + } else { + pathBuilder_.setMessage(value); + } + + return this; + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public Builder setPath( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + builderForValue) { + if (pathBuilder_ == null) { + path_ = builderForValue.build(); + onChanged(); + } else { + pathBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public Builder mergePath( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath value) { + if (pathBuilder_ == null) { + if (path_ != null) { + path_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.newBuilder(path_) + .mergeFrom(value) + .buildPartial(); + } else { + path_ = value; + } + onChanged(); + } else { + pathBuilder_.mergeFrom(value); + } + + return this; + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public Builder clearPath() { + if (pathBuilder_ == null) { + path_ = null; + onChanged(); + } else { + path_ = null; + pathBuilder_ = null; + } + + return this; + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + getPathBuilder() { + + onChanged(); + return getPathFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder + getPathOrBuilder() { + if (pathBuilder_ != null) { + return pathBuilder_.getMessageOrBuilder(); + } else { + return path_ == null + ? com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + .getDefaultInstance() + : path_; + } + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + getPathFieldBuilder() { + if (pathBuilder_ == null) { + pathBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder>( + getPath(), getParentForChildren(), isClean()); + path_ = null; + } + return pathBuilder_; + } + + private java.lang.Object op_ = ""; + /** string op = 2; */ + public java.lang.String getOp() { + java.lang.Object ref = op_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + op_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** string op = 2; */ + public com.google.protobuf.ByteString getOpBytes() { + java.lang.Object ref = op_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + op_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** string op = 2; */ + public Builder setOp(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + op_ = value; + onChanged(); + return this; + } + /** string op = 2; */ + public Builder clearOp() { + + op_ = getDefaultInstance().getOp(); + onChanged(); + return this; + } + /** string op = 2; */ + public Builder setOpBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + op_ = value; + onChanged(); + return this; + } + + private java.lang.Object jsonValue_ = ""; + /** string json_value = 3; */ + public java.lang.String getJsonValue() { + java.lang.Object ref = jsonValue_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonValue_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** string json_value = 3; */ + public com.google.protobuf.ByteString getJsonValueBytes() { + java.lang.Object ref = jsonValue_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jsonValue_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** string json_value = 3; */ + public Builder setJsonValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jsonValue_ = value; + onChanged(); + return this; + } + /** string json_value = 3; */ + public Builder clearJsonValue() { + + jsonValue_ = getDefaultInstance().getJsonValue(); + onChanged(); + return this; + } + /** string json_value = 3; */ + public Builder setJsonValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jsonValue_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.Where) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.Where) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.Where + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.Where(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Where + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Where parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Where(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Where + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface OrderByOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.OrderBy) + com.google.protobuf.MessageOrBuilder { + + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + boolean hasPath(); + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getPath(); + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder getPathOrBuilder(); + + /** + * + * + *
+     * "asc" or "desc"
+     * 
+ * + * string direction = 2; + */ + java.lang.String getDirection(); + /** + * + * + *
+     * "asc" or "desc"
+     * 
+ * + * string direction = 2; + */ + com.google.protobuf.ByteString getDirectionBytes(); + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.OrderBy} */ + public static final class OrderBy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.OrderBy) + OrderByOrBuilder { + private static final long serialVersionUID = 0L; + // Use OrderBy.newBuilder() to construct. + private OrderBy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private OrderBy() { + direction_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OrderBy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + subBuilder = null; + if (path_ != null) { + subBuilder = path_.toBuilder(); + } + path_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(path_); + path_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + direction_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_OrderBy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_OrderBy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.Builder.class); + } + + public static final int PATH_FIELD_NUMBER = 1; + private com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath path_; + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public boolean hasPath() { + return path_ != null; + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getPath() { + return path_ == null + ? com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.getDefaultInstance() + : path_; + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder + getPathOrBuilder() { + return getPath(); + } + + public static final int DIRECTION_FIELD_NUMBER = 2; + private volatile java.lang.Object direction_; + /** + * + * + *
+     * "asc" or "desc"
+     * 
+ * + * string direction = 2; + */ + public java.lang.String getDirection() { + java.lang.Object ref = direction_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + direction_ = s; + return s; + } + } + /** + * + * + *
+     * "asc" or "desc"
+     * 
+ * + * string direction = 2; + */ + public com.google.protobuf.ByteString getDirectionBytes() { + java.lang.Object ref = direction_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + direction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (path_ != null) { + output.writeMessage(1, getPath()); + } + if (!getDirectionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, direction_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (path_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPath()); + } + if (!getDirectionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, direction_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy) obj; + + if (hasPath() != other.hasPath()) return false; + if (hasPath()) { + if (!getPath().equals(other.getPath())) return false; + } + if (!getDirection().equals(other.getDirection())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasPath()) { + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + } + hash = (37 * hash) + DIRECTION_FIELD_NUMBER; + hash = (53 * hash) + getDirection().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.OrderBy} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.OrderBy) + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderByOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_OrderBy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_OrderBy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (pathBuilder_ == null) { + path_ = null; + } else { + path_ = null; + pathBuilder_ = null; + } + direction_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_OrderBy_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy(this); + if (pathBuilder_ == null) { + result.path_ = path_; + } else { + result.path_ = pathBuilder_.build(); + } + result.direction_ = direction_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy + .getDefaultInstance()) return this; + if (other.hasPath()) { + mergePath(other.getPath()); + } + if (!other.getDirection().isEmpty()) { + direction_ = other.direction_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath path_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + pathBuilder_; + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public boolean hasPath() { + return pathBuilder_ != null || path_ != null; + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath getPath() { + if (pathBuilder_ == null) { + return path_ == null + ? com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + .getDefaultInstance() + : path_; + } else { + return pathBuilder_.getMessage(); + } + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public Builder setPath( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath value) { + if (pathBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + path_ = value; + onChanged(); + } else { + pathBuilder_.setMessage(value); + } + + return this; + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public Builder setPath( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + builderForValue) { + if (pathBuilder_ == null) { + path_ = builderForValue.build(); + onChanged(); + } else { + pathBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public Builder mergePath( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath value) { + if (pathBuilder_ == null) { + if (path_ != null) { + path_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.newBuilder(path_) + .mergeFrom(value) + .buildPartial(); + } else { + path_ = value; + } + onChanged(); + } else { + pathBuilder_.mergeFrom(value); + } + + return this; + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public Builder clearPath() { + if (pathBuilder_ == null) { + path_ = null; + onChanged(); + } else { + path_ = null; + pathBuilder_ = null; + } + + return this; + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder + getPathBuilder() { + + onChanged(); + return getPathFieldBuilder().getBuilder(); + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder + getPathOrBuilder() { + if (pathBuilder_ != null) { + return pathBuilder_.getMessageOrBuilder(); + } else { + return path_ == null + ? com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + .getDefaultInstance() + : path_; + } + } + /** .google.cloud.conformance.firestore.v1.FieldPath path = 1; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder> + getPathFieldBuilder() { + if (pathBuilder_ == null) { + pathBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder>( + getPath(), getParentForChildren(), isClean()); + path_ = null; + } + return pathBuilder_; + } + + private java.lang.Object direction_ = ""; + /** + * + * + *
+       * "asc" or "desc"
+       * 
+ * + * string direction = 2; + */ + public java.lang.String getDirection() { + java.lang.Object ref = direction_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + direction_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * "asc" or "desc"
+       * 
+ * + * string direction = 2; + */ + public com.google.protobuf.ByteString getDirectionBytes() { + java.lang.Object ref = direction_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + direction_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * "asc" or "desc"
+       * 
+ * + * string direction = 2; + */ + public Builder setDirection(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + direction_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * "asc" or "desc"
+       * 
+ * + * string direction = 2; + */ + public Builder clearDirection() { + + direction_ = getDefaultInstance().getDirection(); + onChanged(); + return this; + } + /** + * + * + *
+       * "asc" or "desc"
+       * 
+ * + * string direction = 2; + */ + public Builder setDirectionBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + direction_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.OrderBy) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.OrderBy) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OrderBy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OrderBy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.OrderBy + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface CursorOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.Cursor) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * one of:
+     * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + boolean hasDocSnapshot(); + /** + * + * + *
+     * one of:
+     * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot getDocSnapshot(); + /** + * + * + *
+     * one of:
+     * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshotOrBuilder + getDocSnapshotOrBuilder(); + + /** repeated string json_values = 2; */ + java.util.List getJsonValuesList(); + /** repeated string json_values = 2; */ + int getJsonValuesCount(); + /** repeated string json_values = 2; */ + java.lang.String getJsonValues(int index); + /** repeated string json_values = 2; */ + com.google.protobuf.ByteString getJsonValuesBytes(int index); + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.Cursor} */ + public static final class Cursor extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.Cursor) + CursorOrBuilder { + private static final long serialVersionUID = 0L; + // Use Cursor.newBuilder() to construct. + private Cursor(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Cursor() { + jsonValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Cursor( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot.Builder + subBuilder = null; + if (docSnapshot_ != null) { + subBuilder = docSnapshot_.toBuilder(); + } + docSnapshot_ = + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(docSnapshot_); + docSnapshot_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + jsonValues_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + jsonValues_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000002) != 0)) { + jsonValues_ = jsonValues_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Cursor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Cursor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder.class); + } + + private int bitField0_; + public static final int DOC_SNAPSHOT_FIELD_NUMBER = 1; + private com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot docSnapshot_; + /** + * + * + *
+     * one of:
+     * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + public boolean hasDocSnapshot() { + return docSnapshot_ != null; + } + /** + * + * + *
+     * one of:
+     * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot getDocSnapshot() { + return docSnapshot_ == null + ? com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot + .getDefaultInstance() + : docSnapshot_; + } + /** + * + * + *
+     * one of:
+     * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshotOrBuilder + getDocSnapshotOrBuilder() { + return getDocSnapshot(); + } + + public static final int JSON_VALUES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList jsonValues_; + /** repeated string json_values = 2; */ + public com.google.protobuf.ProtocolStringList getJsonValuesList() { + return jsonValues_; + } + /** repeated string json_values = 2; */ + public int getJsonValuesCount() { + return jsonValues_.size(); + } + /** repeated string json_values = 2; */ + public java.lang.String getJsonValues(int index) { + return jsonValues_.get(index); + } + /** repeated string json_values = 2; */ + public com.google.protobuf.ByteString getJsonValuesBytes(int index) { + return jsonValues_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (docSnapshot_ != null) { + output.writeMessage(1, getDocSnapshot()); + } + for (int i = 0; i < jsonValues_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jsonValues_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (docSnapshot_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getDocSnapshot()); + } + { + int dataSize = 0; + for (int i = 0; i < jsonValues_.size(); i++) { + dataSize += computeStringSizeNoTag(jsonValues_.getRaw(i)); + } + size += dataSize; + size += 1 * getJsonValuesList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) obj; + + if (hasDocSnapshot() != other.hasDocSnapshot()) return false; + if (hasDocSnapshot()) { + if (!getDocSnapshot().equals(other.getDocSnapshot())) return false; + } + if (!getJsonValuesList().equals(other.getJsonValuesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasDocSnapshot()) { + hash = (37 * hash) + DOC_SNAPSHOT_FIELD_NUMBER; + hash = (53 * hash) + getDocSnapshot().hashCode(); + } + if (getJsonValuesCount() > 0) { + hash = (37 * hash) + JSON_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getJsonValuesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.Cursor} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.Cursor) + com.google.cloud.conformance.firestore.v1.TestDefinition.CursorOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Cursor_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Cursor_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (docSnapshotBuilder_ == null) { + docSnapshot_ = null; + } else { + docSnapshot_ = null; + docSnapshotBuilder_ = null; + } + jsonValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Cursor_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (docSnapshotBuilder_ == null) { + result.docSnapshot_ = docSnapshot_; + } else { + result.docSnapshot_ = docSnapshotBuilder_.build(); + } + if (((bitField0_ & 0x00000002) != 0)) { + jsonValues_ = jsonValues_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.jsonValues_ = jsonValues_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) { + return mergeFrom((com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor.getDefaultInstance()) + return this; + if (other.hasDocSnapshot()) { + mergeDocSnapshot(other.getDocSnapshot()); + } + if (!other.jsonValues_.isEmpty()) { + if (jsonValues_.isEmpty()) { + jsonValues_ = other.jsonValues_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureJsonValuesIsMutable(); + jsonValues_.addAll(other.jsonValues_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot docSnapshot_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshotOrBuilder> + docSnapshotBuilder_; + /** + * + * + *
+       * one of:
+       * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + public boolean hasDocSnapshot() { + return docSnapshotBuilder_ != null || docSnapshot_ != null; + } + /** + * + * + *
+       * one of:
+       * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot getDocSnapshot() { + if (docSnapshotBuilder_ == null) { + return docSnapshot_ == null + ? com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot + .getDefaultInstance() + : docSnapshot_; + } else { + return docSnapshotBuilder_.getMessage(); + } + } + /** + * + * + *
+       * one of:
+       * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + public Builder setDocSnapshot( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot value) { + if (docSnapshotBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + docSnapshot_ = value; + onChanged(); + } else { + docSnapshotBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+       * one of:
+       * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + public Builder setDocSnapshot( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot.Builder + builderForValue) { + if (docSnapshotBuilder_ == null) { + docSnapshot_ = builderForValue.build(); + onChanged(); + } else { + docSnapshotBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+       * one of:
+       * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + public Builder mergeDocSnapshot( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot value) { + if (docSnapshotBuilder_ == null) { + if (docSnapshot_ != null) { + docSnapshot_ = + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot.newBuilder( + docSnapshot_) + .mergeFrom(value) + .buildPartial(); + } else { + docSnapshot_ = value; + } + onChanged(); + } else { + docSnapshotBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+       * one of:
+       * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + public Builder clearDocSnapshot() { + if (docSnapshotBuilder_ == null) { + docSnapshot_ = null; + onChanged(); + } else { + docSnapshot_ = null; + docSnapshotBuilder_ = null; + } + + return this; + } + /** + * + * + *
+       * one of:
+       * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot.Builder + getDocSnapshotBuilder() { + + onChanged(); + return getDocSnapshotFieldBuilder().getBuilder(); + } + /** + * + * + *
+       * one of:
+       * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshotOrBuilder + getDocSnapshotOrBuilder() { + if (docSnapshotBuilder_ != null) { + return docSnapshotBuilder_.getMessageOrBuilder(); + } else { + return docSnapshot_ == null + ? com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot + .getDefaultInstance() + : docSnapshot_; + } + } + /** + * + * + *
+       * one of:
+       * 
+ * + * .google.cloud.conformance.firestore.v1.DocSnapshot doc_snapshot = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshotOrBuilder> + getDocSnapshotFieldBuilder() { + if (docSnapshotBuilder_ == null) { + docSnapshotBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshotOrBuilder>( + getDocSnapshot(), getParentForChildren(), isClean()); + docSnapshot_ = null; + } + return docSnapshotBuilder_; + } + + private com.google.protobuf.LazyStringList jsonValues_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureJsonValuesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + jsonValues_ = new com.google.protobuf.LazyStringArrayList(jsonValues_); + bitField0_ |= 0x00000002; + } + } + /** repeated string json_values = 2; */ + public com.google.protobuf.ProtocolStringList getJsonValuesList() { + return jsonValues_.getUnmodifiableView(); + } + /** repeated string json_values = 2; */ + public int getJsonValuesCount() { + return jsonValues_.size(); + } + /** repeated string json_values = 2; */ + public java.lang.String getJsonValues(int index) { + return jsonValues_.get(index); + } + /** repeated string json_values = 2; */ + public com.google.protobuf.ByteString getJsonValuesBytes(int index) { + return jsonValues_.getByteString(index); + } + /** repeated string json_values = 2; */ + public Builder setJsonValues(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureJsonValuesIsMutable(); + jsonValues_.set(index, value); + onChanged(); + return this; + } + /** repeated string json_values = 2; */ + public Builder addJsonValues(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureJsonValuesIsMutable(); + jsonValues_.add(value); + onChanged(); + return this; + } + /** repeated string json_values = 2; */ + public Builder addAllJsonValues(java.lang.Iterable values) { + ensureJsonValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, jsonValues_); + onChanged(); + return this; + } + /** repeated string json_values = 2; */ + public Builder clearJsonValues() { + jsonValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** repeated string json_values = 2; */ + public Builder addJsonValuesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureJsonValuesIsMutable(); + jsonValues_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.Cursor) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.Cursor) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Cursor parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Cursor(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Cursor + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DocSnapshotOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.DocSnapshot) + com.google.protobuf.MessageOrBuilder { + + /** string path = 1; */ + java.lang.String getPath(); + /** string path = 1; */ + com.google.protobuf.ByteString getPathBytes(); + + /** string json_data = 2; */ + java.lang.String getJsonData(); + /** string json_data = 2; */ + com.google.protobuf.ByteString getJsonDataBytes(); + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.DocSnapshot} */ + public static final class DocSnapshot extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.DocSnapshot) + DocSnapshotOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocSnapshot.newBuilder() to construct. + private DocSnapshot(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DocSnapshot() { + path_ = ""; + jsonData_ = ""; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DocSnapshot( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + path_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + jsonData_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DocSnapshot_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DocSnapshot_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot.Builder.class); + } + + public static final int PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object path_; + /** string path = 1; */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } + } + /** string path = 1; */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int JSON_DATA_FIELD_NUMBER = 2; + private volatile java.lang.Object jsonData_; + /** string json_data = 2; */ + public java.lang.String getJsonData() { + java.lang.Object ref = jsonData_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonData_ = s; + return s; + } + } + /** string json_data = 2; */ + public com.google.protobuf.ByteString getJsonDataBytes() { + java.lang.Object ref = jsonData_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jsonData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getPathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, path_); + } + if (!getJsonDataBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, jsonData_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getPathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, path_); + } + if (!getJsonDataBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, jsonData_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot) obj; + + if (!getPath().equals(other.getPath())) return false; + if (!getJsonData().equals(other.getJsonData())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PATH_FIELD_NUMBER; + hash = (53 * hash) + getPath().hashCode(); + hash = (37 * hash) + JSON_DATA_FIELD_NUMBER; + hash = (53 * hash) + getJsonData().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.DocSnapshot} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.DocSnapshot) + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshotOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DocSnapshot_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DocSnapshot_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + path_ = ""; + + jsonData_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DocSnapshot_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot(this); + result.path_ = path_; + result.jsonData_ = jsonData_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot + .getDefaultInstance()) return this; + if (!other.getPath().isEmpty()) { + path_ = other.path_; + onChanged(); + } + if (!other.getJsonData().isEmpty()) { + jsonData_ = other.jsonData_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object path_ = ""; + /** string path = 1; */ + public java.lang.String getPath() { + java.lang.Object ref = path_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + path_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** string path = 1; */ + public com.google.protobuf.ByteString getPathBytes() { + java.lang.Object ref = path_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + path_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** string path = 1; */ + public Builder setPath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + path_ = value; + onChanged(); + return this; + } + /** string path = 1; */ + public Builder clearPath() { + + path_ = getDefaultInstance().getPath(); + onChanged(); + return this; + } + /** string path = 1; */ + public Builder setPathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + path_ = value; + onChanged(); + return this; + } + + private java.lang.Object jsonData_ = ""; + /** string json_data = 2; */ + public java.lang.String getJsonData() { + java.lang.Object ref = jsonData_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + jsonData_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** string json_data = 2; */ + public com.google.protobuf.ByteString getJsonDataBytes() { + java.lang.Object ref = jsonData_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + jsonData_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** string json_data = 2; */ + public Builder setJsonData(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + jsonData_ = value; + onChanged(); + return this; + } + /** string json_data = 2; */ + public Builder clearJsonData() { + + jsonData_ = getDefaultInstance().getJsonData(); + onChanged(); + return this; + } + /** string json_data = 2; */ + public Builder setJsonDataBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + jsonData_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.DocSnapshot) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.DocSnapshot) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocSnapshot parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DocSnapshot(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocSnapshot + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface FieldPathOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.FieldPath) + com.google.protobuf.MessageOrBuilder { + + /** repeated string field = 1; */ + java.util.List getFieldList(); + /** repeated string field = 1; */ + int getFieldCount(); + /** repeated string field = 1; */ + java.lang.String getField(int index); + /** repeated string field = 1; */ + com.google.protobuf.ByteString getFieldBytes(int index); + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.FieldPath} */ + public static final class FieldPath extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.FieldPath) + FieldPathOrBuilder { + private static final long serialVersionUID = 0L; + // Use FieldPath.newBuilder() to construct. + private FieldPath(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private FieldPath() { + field_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private FieldPath( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + field_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + field_ = field_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_FieldPath_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_FieldPath_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder.class); + } + + public static final int FIELD_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList field_; + /** repeated string field = 1; */ + public com.google.protobuf.ProtocolStringList getFieldList() { + return field_; + } + /** repeated string field = 1; */ + public int getFieldCount() { + return field_.size(); + } + /** repeated string field = 1; */ + public java.lang.String getField(int index) { + return field_.get(index); + } + /** repeated string field = 1; */ + public com.google.protobuf.ByteString getFieldBytes(int index) { + return field_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < field_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < field_.size(); i++) { + dataSize += computeStringSizeNoTag(field_.getRaw(i)); + } + size += dataSize; + size += 1 * getFieldList().size(); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath) obj; + + if (!getFieldList().equals(other.getFieldList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getFieldCount() > 0) { + hash = (37 * hash) + FIELD_FIELD_NUMBER; + hash = (53 * hash) + getFieldList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.FieldPath} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.FieldPath) + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPathOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_FieldPath_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_FieldPath_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + field_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_FieldPath_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + field_ = field_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.field_ = field_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + .getDefaultInstance()) return this; + if (!other.field_.isEmpty()) { + if (field_.isEmpty()) { + field_ = other.field_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFieldIsMutable(); + field_.addAll(other.field_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList field_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureFieldIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + field_ = new com.google.protobuf.LazyStringArrayList(field_); + bitField0_ |= 0x00000001; + } + } + /** repeated string field = 1; */ + public com.google.protobuf.ProtocolStringList getFieldList() { + return field_.getUnmodifiableView(); + } + /** repeated string field = 1; */ + public int getFieldCount() { + return field_.size(); + } + /** repeated string field = 1; */ + public java.lang.String getField(int index) { + return field_.get(index); + } + /** repeated string field = 1; */ + public com.google.protobuf.ByteString getFieldBytes(int index) { + return field_.getByteString(index); + } + /** repeated string field = 1; */ + public Builder setField(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldIsMutable(); + field_.set(index, value); + onChanged(); + return this; + } + /** repeated string field = 1; */ + public Builder addField(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureFieldIsMutable(); + field_.add(value); + onChanged(); + return this; + } + /** repeated string field = 1; */ + public Builder addAllField(java.lang.Iterable values) { + ensureFieldIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, field_); + onChanged(); + return this; + } + /** repeated string field = 1; */ + public Builder clearField() { + field_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** repeated string field = 1; */ + public Builder addFieldBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureFieldIsMutable(); + field_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.FieldPath) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.FieldPath) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public FieldPath parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new FieldPath(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.FieldPath + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ListenTestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.ListenTest) + com.google.protobuf.MessageOrBuilder { + + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + java.util.List getResponsesList(); + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + com.google.firestore.v1.ListenResponse getResponses(int index); + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + int getResponsesCount(); + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + java.util.List + getResponsesOrBuilderList(); + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + com.google.firestore.v1.ListenResponseOrBuilder getResponsesOrBuilder(int index); + + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + java.util.List + getSnapshotsList(); + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot getSnapshots(int index); + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + int getSnapshotsCount(); + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.SnapshotOrBuilder> + getSnapshotsOrBuilderList(); + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.SnapshotOrBuilder + getSnapshotsOrBuilder(int index); + + /** bool is_error = 3; */ + boolean getIsError(); + } + /** + * + * + *
+   * A test of the Listen streaming RPC (a.k.a. FireStore watch).
+   * If the sequence of responses is provided to the implementation,
+   * it should produce the sequence of snapshots.
+   * If is_error is true, an error should occur after the snapshots.
+   * The tests assume that the query is
+   * Collection("projects/projectID/databases/(default)/documents/C").OrderBy("a", Ascending)
+   * The watch target ID used in these tests is 1. Test interpreters
+   * should either change their client's ID for testing,
+   * or change the ID in the tests before running them.
+   * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.ListenTest} + */ + public static final class ListenTest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.ListenTest) + ListenTestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListenTest.newBuilder() to construct. + private ListenTest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListenTest() { + responses_ = java.util.Collections.emptyList(); + snapshots_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListenTest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + responses_.add( + input.readMessage( + com.google.firestore.v1.ListenResponse.parser(), extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + snapshots_ = + new java.util.ArrayList< + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot>(); + mutable_bitField0_ |= 0x00000002; + } + snapshots_.add( + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.parser(), + extensionRegistry)); + break; + } + case 24: + { + isError_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + snapshots_ = java.util.Collections.unmodifiableList(snapshots_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_ListenTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_ListenTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest.Builder.class); + } + + private int bitField0_; + public static final int RESPONSES_FIELD_NUMBER = 1; + private java.util.List responses_; + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public java.util.List getResponsesList() { + return responses_; + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public java.util.List + getResponsesOrBuilderList() { + return responses_; + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public int getResponsesCount() { + return responses_.size(); + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public com.google.firestore.v1.ListenResponse getResponses(int index) { + return responses_.get(index); + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public com.google.firestore.v1.ListenResponseOrBuilder getResponsesOrBuilder(int index) { + return responses_.get(index); + } + + public static final int SNAPSHOTS_FIELD_NUMBER = 2; + private java.util.List + snapshots_; + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public java.util.List + getSnapshotsList() { + return snapshots_; + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.SnapshotOrBuilder> + getSnapshotsOrBuilderList() { + return snapshots_; + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public int getSnapshotsCount() { + return snapshots_.size(); + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot getSnapshots( + int index) { + return snapshots_.get(index); + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.SnapshotOrBuilder + getSnapshotsOrBuilder(int index) { + return snapshots_.get(index); + } + + public static final int IS_ERROR_FIELD_NUMBER = 3; + private boolean isError_; + /** bool is_error = 3; */ + public boolean getIsError() { + return isError_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < responses_.size(); i++) { + output.writeMessage(1, responses_.get(i)); + } + for (int i = 0; i < snapshots_.size(); i++) { + output.writeMessage(2, snapshots_.get(i)); + } + if (isError_ != false) { + output.writeBool(3, isError_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < responses_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, responses_.get(i)); + } + for (int i = 0; i < snapshots_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, snapshots_.get(i)); + } + if (isError_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isError_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest) obj; + + if (!getResponsesList().equals(other.getResponsesList())) return false; + if (!getSnapshotsList().equals(other.getSnapshotsList())) return false; + if (getIsError() != other.getIsError()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResponsesCount() > 0) { + hash = (37 * hash) + RESPONSES_FIELD_NUMBER; + hash = (53 * hash) + getResponsesList().hashCode(); + } + if (getSnapshotsCount() > 0) { + hash = (37 * hash) + SNAPSHOTS_FIELD_NUMBER; + hash = (53 * hash) + getSnapshotsList().hashCode(); + } + hash = (37 * hash) + IS_ERROR_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsError()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * A test of the Listen streaming RPC (a.k.a. FireStore watch).
+     * If the sequence of responses is provided to the implementation,
+     * it should produce the sequence of snapshots.
+     * If is_error is true, an error should occur after the snapshots.
+     * The tests assume that the query is
+     * Collection("projects/projectID/databases/(default)/documents/C").OrderBy("a", Ascending)
+     * The watch target ID used in these tests is 1. Test interpreters
+     * should either change their client's ID for testing,
+     * or change the ID in the tests before running them.
+     * 
+ * + * Protobuf type {@code google.cloud.conformance.firestore.v1.ListenTest} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.ListenTest) + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_ListenTest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_ListenTest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getResponsesFieldBuilder(); + getSnapshotsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + responsesBuilder_.clear(); + } + if (snapshotsBuilder_ == null) { + snapshots_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + snapshotsBuilder_.clear(); + } + isError_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_ListenTest_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (responsesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + responses_ = java.util.Collections.unmodifiableList(responses_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.responses_ = responses_; + } else { + result.responses_ = responsesBuilder_.build(); + } + if (snapshotsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + snapshots_ = java.util.Collections.unmodifiableList(snapshots_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.snapshots_ = snapshots_; + } else { + result.snapshots_ = snapshotsBuilder_.build(); + } + result.isError_ = isError_; + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + .getDefaultInstance()) return this; + if (responsesBuilder_ == null) { + if (!other.responses_.isEmpty()) { + if (responses_.isEmpty()) { + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResponsesIsMutable(); + responses_.addAll(other.responses_); + } + onChanged(); + } + } else { + if (!other.responses_.isEmpty()) { + if (responsesBuilder_.isEmpty()) { + responsesBuilder_.dispose(); + responsesBuilder_ = null; + responses_ = other.responses_; + bitField0_ = (bitField0_ & ~0x00000001); + responsesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getResponsesFieldBuilder() + : null; + } else { + responsesBuilder_.addAllMessages(other.responses_); + } + } + } + if (snapshotsBuilder_ == null) { + if (!other.snapshots_.isEmpty()) { + if (snapshots_.isEmpty()) { + snapshots_ = other.snapshots_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureSnapshotsIsMutable(); + snapshots_.addAll(other.snapshots_); + } + onChanged(); + } + } else { + if (!other.snapshots_.isEmpty()) { + if (snapshotsBuilder_.isEmpty()) { + snapshotsBuilder_.dispose(); + snapshotsBuilder_ = null; + snapshots_ = other.snapshots_; + bitField0_ = (bitField0_ & ~0x00000002); + snapshotsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSnapshotsFieldBuilder() + : null; + } else { + snapshotsBuilder_.addAllMessages(other.snapshots_); + } + } + } + if (other.getIsError() != false) { + setIsError(other.getIsError()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List responses_ = + java.util.Collections.emptyList(); + + private void ensureResponsesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + responses_ = new java.util.ArrayList(responses_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.ListenResponse, + com.google.firestore.v1.ListenResponse.Builder, + com.google.firestore.v1.ListenResponseOrBuilder> + responsesBuilder_; + + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public java.util.List getResponsesList() { + if (responsesBuilder_ == null) { + return java.util.Collections.unmodifiableList(responses_); + } else { + return responsesBuilder_.getMessageList(); + } + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public int getResponsesCount() { + if (responsesBuilder_ == null) { + return responses_.size(); + } else { + return responsesBuilder_.getCount(); + } + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public com.google.firestore.v1.ListenResponse getResponses(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessage(index); + } + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public Builder setResponses(int index, com.google.firestore.v1.ListenResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.set(index, value); + onChanged(); + } else { + responsesBuilder_.setMessage(index, value); + } + return this; + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public Builder setResponses( + int index, com.google.firestore.v1.ListenResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.set(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public Builder addResponses(com.google.firestore.v1.ListenResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(value); + onChanged(); + } else { + responsesBuilder_.addMessage(value); + } + return this; + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public Builder addResponses(int index, com.google.firestore.v1.ListenResponse value) { + if (responsesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureResponsesIsMutable(); + responses_.add(index, value); + onChanged(); + } else { + responsesBuilder_.addMessage(index, value); + } + return this; + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public Builder addResponses(com.google.firestore.v1.ListenResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public Builder addResponses( + int index, com.google.firestore.v1.ListenResponse.Builder builderForValue) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.add(index, builderForValue.build()); + onChanged(); + } else { + responsesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public Builder addAllResponses( + java.lang.Iterable values) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, responses_); + onChanged(); + } else { + responsesBuilder_.addAllMessages(values); + } + return this; + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public Builder clearResponses() { + if (responsesBuilder_ == null) { + responses_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + responsesBuilder_.clear(); + } + return this; + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public Builder removeResponses(int index) { + if (responsesBuilder_ == null) { + ensureResponsesIsMutable(); + responses_.remove(index); + onChanged(); + } else { + responsesBuilder_.remove(index); + } + return this; + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public com.google.firestore.v1.ListenResponse.Builder getResponsesBuilder(int index) { + return getResponsesFieldBuilder().getBuilder(index); + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public com.google.firestore.v1.ListenResponseOrBuilder getResponsesOrBuilder(int index) { + if (responsesBuilder_ == null) { + return responses_.get(index); + } else { + return responsesBuilder_.getMessageOrBuilder(index); + } + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public java.util.List + getResponsesOrBuilderList() { + if (responsesBuilder_ != null) { + return responsesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(responses_); + } + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public com.google.firestore.v1.ListenResponse.Builder addResponsesBuilder() { + return getResponsesFieldBuilder() + .addBuilder(com.google.firestore.v1.ListenResponse.getDefaultInstance()); + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public com.google.firestore.v1.ListenResponse.Builder addResponsesBuilder(int index) { + return getResponsesFieldBuilder() + .addBuilder(index, com.google.firestore.v1.ListenResponse.getDefaultInstance()); + } + /** repeated .google.firestore.v1.ListenResponse responses = 1; */ + public java.util.List + getResponsesBuilderList() { + return getResponsesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.ListenResponse, + com.google.firestore.v1.ListenResponse.Builder, + com.google.firestore.v1.ListenResponseOrBuilder> + getResponsesFieldBuilder() { + if (responsesBuilder_ == null) { + responsesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.ListenResponse, + com.google.firestore.v1.ListenResponse.Builder, + com.google.firestore.v1.ListenResponseOrBuilder>( + responses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + responses_ = null; + } + return responsesBuilder_; + } + + private java.util.List + snapshots_ = java.util.Collections.emptyList(); + + private void ensureSnapshotsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + snapshots_ = + new java.util.ArrayList< + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot>(snapshots_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot, + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.SnapshotOrBuilder> + snapshotsBuilder_; + + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public java.util.List + getSnapshotsList() { + if (snapshotsBuilder_ == null) { + return java.util.Collections.unmodifiableList(snapshots_); + } else { + return snapshotsBuilder_.getMessageList(); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public int getSnapshotsCount() { + if (snapshotsBuilder_ == null) { + return snapshots_.size(); + } else { + return snapshotsBuilder_.getCount(); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot getSnapshots( + int index) { + if (snapshotsBuilder_ == null) { + return snapshots_.get(index); + } else { + return snapshotsBuilder_.getMessage(index); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public Builder setSnapshots( + int index, com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot value) { + if (snapshotsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSnapshotsIsMutable(); + snapshots_.set(index, value); + onChanged(); + } else { + snapshotsBuilder_.setMessage(index, value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public Builder setSnapshots( + int index, + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.Builder + builderForValue) { + if (snapshotsBuilder_ == null) { + ensureSnapshotsIsMutable(); + snapshots_.set(index, builderForValue.build()); + onChanged(); + } else { + snapshotsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public Builder addSnapshots( + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot value) { + if (snapshotsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSnapshotsIsMutable(); + snapshots_.add(value); + onChanged(); + } else { + snapshotsBuilder_.addMessage(value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public Builder addSnapshots( + int index, com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot value) { + if (snapshotsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSnapshotsIsMutable(); + snapshots_.add(index, value); + onChanged(); + } else { + snapshotsBuilder_.addMessage(index, value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public Builder addSnapshots( + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.Builder + builderForValue) { + if (snapshotsBuilder_ == null) { + ensureSnapshotsIsMutable(); + snapshots_.add(builderForValue.build()); + onChanged(); + } else { + snapshotsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public Builder addSnapshots( + int index, + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.Builder + builderForValue) { + if (snapshotsBuilder_ == null) { + ensureSnapshotsIsMutable(); + snapshots_.add(index, builderForValue.build()); + onChanged(); + } else { + snapshotsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public Builder addAllSnapshots( + java.lang.Iterable< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot> + values) { + if (snapshotsBuilder_ == null) { + ensureSnapshotsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, snapshots_); + onChanged(); + } else { + snapshotsBuilder_.addAllMessages(values); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public Builder clearSnapshots() { + if (snapshotsBuilder_ == null) { + snapshots_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + snapshotsBuilder_.clear(); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public Builder removeSnapshots(int index) { + if (snapshotsBuilder_ == null) { + ensureSnapshotsIsMutable(); + snapshots_.remove(index); + onChanged(); + } else { + snapshotsBuilder_.remove(index); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.Builder + getSnapshotsBuilder(int index) { + return getSnapshotsFieldBuilder().getBuilder(index); + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.SnapshotOrBuilder + getSnapshotsOrBuilder(int index) { + if (snapshotsBuilder_ == null) { + return snapshots_.get(index); + } else { + return snapshotsBuilder_.getMessageOrBuilder(index); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.SnapshotOrBuilder> + getSnapshotsOrBuilderList() { + if (snapshotsBuilder_ != null) { + return snapshotsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(snapshots_); + } + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.Builder + addSnapshotsBuilder() { + return getSnapshotsFieldBuilder() + .addBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot + .getDefaultInstance()); + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.Builder + addSnapshotsBuilder(int index) { + return getSnapshotsFieldBuilder() + .addBuilder( + index, + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot + .getDefaultInstance()); + } + /** repeated .google.cloud.conformance.firestore.v1.Snapshot snapshots = 2; */ + public java.util.List< + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.Builder> + getSnapshotsBuilderList() { + return getSnapshotsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot, + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.SnapshotOrBuilder> + getSnapshotsFieldBuilder() { + if (snapshotsBuilder_ == null) { + snapshotsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot, + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.SnapshotOrBuilder>( + snapshots_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + snapshots_ = null; + } + return snapshotsBuilder_; + } + + private boolean isError_; + /** bool is_error = 3; */ + public boolean getIsError() { + return isError_; + } + /** bool is_error = 3; */ + public Builder setIsError(boolean value) { + + isError_ = value; + onChanged(); + return this; + } + /** bool is_error = 3; */ + public Builder clearIsError() { + + isError_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.ListenTest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.ListenTest) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListenTest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListenTest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.ListenTest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SnapshotOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.Snapshot) + com.google.protobuf.MessageOrBuilder { + + /** repeated .google.firestore.v1.Document docs = 1; */ + java.util.List getDocsList(); + /** repeated .google.firestore.v1.Document docs = 1; */ + com.google.firestore.v1.Document getDocs(int index); + /** repeated .google.firestore.v1.Document docs = 1; */ + int getDocsCount(); + /** repeated .google.firestore.v1.Document docs = 1; */ + java.util.List getDocsOrBuilderList(); + /** repeated .google.firestore.v1.Document docs = 1; */ + com.google.firestore.v1.DocumentOrBuilder getDocsOrBuilder(int index); + + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + java.util.List + getChangesList(); + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange getChanges(int index); + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + int getChangesCount(); + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.DocChangeOrBuilder> + getChangesOrBuilderList(); + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChangeOrBuilder getChangesOrBuilder( + int index); + + /** .google.protobuf.Timestamp read_time = 3; */ + boolean hasReadTime(); + /** .google.protobuf.Timestamp read_time = 3; */ + com.google.protobuf.Timestamp getReadTime(); + /** .google.protobuf.Timestamp read_time = 3; */ + com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder(); + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.Snapshot} */ + public static final class Snapshot extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.Snapshot) + SnapshotOrBuilder { + private static final long serialVersionUID = 0L; + // Use Snapshot.newBuilder() to construct. + private Snapshot(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Snapshot() { + docs_ = java.util.Collections.emptyList(); + changes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Snapshot( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + docs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + docs_.add( + input.readMessage( + com.google.firestore.v1.Document.parser(), extensionRegistry)); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + changes_ = + new java.util.ArrayList< + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange>(); + mutable_bitField0_ |= 0x00000002; + } + changes_.add( + input.readMessage( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.parser(), + extensionRegistry)); + break; + } + case 26: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (readTime_ != null) { + subBuilder = readTime_.toBuilder(); + } + readTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(readTime_); + readTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + docs_ = java.util.Collections.unmodifiableList(docs_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + changes_ = java.util.Collections.unmodifiableList(changes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Snapshot_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Snapshot_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.Builder.class); + } + + private int bitField0_; + public static final int DOCS_FIELD_NUMBER = 1; + private java.util.List docs_; + /** repeated .google.firestore.v1.Document docs = 1; */ + public java.util.List getDocsList() { + return docs_; + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public java.util.List + getDocsOrBuilderList() { + return docs_; + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public int getDocsCount() { + return docs_.size(); + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public com.google.firestore.v1.Document getDocs(int index) { + return docs_.get(index); + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public com.google.firestore.v1.DocumentOrBuilder getDocsOrBuilder(int index) { + return docs_.get(index); + } + + public static final int CHANGES_FIELD_NUMBER = 2; + private java.util.List + changes_; + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public java.util.List + getChangesList() { + return changes_; + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.DocChangeOrBuilder> + getChangesOrBuilderList() { + return changes_; + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public int getChangesCount() { + return changes_.size(); + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange getChanges( + int index) { + return changes_.get(index); + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocChangeOrBuilder + getChangesOrBuilder(int index) { + return changes_.get(index); + } + + public static final int READ_TIME_FIELD_NUMBER = 3; + private com.google.protobuf.Timestamp readTime_; + /** .google.protobuf.Timestamp read_time = 3; */ + public boolean hasReadTime() { + return readTime_ != null; + } + /** .google.protobuf.Timestamp read_time = 3; */ + public com.google.protobuf.Timestamp getReadTime() { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + /** .google.protobuf.Timestamp read_time = 3; */ + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + return getReadTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < docs_.size(); i++) { + output.writeMessage(1, docs_.get(i)); + } + for (int i = 0; i < changes_.size(); i++) { + output.writeMessage(2, changes_.get(i)); + } + if (readTime_ != null) { + output.writeMessage(3, getReadTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < docs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, docs_.get(i)); + } + for (int i = 0; i < changes_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, changes_.get(i)); + } + if (readTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getReadTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot) obj; + + if (!getDocsList().equals(other.getDocsList())) return false; + if (!getChangesList().equals(other.getChangesList())) return false; + if (hasReadTime() != other.hasReadTime()) return false; + if (hasReadTime()) { + if (!getReadTime().equals(other.getReadTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getDocsCount() > 0) { + hash = (37 * hash) + DOCS_FIELD_NUMBER; + hash = (53 * hash) + getDocsList().hashCode(); + } + if (getChangesCount() > 0) { + hash = (37 * hash) + CHANGES_FIELD_NUMBER; + hash = (53 * hash) + getChangesList().hashCode(); + } + if (hasReadTime()) { + hash = (37 * hash) + READ_TIME_FIELD_NUMBER; + hash = (53 * hash) + getReadTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.Snapshot} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.Snapshot) + com.google.cloud.conformance.firestore.v1.TestDefinition.SnapshotOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Snapshot_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Snapshot_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getDocsFieldBuilder(); + getChangesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (docsBuilder_ == null) { + docs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + docsBuilder_.clear(); + } + if (changesBuilder_ == null) { + changes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + changesBuilder_.clear(); + } + if (readTimeBuilder_ == null) { + readTime_ = null; + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_Snapshot_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot(this); + int from_bitField0_ = bitField0_; + int to_bitField0_ = 0; + if (docsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + docs_ = java.util.Collections.unmodifiableList(docs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.docs_ = docs_; + } else { + result.docs_ = docsBuilder_.build(); + } + if (changesBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + changes_ = java.util.Collections.unmodifiableList(changes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.changes_ = changes_; + } else { + result.changes_ = changesBuilder_.build(); + } + if (readTimeBuilder_ == null) { + result.readTime_ = readTime_; + } else { + result.readTime_ = readTimeBuilder_.build(); + } + result.bitField0_ = to_bitField0_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot + .getDefaultInstance()) return this; + if (docsBuilder_ == null) { + if (!other.docs_.isEmpty()) { + if (docs_.isEmpty()) { + docs_ = other.docs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDocsIsMutable(); + docs_.addAll(other.docs_); + } + onChanged(); + } + } else { + if (!other.docs_.isEmpty()) { + if (docsBuilder_.isEmpty()) { + docsBuilder_.dispose(); + docsBuilder_ = null; + docs_ = other.docs_; + bitField0_ = (bitField0_ & ~0x00000001); + docsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDocsFieldBuilder() + : null; + } else { + docsBuilder_.addAllMessages(other.docs_); + } + } + } + if (changesBuilder_ == null) { + if (!other.changes_.isEmpty()) { + if (changes_.isEmpty()) { + changes_ = other.changes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureChangesIsMutable(); + changes_.addAll(other.changes_); + } + onChanged(); + } + } else { + if (!other.changes_.isEmpty()) { + if (changesBuilder_.isEmpty()) { + changesBuilder_.dispose(); + changesBuilder_ = null; + changes_ = other.changes_; + bitField0_ = (bitField0_ & ~0x00000002); + changesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getChangesFieldBuilder() + : null; + } else { + changesBuilder_.addAllMessages(other.changes_); + } + } + } + if (other.hasReadTime()) { + mergeReadTime(other.getReadTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List docs_ = + java.util.Collections.emptyList(); + + private void ensureDocsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + docs_ = new java.util.ArrayList(docs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Document, + com.google.firestore.v1.Document.Builder, + com.google.firestore.v1.DocumentOrBuilder> + docsBuilder_; + + /** repeated .google.firestore.v1.Document docs = 1; */ + public java.util.List getDocsList() { + if (docsBuilder_ == null) { + return java.util.Collections.unmodifiableList(docs_); + } else { + return docsBuilder_.getMessageList(); + } + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public int getDocsCount() { + if (docsBuilder_ == null) { + return docs_.size(); + } else { + return docsBuilder_.getCount(); + } + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public com.google.firestore.v1.Document getDocs(int index) { + if (docsBuilder_ == null) { + return docs_.get(index); + } else { + return docsBuilder_.getMessage(index); + } + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public Builder setDocs(int index, com.google.firestore.v1.Document value) { + if (docsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocsIsMutable(); + docs_.set(index, value); + onChanged(); + } else { + docsBuilder_.setMessage(index, value); + } + return this; + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public Builder setDocs(int index, com.google.firestore.v1.Document.Builder builderForValue) { + if (docsBuilder_ == null) { + ensureDocsIsMutable(); + docs_.set(index, builderForValue.build()); + onChanged(); + } else { + docsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public Builder addDocs(com.google.firestore.v1.Document value) { + if (docsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocsIsMutable(); + docs_.add(value); + onChanged(); + } else { + docsBuilder_.addMessage(value); + } + return this; + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public Builder addDocs(int index, com.google.firestore.v1.Document value) { + if (docsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDocsIsMutable(); + docs_.add(index, value); + onChanged(); + } else { + docsBuilder_.addMessage(index, value); + } + return this; + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public Builder addDocs(com.google.firestore.v1.Document.Builder builderForValue) { + if (docsBuilder_ == null) { + ensureDocsIsMutable(); + docs_.add(builderForValue.build()); + onChanged(); + } else { + docsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public Builder addDocs(int index, com.google.firestore.v1.Document.Builder builderForValue) { + if (docsBuilder_ == null) { + ensureDocsIsMutable(); + docs_.add(index, builderForValue.build()); + onChanged(); + } else { + docsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public Builder addAllDocs( + java.lang.Iterable values) { + if (docsBuilder_ == null) { + ensureDocsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, docs_); + onChanged(); + } else { + docsBuilder_.addAllMessages(values); + } + return this; + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public Builder clearDocs() { + if (docsBuilder_ == null) { + docs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + docsBuilder_.clear(); + } + return this; + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public Builder removeDocs(int index) { + if (docsBuilder_ == null) { + ensureDocsIsMutable(); + docs_.remove(index); + onChanged(); + } else { + docsBuilder_.remove(index); + } + return this; + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public com.google.firestore.v1.Document.Builder getDocsBuilder(int index) { + return getDocsFieldBuilder().getBuilder(index); + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public com.google.firestore.v1.DocumentOrBuilder getDocsOrBuilder(int index) { + if (docsBuilder_ == null) { + return docs_.get(index); + } else { + return docsBuilder_.getMessageOrBuilder(index); + } + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public java.util.List + getDocsOrBuilderList() { + if (docsBuilder_ != null) { + return docsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(docs_); + } + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public com.google.firestore.v1.Document.Builder addDocsBuilder() { + return getDocsFieldBuilder() + .addBuilder(com.google.firestore.v1.Document.getDefaultInstance()); + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public com.google.firestore.v1.Document.Builder addDocsBuilder(int index) { + return getDocsFieldBuilder() + .addBuilder(index, com.google.firestore.v1.Document.getDefaultInstance()); + } + /** repeated .google.firestore.v1.Document docs = 1; */ + public java.util.List getDocsBuilderList() { + return getDocsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Document, + com.google.firestore.v1.Document.Builder, + com.google.firestore.v1.DocumentOrBuilder> + getDocsFieldBuilder() { + if (docsBuilder_ == null) { + docsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.firestore.v1.Document, + com.google.firestore.v1.Document.Builder, + com.google.firestore.v1.DocumentOrBuilder>( + docs_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + docs_ = null; + } + return docsBuilder_; + } + + private java.util.List + changes_ = java.util.Collections.emptyList(); + + private void ensureChangesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + changes_ = + new java.util.ArrayList< + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange>(changes_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChangeOrBuilder> + changesBuilder_; + + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public java.util.List + getChangesList() { + if (changesBuilder_ == null) { + return java.util.Collections.unmodifiableList(changes_); + } else { + return changesBuilder_.getMessageList(); + } + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public int getChangesCount() { + if (changesBuilder_ == null) { + return changes_.size(); + } else { + return changesBuilder_.getCount(); + } + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange getChanges( + int index) { + if (changesBuilder_ == null) { + return changes_.get(index); + } else { + return changesBuilder_.getMessage(index); + } + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public Builder setChanges( + int index, com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange value) { + if (changesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangesIsMutable(); + changes_.set(index, value); + onChanged(); + } else { + changesBuilder_.setMessage(index, value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public Builder setChanges( + int index, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Builder + builderForValue) { + if (changesBuilder_ == null) { + ensureChangesIsMutable(); + changes_.set(index, builderForValue.build()); + onChanged(); + } else { + changesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public Builder addChanges( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange value) { + if (changesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangesIsMutable(); + changes_.add(value); + onChanged(); + } else { + changesBuilder_.addMessage(value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public Builder addChanges( + int index, com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange value) { + if (changesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangesIsMutable(); + changes_.add(index, value); + onChanged(); + } else { + changesBuilder_.addMessage(index, value); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public Builder addChanges( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Builder + builderForValue) { + if (changesBuilder_ == null) { + ensureChangesIsMutable(); + changes_.add(builderForValue.build()); + onChanged(); + } else { + changesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public Builder addChanges( + int index, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Builder + builderForValue) { + if (changesBuilder_ == null) { + ensureChangesIsMutable(); + changes_.add(index, builderForValue.build()); + onChanged(); + } else { + changesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public Builder addAllChanges( + java.lang.Iterable< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange> + values) { + if (changesBuilder_ == null) { + ensureChangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, changes_); + onChanged(); + } else { + changesBuilder_.addAllMessages(values); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public Builder clearChanges() { + if (changesBuilder_ == null) { + changes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + changesBuilder_.clear(); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public Builder removeChanges(int index) { + if (changesBuilder_ == null) { + ensureChangesIsMutable(); + changes_.remove(index); + onChanged(); + } else { + changesBuilder_.remove(index); + } + return this; + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Builder + getChangesBuilder(int index) { + return getChangesFieldBuilder().getBuilder(index); + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocChangeOrBuilder + getChangesOrBuilder(int index) { + if (changesBuilder_ == null) { + return changes_.get(index); + } else { + return changesBuilder_.getMessageOrBuilder(index); + } + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public java.util.List< + ? extends com.google.cloud.conformance.firestore.v1.TestDefinition.DocChangeOrBuilder> + getChangesOrBuilderList() { + if (changesBuilder_ != null) { + return changesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(changes_); + } + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Builder + addChangesBuilder() { + return getChangesFieldBuilder() + .addBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange + .getDefaultInstance()); + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Builder + addChangesBuilder(int index) { + return getChangesFieldBuilder() + .addBuilder( + index, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange + .getDefaultInstance()); + } + /** repeated .google.cloud.conformance.firestore.v1.DocChange changes = 2; */ + public java.util.List< + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Builder> + getChangesBuilderList() { + return getChangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChangeOrBuilder> + getChangesFieldBuilder() { + if (changesBuilder_ == null) { + changesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Builder, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChangeOrBuilder>( + changes_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + changes_ = null; + } + return changesBuilder_; + } + + private com.google.protobuf.Timestamp readTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + readTimeBuilder_; + /** .google.protobuf.Timestamp read_time = 3; */ + public boolean hasReadTime() { + return readTimeBuilder_ != null || readTime_ != null; + } + /** .google.protobuf.Timestamp read_time = 3; */ + public com.google.protobuf.Timestamp getReadTime() { + if (readTimeBuilder_ == null) { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } else { + return readTimeBuilder_.getMessage(); + } + } + /** .google.protobuf.Timestamp read_time = 3; */ + public Builder setReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + readTime_ = value; + onChanged(); + } else { + readTimeBuilder_.setMessage(value); + } + + return this; + } + /** .google.protobuf.Timestamp read_time = 3; */ + public Builder setReadTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (readTimeBuilder_ == null) { + readTime_ = builderForValue.build(); + onChanged(); + } else { + readTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .google.protobuf.Timestamp read_time = 3; */ + public Builder mergeReadTime(com.google.protobuf.Timestamp value) { + if (readTimeBuilder_ == null) { + if (readTime_ != null) { + readTime_ = + com.google.protobuf.Timestamp.newBuilder(readTime_).mergeFrom(value).buildPartial(); + } else { + readTime_ = value; + } + onChanged(); + } else { + readTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** .google.protobuf.Timestamp read_time = 3; */ + public Builder clearReadTime() { + if (readTimeBuilder_ == null) { + readTime_ = null; + onChanged(); + } else { + readTime_ = null; + readTimeBuilder_ = null; + } + + return this; + } + /** .google.protobuf.Timestamp read_time = 3; */ + public com.google.protobuf.Timestamp.Builder getReadTimeBuilder() { + + onChanged(); + return getReadTimeFieldBuilder().getBuilder(); + } + /** .google.protobuf.Timestamp read_time = 3; */ + public com.google.protobuf.TimestampOrBuilder getReadTimeOrBuilder() { + if (readTimeBuilder_ != null) { + return readTimeBuilder_.getMessageOrBuilder(); + } else { + return readTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : readTime_; + } + } + /** .google.protobuf.Timestamp read_time = 3; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getReadTimeFieldBuilder() { + if (readTimeBuilder_ == null) { + readTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getReadTime(), getParentForChildren(), isClean()); + readTime_ = null; + } + return readTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.Snapshot) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.Snapshot) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Snapshot parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Snapshot(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.Snapshot + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DocChangeOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.conformance.firestore.v1.DocChange) + com.google.protobuf.MessageOrBuilder { + + /** .google.cloud.conformance.firestore.v1.DocChange.Kind kind = 1; */ + int getKindValue(); + /** .google.cloud.conformance.firestore.v1.DocChange.Kind kind = 1; */ + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Kind getKind(); + + /** .google.firestore.v1.Document doc = 2; */ + boolean hasDoc(); + /** .google.firestore.v1.Document doc = 2; */ + com.google.firestore.v1.Document getDoc(); + /** .google.firestore.v1.Document doc = 2; */ + com.google.firestore.v1.DocumentOrBuilder getDocOrBuilder(); + + /** int32 old_index = 3; */ + int getOldIndex(); + + /** int32 new_index = 4; */ + int getNewIndex(); + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.DocChange} */ + public static final class DocChange extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.conformance.firestore.v1.DocChange) + DocChangeOrBuilder { + private static final long serialVersionUID = 0L; + // Use DocChange.newBuilder() to construct. + private DocChange(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DocChange() { + kind_ = 0; + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DocChange( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + kind_ = rawValue; + break; + } + case 18: + { + com.google.firestore.v1.Document.Builder subBuilder = null; + if (doc_ != null) { + subBuilder = doc_.toBuilder(); + } + doc_ = + input.readMessage(com.google.firestore.v1.Document.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(doc_); + doc_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + oldIndex_ = input.readInt32(); + break; + } + case 32: + { + newIndex_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DocChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DocChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Builder.class); + } + + /** Protobuf enum {@code google.cloud.conformance.firestore.v1.DocChange.Kind} */ + public enum Kind implements com.google.protobuf.ProtocolMessageEnum { + /** KIND_UNSPECIFIED = 0; */ + KIND_UNSPECIFIED(0), + /** ADDED = 1; */ + ADDED(1), + /** REMOVED = 2; */ + REMOVED(2), + /** MODIFIED = 3; */ + MODIFIED(3), + UNRECOGNIZED(-1), + ; + + /** KIND_UNSPECIFIED = 0; */ + public static final int KIND_UNSPECIFIED_VALUE = 0; + /** ADDED = 1; */ + public static final int ADDED_VALUE = 1; + /** REMOVED = 2; */ + public static final int REMOVED_VALUE = 2; + /** MODIFIED = 3; */ + public static final int MODIFIED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** @deprecated Use {@link #forNumber(int)} instead. */ + @java.lang.Deprecated + public static Kind valueOf(int value) { + return forNumber(value); + } + + public static Kind forNumber(int value) { + switch (value) { + case 0: + return KIND_UNSPECIFIED; + case 1: + return ADDED; + case 2: + return REMOVED; + case 3: + return MODIFIED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Kind findValueByNumber(int number) { + return Kind.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Kind[] VALUES = values(); + + public static Kind valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) { + if (desc.getType() != getDescriptor()) { + throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type."); + } + if (desc.getIndex() == -1) { + return UNRECOGNIZED; + } + return VALUES[desc.getIndex()]; + } + + private final int value; + + private Kind(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.conformance.firestore.v1.DocChange.Kind) + } + + public static final int KIND_FIELD_NUMBER = 1; + private int kind_; + /** .google.cloud.conformance.firestore.v1.DocChange.Kind kind = 1; */ + public int getKindValue() { + return kind_; + } + /** .google.cloud.conformance.firestore.v1.DocChange.Kind kind = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Kind getKind() { + @SuppressWarnings("deprecation") + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Kind result = + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Kind.valueOf(kind_); + return result == null + ? com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Kind.UNRECOGNIZED + : result; + } + + public static final int DOC_FIELD_NUMBER = 2; + private com.google.firestore.v1.Document doc_; + /** .google.firestore.v1.Document doc = 2; */ + public boolean hasDoc() { + return doc_ != null; + } + /** .google.firestore.v1.Document doc = 2; */ + public com.google.firestore.v1.Document getDoc() { + return doc_ == null ? com.google.firestore.v1.Document.getDefaultInstance() : doc_; + } + /** .google.firestore.v1.Document doc = 2; */ + public com.google.firestore.v1.DocumentOrBuilder getDocOrBuilder() { + return getDoc(); + } + + public static final int OLD_INDEX_FIELD_NUMBER = 3; + private int oldIndex_; + /** int32 old_index = 3; */ + public int getOldIndex() { + return oldIndex_; + } + + public static final int NEW_INDEX_FIELD_NUMBER = 4; + private int newIndex_; + /** int32 new_index = 4; */ + public int getNewIndex() { + return newIndex_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kind_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Kind + .KIND_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, kind_); + } + if (doc_ != null) { + output.writeMessage(2, getDoc()); + } + if (oldIndex_ != 0) { + output.writeInt32(3, oldIndex_); + } + if (newIndex_ != 0) { + output.writeInt32(4, newIndex_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kind_ + != com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Kind + .KIND_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, kind_); + } + if (doc_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getDoc()); + } + if (oldIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, oldIndex_); + } + if (newIndex_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, newIndex_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange)) { + return super.equals(obj); + } + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange other = + (com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange) obj; + + if (kind_ != other.kind_) return false; + if (hasDoc() != other.hasDoc()) return false; + if (hasDoc()) { + if (!getDoc().equals(other.getDoc())) return false; + } + if (getOldIndex() != other.getOldIndex()) return false; + if (getNewIndex() != other.getNewIndex()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + if (hasDoc()) { + hash = (37 * hash) + DOC_FIELD_NUMBER; + hash = (53 * hash) + getDoc().hashCode(); + } + hash = (37 * hash) + OLD_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getOldIndex(); + hash = (37 * hash) + NEW_INDEX_FIELD_NUMBER; + hash = (53 * hash) + getNewIndex(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** Protobuf type {@code google.cloud.conformance.firestore.v1.DocChange} */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.conformance.firestore.v1.DocChange) + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChangeOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DocChange_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DocChange_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.class, + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Builder.class); + } + + // Construct using + // com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + kind_ = 0; + + if (docBuilder_ == null) { + doc_ = null; + } else { + doc_ = null; + docBuilder_ = null; + } + oldIndex_ = 0; + + newIndex_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition + .internal_static_google_cloud_conformance_firestore_v1_DocChange_descriptor; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange + getDefaultInstanceForType() { + return com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange build() { + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange buildPartial() { + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange result = + new com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange(this); + result.kind_ = kind_; + if (docBuilder_ == null) { + result.doc_ = doc_; + } else { + result.doc_ = docBuilder_.build(); + } + result.oldIndex_ = oldIndex_; + result.newIndex_ = newIndex_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange) { + return mergeFrom( + (com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange other) { + if (other + == com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange + .getDefaultInstance()) return this; + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (other.hasDoc()) { + mergeDoc(other.getDoc()); + } + if (other.getOldIndex() != 0) { + setOldIndex(other.getOldIndex()); + } + if (other.getNewIndex() != 0) { + setNewIndex(other.getNewIndex()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int kind_ = 0; + /** .google.cloud.conformance.firestore.v1.DocChange.Kind kind = 1; */ + public int getKindValue() { + return kind_; + } + /** .google.cloud.conformance.firestore.v1.DocChange.Kind kind = 1; */ + public Builder setKindValue(int value) { + kind_ = value; + onChanged(); + return this; + } + /** .google.cloud.conformance.firestore.v1.DocChange.Kind kind = 1; */ + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Kind getKind() { + @SuppressWarnings("deprecation") + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Kind result = + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Kind.valueOf(kind_); + return result == null + ? com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Kind.UNRECOGNIZED + : result; + } + /** .google.cloud.conformance.firestore.v1.DocChange.Kind kind = 1; */ + public Builder setKind( + com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange.Kind value) { + if (value == null) { + throw new NullPointerException(); + } + + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** .google.cloud.conformance.firestore.v1.DocChange.Kind kind = 1; */ + public Builder clearKind() { + + kind_ = 0; + onChanged(); + return this; + } + + private com.google.firestore.v1.Document doc_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Document, + com.google.firestore.v1.Document.Builder, + com.google.firestore.v1.DocumentOrBuilder> + docBuilder_; + /** .google.firestore.v1.Document doc = 2; */ + public boolean hasDoc() { + return docBuilder_ != null || doc_ != null; + } + /** .google.firestore.v1.Document doc = 2; */ + public com.google.firestore.v1.Document getDoc() { + if (docBuilder_ == null) { + return doc_ == null ? com.google.firestore.v1.Document.getDefaultInstance() : doc_; + } else { + return docBuilder_.getMessage(); + } + } + /** .google.firestore.v1.Document doc = 2; */ + public Builder setDoc(com.google.firestore.v1.Document value) { + if (docBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + doc_ = value; + onChanged(); + } else { + docBuilder_.setMessage(value); + } + + return this; + } + /** .google.firestore.v1.Document doc = 2; */ + public Builder setDoc(com.google.firestore.v1.Document.Builder builderForValue) { + if (docBuilder_ == null) { + doc_ = builderForValue.build(); + onChanged(); + } else { + docBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** .google.firestore.v1.Document doc = 2; */ + public Builder mergeDoc(com.google.firestore.v1.Document value) { + if (docBuilder_ == null) { + if (doc_ != null) { + doc_ = + com.google.firestore.v1.Document.newBuilder(doc_).mergeFrom(value).buildPartial(); + } else { + doc_ = value; + } + onChanged(); + } else { + docBuilder_.mergeFrom(value); + } + + return this; + } + /** .google.firestore.v1.Document doc = 2; */ + public Builder clearDoc() { + if (docBuilder_ == null) { + doc_ = null; + onChanged(); + } else { + doc_ = null; + docBuilder_ = null; + } + + return this; + } + /** .google.firestore.v1.Document doc = 2; */ + public com.google.firestore.v1.Document.Builder getDocBuilder() { + + onChanged(); + return getDocFieldBuilder().getBuilder(); + } + /** .google.firestore.v1.Document doc = 2; */ + public com.google.firestore.v1.DocumentOrBuilder getDocOrBuilder() { + if (docBuilder_ != null) { + return docBuilder_.getMessageOrBuilder(); + } else { + return doc_ == null ? com.google.firestore.v1.Document.getDefaultInstance() : doc_; + } + } + /** .google.firestore.v1.Document doc = 2; */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Document, + com.google.firestore.v1.Document.Builder, + com.google.firestore.v1.DocumentOrBuilder> + getDocFieldBuilder() { + if (docBuilder_ == null) { + docBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.firestore.v1.Document, + com.google.firestore.v1.Document.Builder, + com.google.firestore.v1.DocumentOrBuilder>( + getDoc(), getParentForChildren(), isClean()); + doc_ = null; + } + return docBuilder_; + } + + private int oldIndex_; + /** int32 old_index = 3; */ + public int getOldIndex() { + return oldIndex_; + } + /** int32 old_index = 3; */ + public Builder setOldIndex(int value) { + + oldIndex_ = value; + onChanged(); + return this; + } + /** int32 old_index = 3; */ + public Builder clearOldIndex() { + + oldIndex_ = 0; + onChanged(); + return this; + } + + private int newIndex_; + /** int32 new_index = 4; */ + public int getNewIndex() { + return newIndex_; + } + /** int32 new_index = 4; */ + public Builder setNewIndex(int value) { + + newIndex_ = value; + onChanged(); + return this; + } + /** int32 new_index = 4; */ + public Builder clearNewIndex() { + + newIndex_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.conformance.firestore.v1.DocChange) + } + + // @@protoc_insertion_point(class_scope:google.cloud.conformance.firestore.v1.DocChange) + private static final com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange(); + } + + public static com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DocChange parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DocChange(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.conformance.firestore.v1.TestDefinition.DocChange + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_TestFile_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_TestFile_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_Test_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_Test_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_GetTest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_GetTest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_CreateTest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_CreateTest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_SetTest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_SetTest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_UpdateTest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_UpdateTest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_UpdatePathsTest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_UpdatePathsTest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_DeleteTest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_DeleteTest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_SetOption_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_SetOption_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_QueryTest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_QueryTest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_Clause_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_Clause_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_Select_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_Select_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_Where_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_Where_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_OrderBy_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_OrderBy_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_Cursor_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_Cursor_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_DocSnapshot_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_DocSnapshot_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_FieldPath_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_FieldPath_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_ListenTest_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_ListenTest_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_Snapshot_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_Snapshot_fieldAccessorTable; + private static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_conformance_firestore_v1_DocChange_descriptor; + private static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_conformance_firestore_v1_DocChange_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n1google/cloud/conformance/firestore/v1/" + + "tests.proto\022%google.cloud.conformance.fi" + + "restore.v1\032 google/firestore/v1/common.p" + + "roto\032\"google/firestore/v1/document.proto" + + "\032#google/firestore/v1/firestore.proto\032\037g" + + "oogle/firestore/v1/query.proto\032\037google/p" + + "rotobuf/timestamp.proto\"F\n\010TestFile\022:\n\005t" + + "ests\030\001 \003(\0132+.google.cloud.conformance.fi" + + "restore.v1.Test\"\331\004\n\004Test\022\023\n\013description\030" + + "\001 \001(\t\022\017\n\007comment\030\n \001(\t\022=\n\003get\030\002 \001(\0132..go" + + "ogle.cloud.conformance.firestore.v1.GetT" + + "estH\000\022C\n\006create\030\003 \001(\01321.google.cloud.con" + + "formance.firestore.v1.CreateTestH\000\022=\n\003se" + + "t\030\004 \001(\0132..google.cloud.conformance.fires" + + "tore.v1.SetTestH\000\022C\n\006update\030\005 \001(\01321.goog" + + "le.cloud.conformance.firestore.v1.Update" + + "TestH\000\022N\n\014update_paths\030\006 \001(\01326.google.cl" + + "oud.conformance.firestore.v1.UpdatePaths" + + "TestH\000\022C\n\006delete\030\007 \001(\01321.google.cloud.co" + + "nformance.firestore.v1.DeleteTestH\000\022A\n\005q" + + "uery\030\010 \001(\01320.google.cloud.conformance.fi" + + "restore.v1.QueryTestH\000\022C\n\006listen\030\t \001(\01321" + + ".google.cloud.conformance.firestore.v1.L" + + "istenTestH\000B\006\n\004test\"Y\n\007GetTest\022\024\n\014doc_re" + + "f_path\030\001 \001(\t\0228\n\007request\030\002 \001(\0132\'.google.f" + + "irestore.v1.GetDocumentRequest\"|\n\nCreate" + + "Test\022\024\n\014doc_ref_path\030\001 \001(\t\022\021\n\tjson_data\030" + + "\002 \001(\t\0223\n\007request\030\003 \001(\0132\".google.firestor" + + "e.v1.CommitRequest\022\020\n\010is_error\030\004 \001(\010\"\273\001\n" + + "\007SetTest\022\024\n\014doc_ref_path\030\001 \001(\t\022@\n\006option" + + "\030\002 \001(\01320.google.cloud.conformance.firest" + + "ore.v1.SetOption\022\021\n\tjson_data\030\003 \001(\t\0223\n\007r" + + "equest\030\004 \001(\0132\".google.firestore.v1.Commi" + + "tRequest\022\020\n\010is_error\030\005 \001(\010\"\265\001\n\nUpdateTes" + + "t\022\024\n\014doc_ref_path\030\001 \001(\t\0227\n\014precondition\030" + + "\002 \001(\0132!.google.firestore.v1.Precondition" + + "\022\021\n\tjson_data\030\003 \001(\t\0223\n\007request\030\004 \001(\0132\".g" + + "oogle.firestore.v1.CommitRequest\022\020\n\010is_e" + + "rror\030\005 \001(\010\"\203\002\n\017UpdatePathsTest\022\024\n\014doc_re" + + "f_path\030\001 \001(\t\0227\n\014precondition\030\002 \001(\0132!.goo" + + "gle.firestore.v1.Precondition\022E\n\013field_p" + + "aths\030\003 \003(\01320.google.cloud.conformance.fi" + + "restore.v1.FieldPath\022\023\n\013json_values\030\004 \003(" + + "\t\0223\n\007request\030\005 \001(\0132\".google.firestore.v1" + + ".CommitRequest\022\020\n\010is_error\030\006 \001(\010\"\242\001\n\nDel" + + "eteTest\022\024\n\014doc_ref_path\030\001 \001(\t\0227\n\014precond" + + "ition\030\002 \001(\0132!.google.firestore.v1.Precon" + + "dition\0223\n\007request\030\003 \001(\0132\".google.firesto" + + "re.v1.CommitRequest\022\020\n\010is_error\030\004 \001(\010\"Z\n" + + "\tSetOption\022\013\n\003all\030\001 \001(\010\022@\n\006fields\030\002 \003(\0132" + + "0.google.cloud.conformance.firestore.v1." + + "FieldPath\"\245\001\n\tQueryTest\022\021\n\tcoll_path\030\001 \001" + + "(\t\022>\n\007clauses\030\002 \003(\0132-.google.cloud.confo" + + "rmance.firestore.v1.Clause\0223\n\005query\030\003 \001(" + + "\0132$.google.firestore.v1.StructuredQuery\022" + + "\020\n\010is_error\030\004 \001(\010\"\210\004\n\006Clause\022?\n\006select\030\001" + + " \001(\0132-.google.cloud.conformance.firestor" + + "e.v1.SelectH\000\022=\n\005where\030\002 \001(\0132,.google.cl" + + "oud.conformance.firestore.v1.WhereH\000\022B\n\010" + + "order_by\030\003 \001(\0132..google.cloud.conformanc" + + "e.firestore.v1.OrderByH\000\022\020\n\006offset\030\004 \001(\005" + + "H\000\022\017\n\005limit\030\005 \001(\005H\000\022A\n\010start_at\030\006 \001(\0132-." + + "google.cloud.conformance.firestore.v1.Cu" + + "rsorH\000\022D\n\013start_after\030\007 \001(\0132-.google.clo" + + "ud.conformance.firestore.v1.CursorH\000\022?\n\006" + + "end_at\030\010 \001(\0132-.google.cloud.conformance." + + "firestore.v1.CursorH\000\022C\n\nend_before\030\t \001(" + + "\0132-.google.cloud.conformance.firestore.v" + + "1.CursorH\000B\010\n\006clause\"J\n\006Select\022@\n\006fields" + + "\030\001 \003(\01320.google.cloud.conformance.firest" + + "ore.v1.FieldPath\"g\n\005Where\022>\n\004path\030\001 \001(\0132" + + "0.google.cloud.conformance.firestore.v1." + + "FieldPath\022\n\n\002op\030\002 \001(\t\022\022\n\njson_value\030\003 \001(" + + "\t\"\\\n\007OrderBy\022>\n\004path\030\001 \001(\01320.google.clou" + + "d.conformance.firestore.v1.FieldPath\022\021\n\t" + + "direction\030\002 \001(\t\"g\n\006Cursor\022H\n\014doc_snapsho" + + "t\030\001 \001(\01322.google.cloud.conformance.fires" + + "tore.v1.DocSnapshot\022\023\n\013json_values\030\002 \003(\t" + + "\".\n\013DocSnapshot\022\014\n\004path\030\001 \001(\t\022\021\n\tjson_da" + + "ta\030\002 \001(\t\"\032\n\tFieldPath\022\r\n\005field\030\001 \003(\t\"\232\001\n" + + "\nListenTest\0226\n\tresponses\030\001 \003(\0132#.google." + + "firestore.v1.ListenResponse\022B\n\tsnapshots" + + "\030\002 \003(\0132/.google.cloud.conformance.firest" + + "ore.v1.Snapshot\022\020\n\010is_error\030\003 \001(\010\"\251\001\n\010Sn" + + "apshot\022+\n\004docs\030\001 \003(\0132\035.google.firestore." + + "v1.Document\022A\n\007changes\030\002 \003(\01320.google.cl" + + "oud.conformance.firestore.v1.DocChange\022-" + + "\n\tread_time\030\003 \001(\0132\032.google.protobuf.Time" + + "stamp\"\346\001\n\tDocChange\022C\n\004kind\030\001 \001(\01625.goog" + + "le.cloud.conformance.firestore.v1.DocCha" + + "nge.Kind\022*\n\003doc\030\002 \001(\0132\035.google.firestore" + + ".v1.Document\022\021\n\told_index\030\003 \001(\005\022\021\n\tnew_i" + + "ndex\030\004 \001(\005\"B\n\004Kind\022\024\n\020KIND_UNSPECIFIED\020\000" + + "\022\t\n\005ADDED\020\001\022\013\n\007REMOVED\020\002\022\014\n\010MODIFIED\020\003B\213" + + "\001\n)com.google.cloud.conformance.firestor" + + "e.v1B\016TestDefinition\252\002\"Google.Cloud.Fire" + + "store.Tests.Proto\312\002(Google\\Cloud\\Firesto" + + "re\\Tests\\Conformanceb\006proto3" + }; + com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = + new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { + public com.google.protobuf.ExtensionRegistry assignDescriptors( + com.google.protobuf.Descriptors.FileDescriptor root) { + descriptor = root; + return null; + } + }; + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.firestore.v1.CommonProto.getDescriptor(), + com.google.firestore.v1.DocumentProto.getDescriptor(), + com.google.firestore.v1.FirestoreProto.getDescriptor(), + com.google.firestore.v1.QueryProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }, + assigner); + internal_static_google_cloud_conformance_firestore_v1_TestFile_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_conformance_firestore_v1_TestFile_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_TestFile_descriptor, + new java.lang.String[] { + "Tests", + }); + internal_static_google_cloud_conformance_firestore_v1_Test_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_conformance_firestore_v1_Test_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_Test_descriptor, + new java.lang.String[] { + "Description", + "Comment", + "Get", + "Create", + "Set", + "Update", + "UpdatePaths", + "Delete", + "Query", + "Listen", + "Test", + }); + internal_static_google_cloud_conformance_firestore_v1_GetTest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_conformance_firestore_v1_GetTest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_GetTest_descriptor, + new java.lang.String[] { + "DocRefPath", "Request", + }); + internal_static_google_cloud_conformance_firestore_v1_CreateTest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_conformance_firestore_v1_CreateTest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_CreateTest_descriptor, + new java.lang.String[] { + "DocRefPath", "JsonData", "Request", "IsError", + }); + internal_static_google_cloud_conformance_firestore_v1_SetTest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_conformance_firestore_v1_SetTest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_SetTest_descriptor, + new java.lang.String[] { + "DocRefPath", "Option", "JsonData", "Request", "IsError", + }); + internal_static_google_cloud_conformance_firestore_v1_UpdateTest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_conformance_firestore_v1_UpdateTest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_UpdateTest_descriptor, + new java.lang.String[] { + "DocRefPath", "Precondition", "JsonData", "Request", "IsError", + }); + internal_static_google_cloud_conformance_firestore_v1_UpdatePathsTest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_conformance_firestore_v1_UpdatePathsTest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_UpdatePathsTest_descriptor, + new java.lang.String[] { + "DocRefPath", "Precondition", "FieldPaths", "JsonValues", "Request", "IsError", + }); + internal_static_google_cloud_conformance_firestore_v1_DeleteTest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_conformance_firestore_v1_DeleteTest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_DeleteTest_descriptor, + new java.lang.String[] { + "DocRefPath", "Precondition", "Request", "IsError", + }); + internal_static_google_cloud_conformance_firestore_v1_SetOption_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_conformance_firestore_v1_SetOption_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_SetOption_descriptor, + new java.lang.String[] { + "All", "Fields", + }); + internal_static_google_cloud_conformance_firestore_v1_QueryTest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_conformance_firestore_v1_QueryTest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_QueryTest_descriptor, + new java.lang.String[] { + "CollPath", "Clauses", "Query", "IsError", + }); + internal_static_google_cloud_conformance_firestore_v1_Clause_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_conformance_firestore_v1_Clause_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_Clause_descriptor, + new java.lang.String[] { + "Select", + "Where", + "OrderBy", + "Offset", + "Limit", + "StartAt", + "StartAfter", + "EndAt", + "EndBefore", + "Clause", + }); + internal_static_google_cloud_conformance_firestore_v1_Select_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_conformance_firestore_v1_Select_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_Select_descriptor, + new java.lang.String[] { + "Fields", + }); + internal_static_google_cloud_conformance_firestore_v1_Where_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_conformance_firestore_v1_Where_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_Where_descriptor, + new java.lang.String[] { + "Path", "Op", "JsonValue", + }); + internal_static_google_cloud_conformance_firestore_v1_OrderBy_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_conformance_firestore_v1_OrderBy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_OrderBy_descriptor, + new java.lang.String[] { + "Path", "Direction", + }); + internal_static_google_cloud_conformance_firestore_v1_Cursor_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_conformance_firestore_v1_Cursor_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_Cursor_descriptor, + new java.lang.String[] { + "DocSnapshot", "JsonValues", + }); + internal_static_google_cloud_conformance_firestore_v1_DocSnapshot_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_conformance_firestore_v1_DocSnapshot_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_DocSnapshot_descriptor, + new java.lang.String[] { + "Path", "JsonData", + }); + internal_static_google_cloud_conformance_firestore_v1_FieldPath_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_conformance_firestore_v1_FieldPath_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_FieldPath_descriptor, + new java.lang.String[] { + "Field", + }); + internal_static_google_cloud_conformance_firestore_v1_ListenTest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_conformance_firestore_v1_ListenTest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_ListenTest_descriptor, + new java.lang.String[] { + "Responses", "Snapshots", "IsError", + }); + internal_static_google_cloud_conformance_firestore_v1_Snapshot_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_conformance_firestore_v1_Snapshot_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_Snapshot_descriptor, + new java.lang.String[] { + "Docs", "Changes", "ReadTime", + }); + internal_static_google_cloud_conformance_firestore_v1_DocChange_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_conformance_firestore_v1_DocChange_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_conformance_firestore_v1_DocChange_descriptor, + new java.lang.String[] { + "Kind", "Doc", "OldIndex", "NewIndex", + }); + com.google.firestore.v1.CommonProto.getDescriptor(); + com.google.firestore.v1.DocumentProto.getDescriptor(); + com.google.firestore.v1.FirestoreProto.getDescriptor(); + com.google.firestore.v1.QueryProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/proto/google/cloud/conformance/firestore/v1/tests.proto b/google-cloud-testing/google-cloud-conformance-tests/src/main/proto/google/cloud/conformance/firestore/v1/tests.proto new file mode 100644 index 000000000000..fb31c1b00647 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/proto/google/cloud/conformance/firestore/v1/tests.proto @@ -0,0 +1,213 @@ +// Copyright 2019 Google LLC. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// + +// Tests for firestore clients. + +syntax = "proto3"; + +package google.cloud.conformance.firestore.v1; + +option php_namespace = "Google\\Cloud\\Firestore\\Tests\\Conformance"; +option csharp_namespace = "Google.Cloud.Firestore.Tests.Proto"; +option java_outer_classname = "TestDefinition"; +option java_package = "com.google.cloud.conformance.firestore.v1"; + +import "google/firestore/v1/common.proto"; +import "google/firestore/v1/document.proto"; +import "google/firestore/v1/firestore.proto"; +import "google/firestore/v1/query.proto"; +import "google/protobuf/timestamp.proto"; + +// A collection of tests. +message TestFile { + repeated Test tests = 1; +} + +// A Test describes a single client method call and its expected result. +message Test { + string description = 1; // short description of the test + string comment = 10; // a comment describing the behavior being tested + + oneof test { + GetTest get = 2; + CreateTest create = 3; + SetTest set = 4; + UpdateTest update = 5; + UpdatePathsTest update_paths = 6; + DeleteTest delete = 7; + QueryTest query = 8; + ListenTest listen = 9; + } +} + +// Call to the DocumentRef.Get method. +message GetTest { + // The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d" + string doc_ref_path = 1; + + // The request that the call should send to the Firestore service. + google.firestore.v1.GetDocumentRequest request = 2; +} + +// Call to DocumentRef.Create. +message CreateTest { + // The path of the doc, e.g. "projects/projectID/databases/(default)/documents/C/d" + string doc_ref_path = 1; + + // The data passed to Create, as JSON. The strings "Delete" and "ServerTimestamp" + // denote the two special sentinel values. Values that could be interpreted as integers + // (i.e. digit strings) should be treated as integers. + string json_data = 2; + + // The request that the call should generate. + google.firestore.v1.CommitRequest request = 3; + + // If true, the call should result in an error without generating a request. + // If this is true, request should not be set. + bool is_error = 4; +} + +// A call to DocumentRef.Set. +message SetTest { + string doc_ref_path = 1; // path of doc + SetOption option = 2; // option to the Set call, if any + string json_data = 3; // data (see CreateTest.json_data) + google.firestore.v1.CommitRequest request = 4; // expected request + bool is_error = 5; // call signals an error +} + +// A call to the form of DocumentRef.Update that represents the data as a map +// or dictionary. +message UpdateTest { + string doc_ref_path = 1; // path of doc + google.firestore.v1.Precondition precondition = 2; // precondition in call, if any + string json_data = 3; // data (see CreateTest.json_data) + google.firestore.v1.CommitRequest request = 4; // expected request + bool is_error = 5; // call signals an error +} + +// A call to the form of DocumentRef.Update that represents the data as a list +// of field paths and their values. +message UpdatePathsTest { + string doc_ref_path = 1; // path of doc + google.firestore.v1.Precondition precondition = 2; // precondition in call, if any + // parallel sequences: field_paths[i] corresponds to json_values[i] + repeated FieldPath field_paths = 3; // the argument field paths + repeated string json_values = 4; // the argument values, as JSON + google.firestore.v1.CommitRequest request = 5; // expected rquest + bool is_error = 6; // call signals an error +} + +// A call to DocmentRef.Delete +message DeleteTest { + string doc_ref_path = 1; // path of doc + google.firestore.v1.Precondition precondition = 2; + google.firestore.v1.CommitRequest request = 3; // expected rquest + bool is_error = 4; // call signals an error +} + +// An option to the DocumentRef.Set call. +message SetOption { + bool all = 1; // if true, merge all fields ("fields" is ignored). + repeated FieldPath fields = 2; // field paths for a Merge option +} + +message QueryTest { + string coll_path = 1; // path of collection, e.g. "projects/projectID/databases/(default)/documents/C" + repeated Clause clauses = 2; + google.firestore.v1.StructuredQuery query = 3; + bool is_error = 4; +} + +message Clause { + oneof clause { + Select select = 1; + Where where = 2; + OrderBy order_by = 3; + int32 offset = 4; + int32 limit = 5; + Cursor start_at = 6; + Cursor start_after = 7; + Cursor end_at = 8; + Cursor end_before = 9; + } +} + +message Select { + repeated FieldPath fields = 1; +} + +message Where { + FieldPath path = 1; + string op = 2; + string json_value = 3; +} + +message OrderBy { + FieldPath path = 1; + string direction = 2; // "asc" or "desc" +} + +message Cursor { + // one of: + DocSnapshot doc_snapshot = 1; + repeated string json_values = 2; +} + +message DocSnapshot { + string path = 1; + string json_data = 2; +} + +message FieldPath { + repeated string field = 1; +} + +// A test of the Listen streaming RPC (a.k.a. FireStore watch). +// If the sequence of responses is provided to the implementation, +// it should produce the sequence of snapshots. +// If is_error is true, an error should occur after the snapshots. +// +// The tests assume that the query is +// Collection("projects/projectID/databases/(default)/documents/C").OrderBy("a", Ascending) +// +// The watch target ID used in these tests is 1. Test interpreters +// should either change their client's ID for testing, +// or change the ID in the tests before running them. +message ListenTest { + repeated google.firestore.v1.ListenResponse responses = 1; + repeated Snapshot snapshots = 2; + bool is_error = 3; +} + +message Snapshot { + repeated google.firestore.v1.Document docs = 1; + repeated DocChange changes = 2; + google.protobuf.Timestamp read_time = 3; +} + +message DocChange { + enum Kind { + KIND_UNSPECIFIED = 0; + ADDED = 1; + REMOVED = 2; + MODIFIED = 3; + } + + Kind kind = 1; + google.firestore.v1.Document doc = 2; + int32 old_index = 3; + int32 new_index = 4; +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-all-transforms.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-all-transforms.json new file mode 100644 index 000000000000..82831624bb1f --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-all-transforms.json @@ -0,0 +1,73 @@ +{ + "tests": [ + { + "description": "create: all transforms in a single call", + "comment": "A document can be created with any amount of transforms.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\", \"c\": [\"ArrayUnion\", 1, 2, 3], \"d\": [\"ArrayRemove\", 4, 5, 6]}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "currentDocument": { + "exists": false + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + }, + { + "fieldPath": "c", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + }, + { + "fieldPath": "d", + "removeAllFromArray": { + "values": [ + { + "integerValue": "4" + }, + { + "integerValue": "5" + }, + { + "integerValue": "6" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-multi.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-multi.json new file mode 100644 index 000000000000..548a9838089e --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-multi.json @@ -0,0 +1,69 @@ +{ + "tests": [ + { + "description": "create: multiple ArrayRemove fields", + "comment": "A document can have more than one ArrayRemove field.\nSince all the ArrayRemove fields are removed, the only field in the update is \"a\".", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": [\"ArrayRemove\", 1, 2, 3], \"c\": {\"d\": [\"ArrayRemove\", 4, 5, 6]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "currentDocument": { + "exists": false + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "removeAllFromArray": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + }, + { + "fieldPath": "c.d", + "removeAllFromArray": { + "values": [ + { + "integerValue": "4" + }, + { + "integerValue": "5" + }, + { + "integerValue": "6" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-nested.json new file mode 100644 index 000000000000..fa01bd7e0071 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-nested.json @@ -0,0 +1,53 @@ +{ + "tests": [ + { + "description": "create: nested ArrayRemove field", + "comment": "An ArrayRemove value can occur at any depth. In this case,\nthe transform applies to the field path \"b.c\". Since \"c\" is removed from the update,\n\"b\" becomes empty, so it is also removed from the update.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": {\"c\": [\"ArrayRemove\", 1, 2, 3]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "currentDocument": { + "exists": false + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b.c", + "removeAllFromArray": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-noarray-nested.json new file mode 100644 index 000000000000..7d530084d448 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-noarray-nested.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "create: ArrayRemove cannot be anywhere inside an array value", + "comment": "There cannot be an array value anywhere on the path from the document\nroot to the ArrayRemove. Firestore transforms don't support array indexing.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, {\"b\": [\"ArrayRemove\", 1, 2, 3]}]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-noarray.json new file mode 100644 index 000000000000..99aea7e35cdf --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-noarray.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "create: ArrayRemove cannot be in an array value", + "comment": "ArrayRemove must be the value of a field. Firestore\ntransforms don't support array indexing.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2, [\"ArrayRemove\", 1, 2, 3]]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-with-st.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-with-st.json new file mode 100644 index 000000000000..56bdc435daff --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove-with-st.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "create: The ServerTimestamp sentinel cannot be in an ArrayUnion", + "comment": "The ServerTimestamp sentinel must be the value of a field. It may\nnot appear in an ArrayUnion.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [\"ArrayRemove\", 1, \"ServerTimestamp\", 3]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove.json new file mode 100644 index 000000000000..a69be14b7b12 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayremove.json @@ -0,0 +1,53 @@ +{ + "tests": [ + { + "description": "create: ArrayRemove with data", + "comment": "A key with ArrayRemove is removed from the data in the update \noperation. Instead it appears in a separate Transform operation.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": [\"ArrayRemove\", 1, 2, 3]}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "currentDocument": { + "exists": false + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "removeAllFromArray": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-multi.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-multi.json new file mode 100644 index 000000000000..7ca9852f48d9 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-multi.json @@ -0,0 +1,69 @@ +{ + "tests": [ + { + "description": "create: multiple ArrayUnion fields", + "comment": "A document can have more than one ArrayUnion field.\nSince all the ArrayUnion fields are removed, the only field in the update is \"a\".", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": [\"ArrayUnion\", 1, 2, 3], \"c\": {\"d\": [\"ArrayUnion\", 4, 5, 6]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "currentDocument": { + "exists": false + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + }, + { + "fieldPath": "c.d", + "appendMissingElements": { + "values": [ + { + "integerValue": "4" + }, + { + "integerValue": "5" + }, + { + "integerValue": "6" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-nested.json new file mode 100644 index 000000000000..a2f20299d3be --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-nested.json @@ -0,0 +1,53 @@ +{ + "tests": [ + { + "description": "create: nested ArrayUnion field", + "comment": "An ArrayUnion value can occur at any depth. In this case,\nthe transform applies to the field path \"b.c\". Since \"c\" is removed from the update,\n\"b\" becomes empty, so it is also removed from the update.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": {\"c\": [\"ArrayUnion\", 1, 2, 3]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "currentDocument": { + "exists": false + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b.c", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-noarray-nested.json new file mode 100644 index 000000000000..b9ec5c01cbf1 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-noarray-nested.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "create: ArrayUnion cannot be anywhere inside an array value", + "comment": "There cannot be an array value anywhere on the path from the document\nroot to the ArrayUnion. Firestore transforms don't support array indexing.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, {\"b\": [\"ArrayUnion\", 1, 2, 3]}]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-noarray.json new file mode 100644 index 000000000000..1b85a93c45e9 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-noarray.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "create: ArrayUnion cannot be in an array value", + "comment": "ArrayUnion must be the value of a field. Firestore\ntransforms don't support array indexing.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2, [\"ArrayRemove\", 1, 2, 3]]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-with-st.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-with-st.json new file mode 100644 index 000000000000..2847f57490b8 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion-with-st.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "create: The ServerTimestamp sentinel cannot be in an ArrayUnion", + "comment": "The ServerTimestamp sentinel must be the value of a field. It may\nnot appear in an ArrayUnion.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [\"ArrayUnion\", 1, \"ServerTimestamp\", 3]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion.json new file mode 100644 index 000000000000..26d079946645 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-arrayunion.json @@ -0,0 +1,53 @@ +{ + "tests": [ + { + "description": "create: ArrayUnion with data", + "comment": "A key with ArrayUnion is removed from the data in the update \noperation. Instead it appears in a separate Transform operation.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": [\"ArrayUnion\", 1, 2, 3]}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "currentDocument": { + "exists": false + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-basic.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-basic.json new file mode 100644 index 000000000000..d67558ca13dd --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-basic.json @@ -0,0 +1,30 @@ +{ + "tests": [ + { + "description": "create: basic", + "comment": "A simple call, resulting in a single update operation.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "currentDocument": { + "exists": false + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-complex.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-complex.json new file mode 100644 index 000000000000..a01b307f672d --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-complex.json @@ -0,0 +1,63 @@ +{ + "tests": [ + { + "description": "create: complex", + "comment": "A call to a write method with complicated input data.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2.5], \"b\": {\"c\": [\"three\", {\"d\": true}]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "arrayValue": { + "values": [ + { + "integerValue": "1" + }, + { + "doubleValue": 2.5 + } + ] + } + }, + "b": { + "mapValue": { + "fields": { + "c": { + "arrayValue": { + "values": [ + { + "stringValue": "three" + }, + { + "mapValue": { + "fields": { + "d": { + "booleanValue": true + } + } + } + } + ] + } + } + } + } + } + } + }, + "currentDocument": { + "exists": false + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-del-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-del-noarray-nested.json new file mode 100644 index 000000000000..34d8258e1b21 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-del-noarray-nested.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "create: Delete cannot be anywhere inside an array value", + "comment": "The Delete sentinel must be the value of a field. Deletes are implemented\nby turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not support\narray indexing.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, {\"b\": \"Delete\"}]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-del-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-del-noarray.json new file mode 100644 index 000000000000..dde6b334b461 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-del-noarray.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "create: Delete cannot be in an array value", + "comment": "The Delete sentinel must be the value of a field. Deletes are\nimplemented by turning the path to the Delete sentinel into a FieldPath, and FieldPaths\ndo not support array indexing.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2, \"Delete\"]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-empty.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-empty.json new file mode 100644 index 000000000000..7d9f7f009872 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-empty.json @@ -0,0 +1,25 @@ +{ + "tests": [ + { + "description": "create: creating or setting an empty map", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": {} + }, + "currentDocument": { + "exists": false + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-nodel.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-nodel.json new file mode 100644 index 000000000000..dd8baaf227aa --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-nodel.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "create: Delete cannot appear in data", + "comment": "The Delete sentinel cannot be used in Create, or in Set without a Merge option.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": \"Delete\"}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-nosplit.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-nosplit.json new file mode 100644 index 000000000000..8807af362e70 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-nosplit.json @@ -0,0 +1,39 @@ +{ + "tests": [ + { + "description": "create: don’t split on dots", + "comment": "Create and Set treat their map keys literally. They do not split on dots.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{ \"a.b\": { \"c.d\": 1 }, \"e\": 2 }", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a.b": { + "mapValue": { + "fields": { + "c.d": { + "integerValue": "1" + } + } + } + }, + "e": { + "integerValue": "2" + } + } + }, + "currentDocument": { + "exists": false + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-special-chars.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-special-chars.json new file mode 100644 index 000000000000..4080042000d5 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-special-chars.json @@ -0,0 +1,39 @@ +{ + "tests": [ + { + "description": "create: non-alpha characters in map keys", + "comment": "Create and Set treat their map keys literally. They do not escape special characters.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{ \"*\": { \".\": 1 }, \"~\": 2 }", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "*": { + "mapValue": { + "fields": { + ".": { + "integerValue": "1" + } + } + } + }, + "~": { + "integerValue": "2" + } + } + }, + "currentDocument": { + "exists": false + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-alone.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-alone.json new file mode 100644 index 000000000000..20c5e8ec32a3 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-alone.json @@ -0,0 +1,31 @@ +{ + "tests": [ + { + "description": "create: ServerTimestamp alone", + "comment": "If the only values in the input are ServerTimestamps, then no\nupdate operation should be produced.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": \"ServerTimestamp\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a", + "setToServerValue": "REQUEST_TIME" + } + ] + }, + "currentDocument": { + "exists": false + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-multi.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-multi.json new file mode 100644 index 000000000000..89430e2b64d6 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-multi.json @@ -0,0 +1,45 @@ +{ + "tests": [ + { + "description": "create: multiple ServerTimestamp fields", + "comment": "A document can have more than one ServerTimestamp field.\nSince all the ServerTimestamp fields are removed, the only field in the update is \"a\".", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\", \"c\": {\"d\": \"ServerTimestamp\"}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "currentDocument": { + "exists": false + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + }, + { + "fieldPath": "c.d", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-nested.json new file mode 100644 index 000000000000..f2a3a8d1f624 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-nested.json @@ -0,0 +1,41 @@ +{ + "tests": [ + { + "description": "create: nested ServerTimestamp field", + "comment": "A ServerTimestamp value can occur at any depth. In this case,\nthe transform applies to the field path \"b.c\". Since \"c\" is removed from the update,\n\"b\" becomes empty, so it is also removed from the update.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": {\"c\": \"ServerTimestamp\"}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "currentDocument": { + "exists": false + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b.c", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-noarray-nested.json new file mode 100644 index 000000000000..8660531dcc9a --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-noarray-nested.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "create: ServerTimestamp cannot be anywhere inside an array value", + "comment": "There cannot be an array value anywhere on the path from the document\nroot to the ServerTimestamp sentinel. Firestore transforms don't support array indexing.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, {\"b\": \"ServerTimestamp\"}]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-noarray.json new file mode 100644 index 000000000000..31104f25613c --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-noarray.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "create: ServerTimestamp cannot be in an array value", + "comment": "The ServerTimestamp sentinel must be the value of a field. Firestore\ntransforms don't support array indexing.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2, \"ServerTimestamp\"]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-with-empty-map.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-with-empty-map.json new file mode 100644 index 000000000000..730afd154fd8 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st-with-empty-map.json @@ -0,0 +1,49 @@ +{ + "tests": [ + { + "description": "create: ServerTimestamp beside an empty map", + "comment": "When a ServerTimestamp and a map both reside inside a map, the\nServerTimestamp should be stripped out but the empty map should remain.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": {\"b\": {}, \"c\": \"ServerTimestamp\"}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "mapValue": { + "fields": { + "b": { + "mapValue": { + "fields": {} + } + } + } + } + } + } + }, + "currentDocument": { + "exists": false + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a.c", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st.json new file mode 100644 index 000000000000..705f76ed16ac --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/create-st.json @@ -0,0 +1,41 @@ +{ + "tests": [ + { + "description": "create: ServerTimestamp with data", + "comment": "A key with the special ServerTimestamp sentinel is removed from\nthe data in the update operation. Instead it appears in a separate Transform operation.\nNote that in these tests, the string \"ServerTimestamp\" should be replaced with the\nspecial ServerTimestamp value.", + "create": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "currentDocument": { + "exists": false + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/delete-exists-precond.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/delete-exists-precond.json new file mode 100644 index 000000000000..174be0eccb06 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/delete-exists-precond.json @@ -0,0 +1,25 @@ +{ + "tests": [ + { + "description": "delete: delete with exists precondition", + "comment": "Delete supports an exists precondition.", + "delete": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "precondition": { + "exists": true + }, + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "delete": "projects/projectID/databases/(default)/documents/C/d", + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/delete-no-precond.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/delete-no-precond.json new file mode 100644 index 000000000000..96fcb39a5988 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/delete-no-precond.json @@ -0,0 +1,19 @@ +{ + "tests": [ + { + "description": "delete: delete without precondition", + "comment": "An ordinary Delete call.", + "delete": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "delete": "projects/projectID/databases/(default)/documents/C/d" + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/delete-time-precond.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/delete-time-precond.json new file mode 100644 index 000000000000..160defb3fedb --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/delete-time-precond.json @@ -0,0 +1,25 @@ +{ + "tests": [ + { + "description": "delete: delete with last-update-time precondition", + "comment": "Delete supports a last-update-time precondition.", + "delete": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "precondition": { + "updateTime": "1970-01-01T00:00:42Z" + }, + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "delete": "projects/projectID/databases/(default)/documents/C/d", + "currentDocument": { + "updateTime": "1970-01-01T00:00:42Z" + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/get-basic.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/get-basic.json new file mode 100644 index 000000000000..0a2cd2d4a1b7 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/get-basic.json @@ -0,0 +1,14 @@ +{ + "tests": [ + { + "description": "get: get a document", + "comment": "A call to DocumentRef.Get", + "get": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "request": { + "name": "projects/projectID/databases/(default)/documents/C/d" + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-add-mod-del-add.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-add-mod-del-add.json new file mode 100644 index 000000000000..d05997332df0 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-add-mod-del-add.json @@ -0,0 +1,206 @@ +{ + "tests": [ + { + "description": "listen: add a doc, modify it, delete it, then add it again", + "comment": "Various changes to a single document.", + "listen": { + "responses": [ + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:01Z" + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:02Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:02Z" + } + }, + { + "documentDelete": { + "document": "projects/projectID/databases/(default)/documents/C/d1" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:03Z" + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:03Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:04Z" + } + } + ], + "snapshots": [ + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + } + ], + "changes": [ + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1 + } + ], + "readTime": "1970-01-01T00:00:01Z" + }, + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:02Z" + } + ], + "changes": [ + { + "kind": "MODIFIED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:02Z" + } + } + ], + "readTime": "1970-01-01T00:00:02Z" + }, + { + "changes": [ + { + "kind": "REMOVED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:02Z" + }, + "newIndex": -1 + } + ], + "readTime": "1970-01-01T00:00:03Z" + }, + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:03Z" + } + ], + "changes": [ + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:03Z" + }, + "oldIndex": -1 + } + ], + "readTime": "1970-01-01T00:00:04Z" + } + ] + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-add-one.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-add-one.json new file mode 100644 index 000000000000..8223180a8765 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-add-one.json @@ -0,0 +1,72 @@ +{ + "tests": [ + { + "description": "listen: add a doc", + "comment": "Snapshot with a single document.", + "listen": { + "responses": [ + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:02Z" + } + } + ], + "snapshots": [ + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + } + ], + "changes": [ + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1 + } + ], + "readTime": "1970-01-01T00:00:02Z" + } + ] + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-add-three.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-add-three.json new file mode 100644 index 000000000000..6ea117a7cc38 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-add-three.json @@ -0,0 +1,156 @@ +{ + "tests": [ + { + "description": "listen: add three documents", + "comment": "A snapshot with three documents. The documents are sorted\nfirst by the \"a\" field, then by their path. The changes are ordered the same way.", + "listen": { + "responses": [ + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d3", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:02Z" + } + } + ], + "snapshots": [ + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + { + "name": "projects/projectID/databases/(default)/documents/C/d3", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + } + ], + "changes": [ + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1 + }, + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d3", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1, + "newIndex": 1 + }, + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1, + "newIndex": 2 + } + ], + "readTime": "1970-01-01T00:00:02Z" + } + ] + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-doc-remove.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-doc-remove.json new file mode 100644 index 000000000000..59af7d11a6e8 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-doc-remove.json @@ -0,0 +1,101 @@ +{ + "tests": [ + { + "description": "listen: DocumentRemove behaves like DocumentDelete", + "comment": "The DocumentRemove response behaves exactly like DocumentDelete.", + "listen": { + "responses": [ + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:01Z" + } + }, + { + "documentRemove": { + "document": "projects/projectID/databases/(default)/documents/C/d1" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:02Z" + } + } + ], + "snapshots": [ + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + } + ], + "changes": [ + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1 + } + ], + "readTime": "1970-01-01T00:00:01Z" + }, + { + "changes": [ + { + "kind": "REMOVED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "newIndex": -1 + } + ], + "readTime": "1970-01-01T00:00:02Z" + } + ] + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-empty.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-empty.json new file mode 100644 index 000000000000..734aa41f9ee7 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-empty.json @@ -0,0 +1,27 @@ +{ + "tests": [ + { + "description": "listen: no changes; empty snapshot", + "comment": "There are no changes, so the snapshot should be empty.", + "listen": { + "responses": [ + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:01Z" + } + } + ], + "snapshots": [ + { + "readTime": "1970-01-01T00:00:01Z" + } + ] + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-filter-nop.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-filter-nop.json new file mode 100644 index 000000000000..a7c09e97d99a --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-filter-nop.json @@ -0,0 +1,203 @@ +{ + "tests": [ + { + "description": "listen: Filter response with same size is a no-op", + "comment": "A Filter response whose count matches the size of the current\nstate (docs in last snapshot + docs added - docs deleted) is a no-op.", + "listen": { + "responses": [ + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:01Z" + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d3", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "documentDelete": { + "document": "projects/projectID/databases/(default)/documents/C/d1" + } + }, + { + "filter": { + "count": 2 + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:02Z" + } + } + ], + "snapshots": [ + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + } + ], + "changes": [ + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1 + }, + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1, + "newIndex": 1 + } + ], + "readTime": "1970-01-01T00:00:01Z" + }, + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + { + "name": "projects/projectID/databases/(default)/documents/C/d3", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + } + ], + "changes": [ + { + "kind": "REMOVED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": 1, + "newIndex": -1 + }, + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d3", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1, + "newIndex": 1 + } + ], + "readTime": "1970-01-01T00:00:02Z" + } + ] + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-multi-docs.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-multi-docs.json new file mode 100644 index 000000000000..fe5b0f0bbf9b --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-multi-docs.json @@ -0,0 +1,414 @@ +{ + "tests": [ + { + "description": "listen: multiple documents, added, deleted and updated", + "comment": "Changes should be ordered with deletes first, then additions, then mods,\neach in query order.\nOld indices refer to the immediately previous state, not the previous snapshot", + "listen": { + "responses": [ + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d3", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d4", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:02Z" + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d5", + "fields": { + "a": { + "integerValue": "4" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "documentDelete": { + "document": "projects/projectID/databases/(default)/documents/C/d3" + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "-1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:03Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d6", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "documentDelete": { + "document": "projects/projectID/databases/(default)/documents/C/d2" + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d4", + "fields": { + "a": { + "integerValue": "-2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:03Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:04Z" + } + } + ], + "snapshots": [ + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + { + "name": "projects/projectID/databases/(default)/documents/C/d3", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + { + "name": "projects/projectID/databases/(default)/documents/C/d4", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + } + ], + "changes": [ + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1 + }, + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d3", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1, + "newIndex": 1 + }, + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d4", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1, + "newIndex": 2 + }, + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1, + "newIndex": 3 + } + ], + "readTime": "1970-01-01T00:00:02Z" + }, + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d4", + "fields": { + "a": { + "integerValue": "-2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:03Z" + }, + { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "-1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:03Z" + }, + { + "name": "projects/projectID/databases/(default)/documents/C/d6", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + { + "name": "projects/projectID/databases/(default)/documents/C/d5", + "fields": { + "a": { + "integerValue": "4" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + } + ], + "changes": [ + { + "kind": "REMOVED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "newIndex": -1 + }, + { + "kind": "REMOVED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d3", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "newIndex": -1 + }, + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d6", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1, + "newIndex": 2 + }, + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d5", + "fields": { + "a": { + "integerValue": "4" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1, + "newIndex": 3 + }, + { + "kind": "MODIFIED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d4", + "fields": { + "a": { + "integerValue": "-2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:03Z" + } + }, + { + "kind": "MODIFIED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "-1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:03Z" + }, + "oldIndex": 1, + "newIndex": 1 + } + ], + "readTime": "1970-01-01T00:00:04Z" + } + ] + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-nocurrent.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-nocurrent.json new file mode 100644 index 000000000000..158595e963df --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-nocurrent.json @@ -0,0 +1,119 @@ +{ + "tests": [ + { + "description": "listen: no snapshot if we don't see CURRENT", + "comment": "If the watch state is not marked CURRENT, no snapshot is issued.", + "listen": { + "responses": [ + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:01Z" + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:02Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:02Z" + } + } + ], + "snapshots": [ + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:02Z" + } + ], + "changes": [ + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1 + }, + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:02Z" + }, + "oldIndex": -1, + "newIndex": 1 + } + ], + "readTime": "1970-01-01T00:00:02Z" + } + ] + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-nomod.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-nomod.json new file mode 100644 index 000000000000..0e454d51286a --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-nomod.json @@ -0,0 +1,123 @@ +{ + "tests": [ + { + "description": "listen: add a doc, then change it but without changing its update time", + "comment": "Document updates are recognized by a change in the update time, not the data.\nThis shouldn't actually happen. It is just a test of the update logic.", + "listen": { + "responses": [ + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:01Z" + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:02Z" + } + }, + { + "documentDelete": { + "document": "projects/projectID/databases/(default)/documents/C/d1" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:03Z" + } + } + ], + "snapshots": [ + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + } + ], + "changes": [ + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1 + } + ], + "readTime": "1970-01-01T00:00:01Z" + }, + { + "changes": [ + { + "kind": "REMOVED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "newIndex": -1 + } + ], + "readTime": "1970-01-01T00:00:03Z" + } + ] + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-removed-target-ids.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-removed-target-ids.json new file mode 100644 index 000000000000..57c91b7bd7f5 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-removed-target-ids.json @@ -0,0 +1,113 @@ +{ + "tests": [ + { + "description": "listen: DocumentChange with removed_target_id is like a delete.", + "comment": "A DocumentChange with the watch target ID in the removed_target_ids field is the\nsame as deleting a document.", + "listen": { + "responses": [ + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:01Z" + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "removedTargetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:02Z" + } + } + ], + "snapshots": [ + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + } + ], + "changes": [ + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1 + } + ], + "readTime": "1970-01-01T00:00:01Z" + }, + { + "changes": [ + { + "kind": "REMOVED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "newIndex": -1 + } + ], + "readTime": "1970-01-01T00:00:02Z" + } + ] + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-reset.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-reset.json new file mode 100644 index 000000000000..d988a1ba9bf0 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-reset.json @@ -0,0 +1,309 @@ +{ + "tests": [ + { + "description": "listen: RESET turns off CURRENT", + "comment": "A RESET message turns off the CURRENT state, and marks all documents as deleted.\n\nIf a document appeared on the stream but was never part of a snapshot (\"d3\" in this test), a reset\nwill make it disappear completely.\n\nFor a snapshot to happen at a NO_CHANGE reponse, we need to have both seen a CURRENT response, and\nhave a change from the previous snapshot. Here, after the reset, we see the same version of d2\nagain. That doesn't result in a snapshot.\n", + "listen": { + "responses": [ + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:02Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:01Z" + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d3", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:02Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "RESET" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:02Z" + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:03Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:03Z" + } + }, + { + "targetChange": { + "targetChangeType": "RESET" + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:03Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:04Z" + } + }, + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d3", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:02Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:05Z" + } + } + ], + "snapshots": [ + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:02Z" + }, + { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + } + ], + "changes": [ + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "1" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:02Z" + }, + "oldIndex": -1 + }, + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1, + "newIndex": 1 + } + ], + "readTime": "1970-01-01T00:00:01Z" + }, + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:03Z" + } + ], + "changes": [ + { + "kind": "REMOVED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "2" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": 1, + "newIndex": -1 + }, + { + "kind": "MODIFIED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:03Z" + } + } + ], + "readTime": "1970-01-01T00:00:03Z" + }, + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d2", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:03Z" + }, + { + "name": "projects/projectID/databases/(default)/documents/C/d3", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:02Z" + } + ], + "changes": [ + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d3", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:02Z" + }, + "oldIndex": -1, + "newIndex": 1 + } + ], + "readTime": "1970-01-01T00:00:05Z" + } + ] + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-target-add-nop.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-target-add-nop.json new file mode 100644 index 000000000000..e864ea58221a --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-target-add-nop.json @@ -0,0 +1,81 @@ +{ + "tests": [ + { + "description": "listen: TargetChange_ADD is a no-op if it has the same target ID", + "comment": "A TargetChange_ADD response must have the same watch target ID.", + "listen": { + "responses": [ + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "targetChangeType": "ADD", + "targetIds": [ + 1 + ], + "readTime": "1970-01-01T00:00:02Z" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:01Z" + } + } + ], + "snapshots": [ + { + "docs": [ + { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + } + ], + "changes": [ + { + "kind": "ADDED", + "doc": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "oldIndex": -1 + } + ], + "readTime": "1970-01-01T00:00:01Z" + } + ] + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-target-add-wrong-id.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-target-add-wrong-id.json new file mode 100644 index 000000000000..5bd295d50572 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-target-add-wrong-id.json @@ -0,0 +1,49 @@ +{ + "tests": [ + { + "description": "listen: TargetChange_ADD is an error if it has a different target ID", + "comment": "A TargetChange_ADD response must have the same watch target ID.", + "listen": { + "responses": [ + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "targetChangeType": "ADD", + "targetIds": [ + 2 + ], + "readTime": "1970-01-01T00:00:02Z" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:01Z" + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-target-remove.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-target-remove.json new file mode 100644 index 000000000000..2b11e280eb19 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/listen-target-remove.json @@ -0,0 +1,45 @@ +{ + "tests": [ + { + "description": "listen: TargetChange_REMOVE should not appear", + "comment": "A TargetChange_REMOVE response should never be sent.", + "listen": { + "responses": [ + { + "documentChange": { + "document": { + "name": "projects/projectID/databases/(default)/documents/C/d1", + "fields": { + "a": { + "integerValue": "3" + } + }, + "createTime": "1970-01-01T00:00:01Z", + "updateTime": "1970-01-01T00:00:01Z" + }, + "targetIds": [ + 1 + ] + } + }, + { + "targetChange": { + "targetChangeType": "CURRENT" + } + }, + { + "targetChange": { + "targetChangeType": "REMOVE" + } + }, + { + "targetChange": { + "readTime": "1970-01-01T00:00:01Z" + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayremove-cursor.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayremove-cursor.json new file mode 100644 index 000000000000..9e396b358cd6 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayremove-cursor.json @@ -0,0 +1,31 @@ +{ + "tests": [ + { + "description": "query: ArrayRemove in cursor method", + "comment": "ArrayRemove is not permitted in queries.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "asc" + } + }, + { + "endBefore": { + "jsonValues": [ + "[\"ArrayRemove\", 1, 2, 3]" + ] + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayremove-where.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayremove-where.json new file mode 100644 index 000000000000..c488bba85afc --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayremove-where.json @@ -0,0 +1,25 @@ +{ + "tests": [ + { + "description": "query: ArrayRemove in Where", + "comment": "ArrayRemove is not permitted in queries.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "where": { + "path": { + "field": [ + "a" + ] + }, + "op": "==", + "jsonValue": "[\"ArrayRemove\", 1, 2, 3]" + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayunion-cursor.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayunion-cursor.json new file mode 100644 index 000000000000..8259d31cc75e --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayunion-cursor.json @@ -0,0 +1,31 @@ +{ + "tests": [ + { + "description": "query: ArrayUnion in cursor method", + "comment": "ArrayUnion is not permitted in queries.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "asc" + } + }, + { + "endBefore": { + "jsonValues": [ + "[\"ArrayUnion\", 1, 2, 3]" + ] + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayunion-where.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayunion-where.json new file mode 100644 index 000000000000..9f298d84e02c --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-arrayunion-where.json @@ -0,0 +1,25 @@ +{ + "tests": [ + { + "description": "query: ArrayUnion in Where", + "comment": "ArrayUnion is not permitted in queries.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "where": { + "path": { + "field": [ + "a" + ] + }, + "op": "==", + "jsonValue": "[\"ArrayUnion\", 1, 2, 3]" + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-bad-NaN.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-bad-NaN.json new file mode 100644 index 000000000000..47344309fe6b --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-bad-NaN.json @@ -0,0 +1,25 @@ +{ + "tests": [ + { + "description": "query: where clause with non-== comparison with NaN", + "comment": "You can only compare NaN for equality.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "where": { + "path": { + "field": [ + "a" + ] + }, + "op": "\u003c", + "jsonValue": "\"NaN\"" + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-bad-null.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-bad-null.json new file mode 100644 index 000000000000..340afb9332db --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-bad-null.json @@ -0,0 +1,25 @@ +{ + "tests": [ + { + "description": "query: where clause with non-== comparison with Null", + "comment": "You can only compare Null for equality.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "where": { + "path": { + "field": [ + "a" + ] + }, + "op": "\u003e", + "jsonValue": "null" + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-order.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-order.json new file mode 100644 index 000000000000..89d2696dd493 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-order.json @@ -0,0 +1,81 @@ +{ + "tests": [ + { + "description": "query: cursor methods with a document snapshot, existing orderBy", + "comment": "When a document snapshot is used, the client appends a __name__ order-by clause\nwith the direction of the last order-by clause.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "asc" + } + }, + { + "orderBy": { + "path": { + "field": [ + "b" + ] + }, + "direction": "desc" + } + }, + { + "startAfter": { + "docSnapshot": { + "path": "projects/projectID/databases/(default)/documents/C/D", + "jsonData": "{\"a\": 7, \"b\": 8}" + } + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "orderBy": [ + { + "field": { + "fieldPath": "a" + }, + "direction": "ASCENDING" + }, + { + "field": { + "fieldPath": "b" + }, + "direction": "DESCENDING" + }, + { + "field": { + "fieldPath": "__name__" + }, + "direction": "DESCENDING" + } + ], + "startAt": { + "values": [ + { + "integerValue": "7" + }, + { + "integerValue": "8" + }, + { + "referenceValue": "projects/projectID/databases/(default)/documents/C/D" + } + ] + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-orderby-name.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-orderby-name.json new file mode 100644 index 000000000000..189b302a0b73 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-orderby-name.json @@ -0,0 +1,91 @@ +{ + "tests": [ + { + "description": "query: cursor method, doc snapshot, existing orderBy __name__", + "comment": "If there is an existing orderBy clause on __name__,\nno changes are made to the list of orderBy clauses.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "desc" + } + }, + { + "orderBy": { + "path": { + "field": [ + "__name__" + ] + }, + "direction": "asc" + } + }, + { + "startAt": { + "docSnapshot": { + "path": "projects/projectID/databases/(default)/documents/C/D", + "jsonData": "{\"a\": 7, \"b\": 8}" + } + } + }, + { + "endAt": { + "docSnapshot": { + "path": "projects/projectID/databases/(default)/documents/C/D", + "jsonData": "{\"a\": 7, \"b\": 8}" + } + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "orderBy": [ + { + "field": { + "fieldPath": "a" + }, + "direction": "DESCENDING" + }, + { + "field": { + "fieldPath": "__name__" + }, + "direction": "ASCENDING" + } + ], + "startAt": { + "values": [ + { + "integerValue": "7" + }, + { + "referenceValue": "projects/projectID/databases/(default)/documents/C/D" + } + ], + "before": true + }, + "endAt": { + "values": [ + { + "integerValue": "7" + }, + { + "referenceValue": "projects/projectID/databases/(default)/documents/C/D" + } + ] + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-where-eq.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-where-eq.json new file mode 100644 index 000000000000..41bc9bf1c07c --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-where-eq.json @@ -0,0 +1,65 @@ +{ + "tests": [ + { + "description": "query: cursor methods with a document snapshot and an equality where clause", + "comment": "A Where clause using equality doesn't change the implicit orderBy clauses.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "where": { + "path": { + "field": [ + "a" + ] + }, + "op": "==", + "jsonValue": "3" + } + }, + { + "endAt": { + "docSnapshot": { + "path": "projects/projectID/databases/(default)/documents/C/D", + "jsonData": "{\"a\": 7, \"b\": 8}" + } + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "where": { + "fieldFilter": { + "field": { + "fieldPath": "a" + }, + "op": "EQUAL", + "value": { + "integerValue": "3" + } + } + }, + "orderBy": [ + { + "field": { + "fieldPath": "__name__" + }, + "direction": "ASCENDING" + } + ], + "endAt": { + "values": [ + { + "referenceValue": "projects/projectID/databases/(default)/documents/C/D" + } + ] + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-where-neq-orderby.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-where-neq-orderby.json new file mode 100644 index 000000000000..ce99f786d39f --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-where-neq-orderby.json @@ -0,0 +1,85 @@ +{ + "tests": [ + { + "description": "query: cursor method, doc snapshot, inequality where clause, and existing orderBy clause", + "comment": "If there is an OrderBy clause, the inequality Where clause does\nnot result in a new OrderBy clause. We still add a __name__ OrderBy clause", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "desc" + } + }, + { + "where": { + "path": { + "field": [ + "a" + ] + }, + "op": "\u003c", + "jsonValue": "4" + } + }, + { + "startAt": { + "docSnapshot": { + "path": "projects/projectID/databases/(default)/documents/C/D", + "jsonData": "{\"a\": 7, \"b\": 8}" + } + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "where": { + "fieldFilter": { + "field": { + "fieldPath": "a" + }, + "op": "LESS_THAN", + "value": { + "integerValue": "4" + } + } + }, + "orderBy": [ + { + "field": { + "fieldPath": "a" + }, + "direction": "DESCENDING" + }, + { + "field": { + "fieldPath": "__name__" + }, + "direction": "DESCENDING" + } + ], + "startAt": { + "values": [ + { + "integerValue": "7" + }, + { + "referenceValue": "projects/projectID/databases/(default)/documents/C/D" + } + ], + "before": true + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-where-neq.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-where-neq.json new file mode 100644 index 000000000000..384bb7c2042a --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap-where-neq.json @@ -0,0 +1,75 @@ +{ + "tests": [ + { + "description": "query: cursor method with a document snapshot and an inequality where clause", + "comment": "A Where clause with an inequality results in an OrderBy clause\non that clause's path, if there are no other OrderBy clauses.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "where": { + "path": { + "field": [ + "a" + ] + }, + "op": "\u003c=", + "jsonValue": "3" + } + }, + { + "endBefore": { + "docSnapshot": { + "path": "projects/projectID/databases/(default)/documents/C/D", + "jsonData": "{\"a\": 7, \"b\": 8}" + } + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "where": { + "fieldFilter": { + "field": { + "fieldPath": "a" + }, + "op": "LESS_THAN_OR_EQUAL", + "value": { + "integerValue": "3" + } + } + }, + "orderBy": [ + { + "field": { + "fieldPath": "a" + }, + "direction": "ASCENDING" + }, + { + "field": { + "fieldPath": "__name__" + }, + "direction": "ASCENDING" + } + ], + "endAt": { + "values": [ + { + "integerValue": "7" + }, + { + "referenceValue": "projects/projectID/databases/(default)/documents/C/D" + } + ], + "before": true + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap.json new file mode 100644 index 000000000000..ea84c01729e6 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-docsnap.json @@ -0,0 +1,44 @@ +{ + "tests": [ + { + "description": "query: cursor methods with a document snapshot", + "comment": "When a document snapshot is used, the client appends a __name__ order-by clause.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "startAt": { + "docSnapshot": { + "path": "projects/projectID/databases/(default)/documents/C/D", + "jsonData": "{\"a\": 7, \"b\": 8}" + } + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "orderBy": [ + { + "field": { + "fieldPath": "__name__" + }, + "direction": "ASCENDING" + } + ], + "startAt": { + "values": [ + { + "referenceValue": "projects/projectID/databases/(default)/documents/C/D" + } + ], + "before": true + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-endbefore-empty-map.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-endbefore-empty-map.json new file mode 100644 index 000000000000..3d02cbca2127 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-endbefore-empty-map.json @@ -0,0 +1,55 @@ +{ + "tests": [ + { + "description": "query: EndBefore with explicit empty map", + "comment": "Cursor methods are allowed to use empty maps with EndBefore. It should result in an empty map in the query.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "asc" + } + }, + { + "endBefore": { + "jsonValues": [ + "{}" + ] + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "orderBy": [ + { + "field": { + "fieldPath": "a" + }, + "direction": "ASCENDING" + } + ], + "endAt": { + "values": [ + { + "mapValue": { + "fields": {} + } + } + ], + "before": true + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-endbefore-empty.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-endbefore-empty.json new file mode 100644 index 000000000000..c491dcd79882 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-endbefore-empty.json @@ -0,0 +1,27 @@ +{ + "tests": [ + { + "description": "query: EndBefore with empty values", + "comment": "Cursor methods are not allowed to use empty values with EndBefore. It should result in an error.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "asc" + } + }, + { + "endBefore": {} + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-no-order.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-no-order.json new file mode 100644 index 000000000000..45823b228483 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-no-order.json @@ -0,0 +1,21 @@ +{ + "tests": [ + { + "description": "query: cursor method without orderBy", + "comment": "If a cursor method with a list of values is provided, there must be at least as many\nexplicit orderBy clauses as values.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "startAt": { + "jsonValues": [ + "2" + ] + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-startat-empty-map.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-startat-empty-map.json new file mode 100644 index 000000000000..788588f76424 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-startat-empty-map.json @@ -0,0 +1,55 @@ +{ + "tests": [ + { + "description": "query: StartAt with explicit empty map", + "comment": "Cursor methods are allowed to use empty maps with StartAt. It should result in an empty map in the query.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "asc" + } + }, + { + "startAt": { + "jsonValues": [ + "{}" + ] + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "orderBy": [ + { + "field": { + "fieldPath": "a" + }, + "direction": "ASCENDING" + } + ], + "startAt": { + "values": [ + { + "mapValue": { + "fields": {} + } + } + ], + "before": true + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-startat-empty.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-startat-empty.json new file mode 100644 index 000000000000..c0c5a09801d4 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-startat-empty.json @@ -0,0 +1,27 @@ +{ + "tests": [ + { + "description": "query: StartAt with empty values", + "comment": "Cursor methods are not allowed to use empty values with StartAt. It should result in an error.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "asc" + } + }, + { + "startAt": {} + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-1a.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-1a.json new file mode 100644 index 000000000000..038d177f1535 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-1a.json @@ -0,0 +1,68 @@ +{ + "tests": [ + { + "description": "query: StartAt/EndBefore with values", + "comment": "Cursor methods take the same number of values as there are OrderBy clauses.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "asc" + } + }, + { + "startAt": { + "jsonValues": [ + "7" + ] + } + }, + { + "endBefore": { + "jsonValues": [ + "9" + ] + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "orderBy": [ + { + "field": { + "fieldPath": "a" + }, + "direction": "ASCENDING" + } + ], + "startAt": { + "values": [ + { + "integerValue": "7" + } + ], + "before": true + }, + "endAt": { + "values": [ + { + "integerValue": "9" + } + ], + "before": true + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-1b.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-1b.json new file mode 100644 index 000000000000..089cff93bdef --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-1b.json @@ -0,0 +1,66 @@ +{ + "tests": [ + { + "description": "query: StartAfter/EndAt with values", + "comment": "Cursor methods take the same number of values as there are OrderBy clauses.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "asc" + } + }, + { + "startAfter": { + "jsonValues": [ + "7" + ] + } + }, + { + "endAt": { + "jsonValues": [ + "9" + ] + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "orderBy": [ + { + "field": { + "fieldPath": "a" + }, + "direction": "ASCENDING" + } + ], + "startAt": { + "values": [ + { + "integerValue": "7" + } + ] + }, + "endAt": { + "values": [ + { + "integerValue": "9" + } + ] + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-2.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-2.json new file mode 100644 index 000000000000..8554b436039a --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-2.json @@ -0,0 +1,91 @@ +{ + "tests": [ + { + "description": "query: Start/End with two values", + "comment": "Cursor methods take the same number of values as there are OrderBy clauses.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "asc" + } + }, + { + "orderBy": { + "path": { + "field": [ + "b" + ] + }, + "direction": "desc" + } + }, + { + "startAt": { + "jsonValues": [ + "7", + "8" + ] + } + }, + { + "endAt": { + "jsonValues": [ + "9", + "10" + ] + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "orderBy": [ + { + "field": { + "fieldPath": "a" + }, + "direction": "ASCENDING" + }, + { + "field": { + "fieldPath": "b" + }, + "direction": "DESCENDING" + } + ], + "startAt": { + "values": [ + { + "integerValue": "7" + }, + { + "integerValue": "8" + } + ], + "before": true + }, + "endAt": { + "values": [ + { + "integerValue": "9" + }, + { + "integerValue": "10" + } + ] + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-docid.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-docid.json new file mode 100644 index 000000000000..6492b3f19527 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-docid.json @@ -0,0 +1,67 @@ +{ + "tests": [ + { + "description": "query: cursor methods with __name__", + "comment": "Cursor values corresponding to a __name__ field take the document path relative to the\nquery's collection.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "__name__" + ] + }, + "direction": "asc" + } + }, + { + "startAfter": { + "jsonValues": [ + "\"D1\"" + ] + } + }, + { + "endBefore": { + "jsonValues": [ + "\"D2\"" + ] + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "orderBy": [ + { + "field": { + "fieldPath": "__name__" + }, + "direction": "ASCENDING" + } + ], + "startAt": { + "values": [ + { + "referenceValue": "projects/projectID/databases/(default)/documents/C/D1" + } + ] + }, + "endAt": { + "values": [ + { + "referenceValue": "projects/projectID/databases/(default)/documents/C/D2" + } + ], + "before": true + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-last-wins.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-last-wins.json new file mode 100644 index 000000000000..4a46b2f789d5 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-cursor-vals-last-wins.json @@ -0,0 +1,82 @@ +{ + "tests": [ + { + "description": "query: cursor methods, last one wins", + "comment": "When multiple Start* or End* calls occur, the values of the last one are used.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "asc" + } + }, + { + "startAfter": { + "jsonValues": [ + "1" + ] + } + }, + { + "startAt": { + "jsonValues": [ + "2" + ] + } + }, + { + "endAt": { + "jsonValues": [ + "3" + ] + } + }, + { + "endBefore": { + "jsonValues": [ + "4" + ] + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "orderBy": [ + { + "field": { + "fieldPath": "a" + }, + "direction": "ASCENDING" + } + ], + "startAt": { + "values": [ + { + "integerValue": "2" + } + ], + "before": true + }, + "endAt": { + "values": [ + { + "integerValue": "4" + } + ], + "before": true + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-del-cursor.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-del-cursor.json new file mode 100644 index 000000000000..921ace131d28 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-del-cursor.json @@ -0,0 +1,31 @@ +{ + "tests": [ + { + "description": "query: Delete in cursor method", + "comment": "Sentinel values are not permitted in queries.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "asc" + } + }, + { + "endBefore": { + "jsonValues": [ + "\"Delete\"" + ] + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-del-where.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-del-where.json new file mode 100644 index 000000000000..2075e3578078 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-del-where.json @@ -0,0 +1,25 @@ +{ + "tests": [ + { + "description": "query: Delete in Where", + "comment": "Sentinel values are not permitted in queries.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "where": { + "path": { + "field": [ + "a" + ] + }, + "op": "==", + "jsonValue": "\"Delete\"" + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-operator.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-operator.json new file mode 100644 index 000000000000..064164dc0d89 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-operator.json @@ -0,0 +1,25 @@ +{ + "tests": [ + { + "description": "query: invalid operator in Where clause", + "comment": "The != operator is not supported.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "where": { + "path": { + "field": [ + "a" + ] + }, + "op": "!=", + "jsonValue": "4" + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-path-order.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-path-order.json new file mode 100644 index 000000000000..d0c5ba654f61 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-path-order.json @@ -0,0 +1,25 @@ +{ + "tests": [ + { + "description": "query: invalid path in OrderBy clause", + "comment": "The path has an empty component.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "*", + "" + ] + }, + "direction": "asc" + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-path-select.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-path-select.json new file mode 100644 index 000000000000..fa18f72817a4 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-path-select.json @@ -0,0 +1,26 @@ +{ + "tests": [ + { + "description": "query: invalid path in Where clause", + "comment": "The path has an empty component.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "select": { + "fields": [ + { + "field": [ + "*", + "" + ] + } + ] + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-path-where.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-path-where.json new file mode 100644 index 000000000000..a5b2add33360 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-invalid-path-where.json @@ -0,0 +1,26 @@ +{ + "tests": [ + { + "description": "query: invalid path in Where clause", + "comment": "The path has an empty component.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "where": { + "path": { + "field": [ + "*", + "" + ] + }, + "op": "==", + "jsonValue": "4" + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-offset-limit-last-wins.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-offset-limit-last-wins.json new file mode 100644 index 000000000000..8788826081ef --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-offset-limit-last-wins.json @@ -0,0 +1,34 @@ +{ + "tests": [ + { + "description": "query: multiple Offset and Limit clauses", + "comment": "With multiple Offset or Limit clauses, the last one wins.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "offset": 2 + }, + { + "limit": 3 + }, + { + "limit": 4 + }, + { + "offset": 5 + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "offset": 5, + "limit": 4 + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-offset-limit.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-offset-limit.json new file mode 100644 index 000000000000..3429dce0e89d --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-offset-limit.json @@ -0,0 +1,28 @@ +{ + "tests": [ + { + "description": "query: Offset and Limit clauses", + "comment": "Offset and Limit clauses.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "offset": 2 + }, + { + "limit": 3 + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "offset": 2, + "limit": 3 + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-order.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-order.json new file mode 100644 index 000000000000..f6670f060db9 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-order.json @@ -0,0 +1,54 @@ +{ + "tests": [ + { + "description": "query: basic OrderBy clauses", + "comment": "Multiple OrderBy clauses combine.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "b" + ] + }, + "direction": "asc" + } + }, + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "desc" + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "orderBy": [ + { + "field": { + "fieldPath": "b" + }, + "direction": "ASCENDING" + }, + { + "field": { + "fieldPath": "a" + }, + "direction": "DESCENDING" + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-select-empty.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-select-empty.json new file mode 100644 index 000000000000..8dda741a63e8 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-select-empty.json @@ -0,0 +1,32 @@ +{ + "tests": [ + { + "description": "query: empty Select clause", + "comment": "An empty Select clause selects just the document ID.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "select": { + "fields": [] + } + } + ], + "query": { + "select": { + "fields": [ + { + "fieldPath": "__name__" + } + ] + }, + "from": [ + { + "collectionId": "C" + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-select-last-wins.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-select-last-wins.json new file mode 100644 index 000000000000..9df4d13d054c --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-select-last-wins.json @@ -0,0 +1,54 @@ +{ + "tests": [ + { + "description": "query: two Select clauses", + "comment": "The last Select clause is the only one used.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "select": { + "fields": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + } + ] + } + }, + { + "select": { + "fields": [ + { + "field": [ + "c" + ] + } + ] + } + } + ], + "query": { + "select": { + "fields": [ + { + "fieldPath": "c" + } + ] + }, + "from": [ + { + "collectionId": "C" + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-select.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-select.json new file mode 100644 index 000000000000..cfaab8f1f55a --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-select.json @@ -0,0 +1,46 @@ +{ + "tests": [ + { + "description": "query: Select clause with some fields", + "comment": "An ordinary Select clause.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "select": { + "fields": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + } + ] + } + } + ], + "query": { + "select": { + "fields": [ + { + "fieldPath": "a" + }, + { + "fieldPath": "b" + } + ] + }, + "from": [ + { + "collectionId": "C" + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-st-cursor.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-st-cursor.json new file mode 100644 index 000000000000..d42416ee1dd8 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-st-cursor.json @@ -0,0 +1,31 @@ +{ + "tests": [ + { + "description": "query: ServerTimestamp in cursor method", + "comment": "Sentinel values are not permitted in queries.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "orderBy": { + "path": { + "field": [ + "a" + ] + }, + "direction": "asc" + } + }, + { + "endBefore": { + "jsonValues": [ + "\"ServerTimestamp\"" + ] + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-st-where.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-st-where.json new file mode 100644 index 000000000000..1584bb9b47b5 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-st-where.json @@ -0,0 +1,25 @@ +{ + "tests": [ + { + "description": "query: ServerTimestamp in Where", + "comment": "Sentinel values are not permitted in queries.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "where": { + "path": { + "field": [ + "a" + ] + }, + "op": "==", + "jsonValue": "\"ServerTimestamp\"" + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where-2.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where-2.json new file mode 100644 index 000000000000..a78beb264642 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where-2.json @@ -0,0 +1,71 @@ +{ + "tests": [ + { + "description": "query: two Where clauses", + "comment": "Multiple Where clauses are combined into a composite filter.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "where": { + "path": { + "field": [ + "a" + ] + }, + "op": "\u003e=", + "jsonValue": "5" + } + }, + { + "where": { + "path": { + "field": [ + "b" + ] + }, + "op": "\u003c", + "jsonValue": "\"foo\"" + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "where": { + "compositeFilter": { + "op": "AND", + "filters": [ + { + "fieldFilter": { + "field": { + "fieldPath": "a" + }, + "op": "GREATER_THAN_OR_EQUAL", + "value": { + "integerValue": "5" + } + } + }, + { + "fieldFilter": { + "field": { + "fieldPath": "b" + }, + "op": "LESS_THAN", + "value": { + "stringValue": "foo" + } + } + } + ] + } + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where-NaN.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where-NaN.json new file mode 100644 index 000000000000..c091fe5c091c --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where-NaN.json @@ -0,0 +1,39 @@ +{ + "tests": [ + { + "description": "query: a Where clause comparing to NaN", + "comment": "A Where clause that tests for equality with NaN results in a unary filter.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "where": { + "path": { + "field": [ + "a" + ] + }, + "op": "==", + "jsonValue": "\"NaN\"" + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "where": { + "unaryFilter": { + "op": "IS_NAN", + "field": { + "fieldPath": "a" + } + } + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where-null.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where-null.json new file mode 100644 index 000000000000..6862dd97f6cf --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where-null.json @@ -0,0 +1,39 @@ +{ + "tests": [ + { + "description": "query: a Where clause comparing to null", + "comment": "A Where clause that tests for equality with null results in a unary filter.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "where": { + "path": { + "field": [ + "a" + ] + }, + "op": "==", + "jsonValue": "null" + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "where": { + "unaryFilter": { + "op": "IS_NULL", + "field": { + "fieldPath": "a" + } + } + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where.json new file mode 100644 index 000000000000..b132c3030f02 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-where.json @@ -0,0 +1,42 @@ +{ + "tests": [ + { + "description": "query: Where clause", + "comment": "A simple Where clause.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "where": { + "path": { + "field": [ + "a" + ] + }, + "op": "\u003e", + "jsonValue": "5" + } + } + ], + "query": { + "from": [ + { + "collectionId": "C" + } + ], + "where": { + "fieldFilter": { + "field": { + "fieldPath": "a" + }, + "op": "GREATER_THAN", + "value": { + "integerValue": "5" + } + } + } + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-wrong-collection.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-wrong-collection.json new file mode 100644 index 000000000000..6a677f53decf --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/query-wrong-collection.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "query: doc snapshot with wrong collection in cursor method", + "comment": "If a document snapshot is passed to a Start*/End* method, it must be in the\nsame collection as the query.", + "query": { + "collPath": "projects/projectID/databases/(default)/documents/C", + "clauses": [ + { + "endBefore": { + "docSnapshot": { + "path": "projects/projectID/databases/(default)/documents/C2/D", + "jsonData": "{\"a\": 7, \"b\": 8}" + } + } + } + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-all-transforms.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-all-transforms.json new file mode 100644 index 000000000000..5c8b1373d4c0 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-all-transforms.json @@ -0,0 +1,70 @@ +{ + "tests": [ + { + "description": "set: all transforms in a single call", + "comment": "A document can be created with any amount of transforms.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\", \"c\": [\"ArrayUnion\", 1, 2, 3], \"d\": [\"ArrayRemove\", 4, 5, 6]}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + }, + { + "fieldPath": "c", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + }, + { + "fieldPath": "d", + "removeAllFromArray": { + "values": [ + { + "integerValue": "4" + }, + { + "integerValue": "5" + }, + { + "integerValue": "6" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-multi.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-multi.json new file mode 100644 index 000000000000..3ea9b0dbd8a8 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-multi.json @@ -0,0 +1,66 @@ +{ + "tests": [ + { + "description": "set: multiple ArrayRemove fields", + "comment": "A document can have more than one ArrayRemove field.\nSince all the ArrayRemove fields are removed, the only field in the update is \"a\".", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": [\"ArrayRemove\", 1, 2, 3], \"c\": {\"d\": [\"ArrayRemove\", 4, 5, 6]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "removeAllFromArray": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + }, + { + "fieldPath": "c.d", + "removeAllFromArray": { + "values": [ + { + "integerValue": "4" + }, + { + "integerValue": "5" + }, + { + "integerValue": "6" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-nested.json new file mode 100644 index 000000000000..4db133f2c54c --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-nested.json @@ -0,0 +1,50 @@ +{ + "tests": [ + { + "description": "set: nested ArrayRemove field", + "comment": "An ArrayRemove value can occur at any depth. In this case,\nthe transform applies to the field path \"b.c\". Since \"c\" is removed from the update,\n\"b\" becomes empty, so it is also removed from the update.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": {\"c\": [\"ArrayRemove\", 1, 2, 3]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b.c", + "removeAllFromArray": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-noarray-nested.json new file mode 100644 index 000000000000..96965faa660d --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-noarray-nested.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "set: ArrayRemove cannot be anywhere inside an array value", + "comment": "There cannot be an array value anywhere on the path from the document\nroot to the ArrayRemove. Firestore transforms don't support array indexing.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, {\"b\": [\"ArrayRemove\", 1, 2, 3]}]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-noarray.json new file mode 100644 index 000000000000..cd0e04468bdf --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-noarray.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "set: ArrayRemove cannot be in an array value", + "comment": "ArrayRemove must be the value of a field. Firestore\ntransforms don't support array indexing.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2, [\"ArrayRemove\", 1, 2, 3]]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-with-st.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-with-st.json new file mode 100644 index 000000000000..146e41fdf439 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove-with-st.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "set: The ServerTimestamp sentinel cannot be in an ArrayUnion", + "comment": "The ServerTimestamp sentinel must be the value of a field. It may\nnot appear in an ArrayUnion.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [\"ArrayRemove\", 1, \"ServerTimestamp\", 3]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove.json new file mode 100644 index 000000000000..18969ef80a5f --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayremove.json @@ -0,0 +1,50 @@ +{ + "tests": [ + { + "description": "set: ArrayRemove with data", + "comment": "A key with ArrayRemove is removed from the data in the update \noperation. Instead it appears in a separate Transform operation.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": [\"ArrayRemove\", 1, 2, 3]}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "removeAllFromArray": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-multi.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-multi.json new file mode 100644 index 000000000000..3d076397c5ff --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-multi.json @@ -0,0 +1,66 @@ +{ + "tests": [ + { + "description": "set: multiple ArrayUnion fields", + "comment": "A document can have more than one ArrayUnion field.\nSince all the ArrayUnion fields are removed, the only field in the update is \"a\".", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": [\"ArrayUnion\", 1, 2, 3], \"c\": {\"d\": [\"ArrayUnion\", 4, 5, 6]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + }, + { + "fieldPath": "c.d", + "appendMissingElements": { + "values": [ + { + "integerValue": "4" + }, + { + "integerValue": "5" + }, + { + "integerValue": "6" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-nested.json new file mode 100644 index 000000000000..e265f6c61375 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-nested.json @@ -0,0 +1,50 @@ +{ + "tests": [ + { + "description": "set: nested ArrayUnion field", + "comment": "An ArrayUnion value can occur at any depth. In this case,\nthe transform applies to the field path \"b.c\". Since \"c\" is removed from the update,\n\"b\" becomes empty, so it is also removed from the update.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": {\"c\": [\"ArrayUnion\", 1, 2, 3]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b.c", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-noarray-nested.json new file mode 100644 index 000000000000..c9b1385e03ad --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-noarray-nested.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "set: ArrayUnion cannot be anywhere inside an array value", + "comment": "There cannot be an array value anywhere on the path from the document\nroot to the ArrayUnion. Firestore transforms don't support array indexing.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, {\"b\": [\"ArrayUnion\", 1, 2, 3]}]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-noarray.json new file mode 100644 index 000000000000..4379578bd838 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-noarray.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "set: ArrayUnion cannot be in an array value", + "comment": "ArrayUnion must be the value of a field. Firestore\ntransforms don't support array indexing.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2, [\"ArrayRemove\", 1, 2, 3]]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-with-st.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-with-st.json new file mode 100644 index 000000000000..d65436af2055 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion-with-st.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "set: The ServerTimestamp sentinel cannot be in an ArrayUnion", + "comment": "The ServerTimestamp sentinel must be the value of a field. It may\nnot appear in an ArrayUnion.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [\"ArrayUnion\", 1, \"ServerTimestamp\", 3]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion.json new file mode 100644 index 000000000000..856e07517327 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-arrayunion.json @@ -0,0 +1,50 @@ +{ + "tests": [ + { + "description": "set: ArrayUnion with data", + "comment": "A key with ArrayUnion is removed from the data in the update \noperation. Instead it appears in a separate Transform operation.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": [\"ArrayUnion\", 1, 2, 3]}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-basic.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-basic.json new file mode 100644 index 000000000000..f322509126d3 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-basic.json @@ -0,0 +1,27 @@ +{ + "tests": [ + { + "description": "set: basic", + "comment": "A simple call, resulting in a single update operation.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-complex.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-complex.json new file mode 100644 index 000000000000..aa871ddae6c7 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-complex.json @@ -0,0 +1,60 @@ +{ + "tests": [ + { + "description": "set: complex", + "comment": "A call to a write method with complicated input data.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2.5], \"b\": {\"c\": [\"three\", {\"d\": true}]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "arrayValue": { + "values": [ + { + "integerValue": "1" + }, + { + "doubleValue": 2.5 + } + ] + } + }, + "b": { + "mapValue": { + "fields": { + "c": { + "arrayValue": { + "values": [ + { + "stringValue": "three" + }, + { + "mapValue": { + "fields": { + "d": { + "booleanValue": true + } + } + } + } + ] + } + } + } + } + } + } + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-merge-alone.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-merge-alone.json new file mode 100644 index 000000000000..7a8ba5d5458c --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-merge-alone.json @@ -0,0 +1,37 @@ +{ + "tests": [ + { + "description": "set-merge: Delete with merge", + "comment": "A Delete sentinel can appear with a merge option. If the delete\npaths are the only ones to be merged, then no document is sent, just an update mask.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "b", + "c" + ] + } + ] + }, + "jsonData": "{\"a\": 1, \"b\": {\"c\": \"Delete\"}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d" + }, + "updateMask": { + "fieldPaths": [ + "b.c" + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-merge.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-merge.json new file mode 100644 index 000000000000..6a5759c12555 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-merge.json @@ -0,0 +1,48 @@ +{ + "tests": [ + { + "description": "set-merge: Delete with merge", + "comment": "A Delete sentinel can appear with a merge option.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b", + "c" + ] + } + ] + }, + "jsonData": "{\"a\": 1, \"b\": {\"c\": \"Delete\"}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "b.c" + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-mergeall.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-mergeall.json new file mode 100644 index 000000000000..6106a3e4f229 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-mergeall.json @@ -0,0 +1,36 @@ +{ + "tests": [ + { + "description": "set: Delete with MergeAll", + "comment": "A Delete sentinel can appear with a mergeAll option.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "all": true + }, + "jsonData": "{\"a\": 1, \"b\": {\"c\": \"Delete\"}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "b.c" + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-noarray-nested.json new file mode 100644 index 000000000000..5a2303284e48 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-noarray-nested.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "set: Delete cannot be anywhere inside an array value", + "comment": "The Delete sentinel must be the value of a field. Deletes are implemented\nby turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not support\narray indexing.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, {\"b\": \"Delete\"}]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-noarray.json new file mode 100644 index 000000000000..dee9c75f6972 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-noarray.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "set: Delete cannot be in an array value", + "comment": "The Delete sentinel must be the value of a field. Deletes are\nimplemented by turning the path to the Delete sentinel into a FieldPath, and FieldPaths\ndo not support array indexing.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2, \"Delete\"]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-nomerge.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-nomerge.json new file mode 100644 index 000000000000..67e3b74b8607 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-nomerge.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "set-merge: Delete cannot appear in an unmerged field", + "comment": "The client signals an error if the Delete sentinel is in the\ninput data, but not selected by a merge option, because this is most likely a programming\nbug.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "a" + ] + } + ] + }, + "jsonData": "{\"a\": 1, \"b\": \"Delete\"}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-nonleaf.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-nonleaf.json new file mode 100644 index 000000000000..67c864957ca8 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-nonleaf.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "set-merge: Delete cannot appear as part of a merge path", + "comment": "If a Delete is part of the value at a merge path, then the user is\nconfused: their merge path says \"replace this entire value\" but their Delete says\n\"delete this part of the value\". This should be an error, just as if they specified Delete\nin a Set with no merge.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "h" + ] + } + ] + }, + "jsonData": "{\"h\": {\"g\": \"Delete\"}}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-wo-merge.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-wo-merge.json new file mode 100644 index 000000000000..32d860a626df --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-del-wo-merge.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "set: Delete cannot appear unless a merge option is specified", + "comment": "Without a merge option, Set replaces the document with the input\ndata. A Delete sentinel in the data makes no sense in this case.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": \"Delete\"}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-empty.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-empty.json new file mode 100644 index 000000000000..924992caf308 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-empty.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "set: creating or setting an empty map", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": {} + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-fp.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-fp.json new file mode 100644 index 000000000000..8a5b0faa6e2a --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-fp.json @@ -0,0 +1,48 @@ +{ + "tests": [ + { + "description": "set-merge: Merge with FieldPaths", + "comment": "A merge with fields that use special characters.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "*", + "~" + ] + } + ] + }, + "jsonData": "{\"*\": {\"~\": true}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "*": { + "mapValue": { + "fields": { + "~": { + "booleanValue": true + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "`*`.`~`" + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-nested.json new file mode 100644 index 000000000000..8ebec8fda277 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-nested.json @@ -0,0 +1,48 @@ +{ + "tests": [ + { + "description": "set-merge: Merge with a nested field", + "comment": "A merge option where the field is not at top level.\nOnly fields mentioned in the option are present in the update operation.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "h", + "g" + ] + } + ] + }, + "jsonData": "{\"h\": {\"g\": 4, \"f\": 5}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "h": { + "mapValue": { + "fields": { + "g": { + "integerValue": "4" + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "h.g" + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-nonleaf.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-nonleaf.json new file mode 100644 index 000000000000..d115e12c2abd --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-nonleaf.json @@ -0,0 +1,50 @@ +{ + "tests": [ + { + "description": "set-merge: Merge field is not a leaf", + "comment": "If a field path is in a merge option, the value at that path\nreplaces the stored value. That is true even if the value is complex.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "h" + ] + } + ] + }, + "jsonData": "{\"h\": {\"f\": 5, \"g\": 6}, \"e\": 7}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "h": { + "mapValue": { + "fields": { + "f": { + "integerValue": "5" + }, + "g": { + "integerValue": "6" + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "h" + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-prefix.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-prefix.json new file mode 100644 index 000000000000..a09e4db50985 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-prefix.json @@ -0,0 +1,28 @@ +{ + "tests": [ + { + "description": "set-merge: One merge path cannot be the prefix of another", + "comment": "The prefix would make the other path meaningless, so this is\nprobably a programming error.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "a", + "b" + ] + } + ] + }, + "jsonData": "{\"a\": {\"b\": 1}}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-present.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-present.json new file mode 100644 index 000000000000..b501b23d03f5 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge-present.json @@ -0,0 +1,27 @@ +{ + "tests": [ + { + "description": "set-merge: Merge fields must all be present in data", + "comment": "The client signals an error if a merge option mentions a path\nthat is not in the input data.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "b" + ] + }, + { + "field": [ + "a" + ] + } + ] + }, + "jsonData": "{\"a\": 1}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge.json new file mode 100644 index 000000000000..8ce730e840ad --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-merge.json @@ -0,0 +1,41 @@ +{ + "tests": [ + { + "description": "set-merge: Merge with a field", + "comment": "Fields in the input data but not in a merge option are pruned.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "a" + ] + } + ] + }, + "jsonData": "{\"a\": 1, \"b\": 2}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-mergeall-empty.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-mergeall-empty.json new file mode 100644 index 000000000000..e541ad8c9a7d --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-mergeall-empty.json @@ -0,0 +1,29 @@ +{ + "tests": [ + { + "description": "set: MergeAll can be specified with empty data.", + "comment": "This is a valid call that can be used to ensure a document exists.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "all": true + }, + "jsonData": "{}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": {} + }, + "updateMask": { + "fieldPaths": [] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-mergeall-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-mergeall-nested.json new file mode 100644 index 000000000000..c70ec691e29a --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-mergeall-nested.json @@ -0,0 +1,45 @@ +{ + "tests": [ + { + "description": "set: MergeAll with nested fields", + "comment": "MergeAll with nested fields results in an update mask that\nincludes entries for all the leaf fields.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "all": true + }, + "jsonData": "{\"h\": { \"g\": 3, \"f\": 4 }}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "h": { + "mapValue": { + "fields": { + "f": { + "integerValue": "4" + }, + "g": { + "integerValue": "3" + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "h.f", + "h.g" + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-mergeall.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-mergeall.json new file mode 100644 index 000000000000..55a2377cb51d --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-mergeall.json @@ -0,0 +1,39 @@ +{ + "tests": [ + { + "description": "set: MergeAll", + "comment": "The MergeAll option with a simple piece of data.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "all": true + }, + "jsonData": "{\"a\": 1, \"b\": 2}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + }, + "b": { + "integerValue": "2" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "b" + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-nodel.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-nodel.json new file mode 100644 index 000000000000..5580bc04f64c --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-nodel.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "set: Delete cannot appear in data", + "comment": "The Delete sentinel cannot be used in Create, or in Set without a Merge option.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": \"Delete\"}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-nosplit.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-nosplit.json new file mode 100644 index 000000000000..3866027b9b58 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-nosplit.json @@ -0,0 +1,36 @@ +{ + "tests": [ + { + "description": "set: don’t split on dots", + "comment": "Create and Set treat their map keys literally. They do not split on dots.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{ \"a.b\": { \"c.d\": 1 }, \"e\": 2 }", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a.b": { + "mapValue": { + "fields": { + "c.d": { + "integerValue": "1" + } + } + } + }, + "e": { + "integerValue": "2" + } + } + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-special-chars.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-special-chars.json new file mode 100644 index 000000000000..865ffcd9dc76 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-special-chars.json @@ -0,0 +1,36 @@ +{ + "tests": [ + { + "description": "set: non-alpha characters in map keys", + "comment": "Create and Set treat their map keys literally. They do not escape special characters.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{ \"*\": { \".\": 1 }, \"~\": 2 }", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "*": { + "mapValue": { + "fields": { + ".": { + "integerValue": "1" + } + } + } + }, + "~": { + "integerValue": "2" + } + } + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-alone-mergeall.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-alone-mergeall.json new file mode 100644 index 000000000000..d95bf0973b79 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-alone-mergeall.json @@ -0,0 +1,31 @@ +{ + "tests": [ + { + "description": "set: ServerTimestamp alone with MergeAll", + "comment": "If the only values in the input are ServerTimestamps, then no\nupdate operation should be produced.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "all": true + }, + "jsonData": "{\"a\": \"ServerTimestamp\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-alone.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-alone.json new file mode 100644 index 000000000000..3fe931394b0e --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-alone.json @@ -0,0 +1,34 @@ +{ + "tests": [ + { + "description": "set: ServerTimestamp alone", + "comment": "If the only values in the input are ServerTimestamps, then\nan update operation with an empty map should be produced.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": \"ServerTimestamp\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": {} + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-both.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-both.json new file mode 100644 index 000000000000..a39ada55f738 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-both.json @@ -0,0 +1,57 @@ +{ + "tests": [ + { + "description": "set-merge: ServerTimestamp with Merge of both fields", + "comment": "Just as when no merge option is specified, ServerTimestamp\nsentinel values are removed from the data in the update operation and become\ntransforms.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + } + ] + }, + "jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-nonleaf-alone.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-nonleaf-alone.json new file mode 100644 index 000000000000..4193b00ea683 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-nonleaf-alone.json @@ -0,0 +1,47 @@ +{ + "tests": [ + { + "description": "set-merge: non-leaf merge field with ServerTimestamp alone", + "comment": "If a field path is in a merge option, the value at that path\nreplaces the stored value. If the value has only ServerTimestamps, they become transforms\nand we clear the value by including the field path in the update mask.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "h" + ] + } + ] + }, + "jsonData": "{\"h\": {\"g\": \"ServerTimestamp\"}, \"e\": 7}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d" + }, + "updateMask": { + "fieldPaths": [ + "h" + ] + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "h.g", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-nonleaf.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-nonleaf.json new file mode 100644 index 000000000000..5e91d663b8c6 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-nonleaf.json @@ -0,0 +1,58 @@ +{ + "tests": [ + { + "description": "set-merge: non-leaf merge field with ServerTimestamp", + "comment": "If a field path is in a merge option, the value at that path\nreplaces the stored value, and ServerTimestamps inside that value become transforms\nas usual.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "h" + ] + } + ] + }, + "jsonData": "{\"h\": {\"f\": 5, \"g\": \"ServerTimestamp\"}, \"e\": 7}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "h": { + "mapValue": { + "fields": { + "f": { + "integerValue": "5" + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "h" + ] + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "h.g", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-nowrite.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-nowrite.json new file mode 100644 index 000000000000..08fa8b52f54b --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-merge-nowrite.json @@ -0,0 +1,37 @@ +{ + "tests": [ + { + "description": "set-merge: If no ordinary values in Merge, no write", + "comment": "If all the fields in the merge option have ServerTimestamp\nvalues, then no update operation is produced, only a transform.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "b" + ] + } + ] + }, + "jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-mergeall.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-mergeall.json new file mode 100644 index 000000000000..26883c03820d --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-mergeall.json @@ -0,0 +1,46 @@ +{ + "tests": [ + { + "description": "set: ServerTimestamp with MergeAll", + "comment": "Just as when no merge option is specified, ServerTimestamp\nsentinel values are removed from the data in the update operation and become\ntransforms.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "all": true + }, + "jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-multi.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-multi.json new file mode 100644 index 000000000000..23c06f4976f7 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-multi.json @@ -0,0 +1,42 @@ +{ + "tests": [ + { + "description": "set: multiple ServerTimestamp fields", + "comment": "A document can have more than one ServerTimestamp field.\nSince all the ServerTimestamp fields are removed, the only field in the update is \"a\".", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\", \"c\": {\"d\": \"ServerTimestamp\"}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + }, + { + "fieldPath": "c.d", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-nested.json new file mode 100644 index 000000000000..5c94c33f943d --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-nested.json @@ -0,0 +1,38 @@ +{ + "tests": [ + { + "description": "set: nested ServerTimestamp field", + "comment": "A ServerTimestamp value can occur at any depth. In this case,\nthe transform applies to the field path \"b.c\". Since \"c\" is removed from the update,\n\"b\" becomes empty, so it is also removed from the update.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": {\"c\": \"ServerTimestamp\"}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b.c", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-noarray-nested.json new file mode 100644 index 000000000000..5ad6a50897ba --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-noarray-nested.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "set: ServerTimestamp cannot be anywhere inside an array value", + "comment": "There cannot be an array value anywhere on the path from the document\nroot to the ServerTimestamp sentinel. Firestore transforms don't support array indexing.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, {\"b\": \"ServerTimestamp\"}]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-noarray.json new file mode 100644 index 000000000000..76a2881cb61b --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-noarray.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "set: ServerTimestamp cannot be in an array value", + "comment": "The ServerTimestamp sentinel must be the value of a field. Firestore\ntransforms don't support array indexing.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2, \"ServerTimestamp\"]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-nomerge.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-nomerge.json new file mode 100644 index 000000000000..0523ed74fb44 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-nomerge.json @@ -0,0 +1,41 @@ +{ + "tests": [ + { + "description": "set-merge: If is ServerTimestamp not in Merge, no transform", + "comment": "If the ServerTimestamp value is not mentioned in a merge option,\nthen it is pruned from the data but does not result in a transform.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "option": { + "fields": [ + { + "field": [ + "a" + ] + } + ] + }, + "jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-with-empty-map.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-with-empty-map.json new file mode 100644 index 000000000000..063c94a0e6cd --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st-with-empty-map.json @@ -0,0 +1,46 @@ +{ + "tests": [ + { + "description": "set: ServerTimestamp beside an empty map", + "comment": "When a ServerTimestamp and a map both reside inside a map, the\nServerTimestamp should be stripped out but the empty map should remain.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": {\"b\": {}, \"c\": \"ServerTimestamp\"}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "mapValue": { + "fields": { + "b": { + "mapValue": { + "fields": {} + } + } + } + } + } + } + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a.c", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st.json new file mode 100644 index 000000000000..42f2b14f1c7f --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/set-st.json @@ -0,0 +1,38 @@ +{ + "tests": [ + { + "description": "set: ServerTimestamp with data", + "comment": "A key with the special ServerTimestamp sentinel is removed from\nthe data in the update operation. Instead it appears in a separate Transform operation.\nNote that in these tests, the string \"ServerTimestamp\" should be replaced with the\nspecial ServerTimestamp value.", + "set": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-all-transforms.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-all-transforms.json new file mode 100644 index 000000000000..6f6a725df0fc --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-all-transforms.json @@ -0,0 +1,78 @@ +{ + "tests": [ + { + "description": "update: all transforms in a single call", + "comment": "A document can be created with any amount of transforms.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\", \"c\": [\"ArrayUnion\", 1, 2, 3], \"d\": [\"ArrayRemove\", 4, 5, 6]}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + }, + { + "fieldPath": "c", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + }, + { + "fieldPath": "d", + "removeAllFromArray": { + "values": [ + { + "integerValue": "4" + }, + { + "integerValue": "5" + }, + { + "integerValue": "6" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-alone.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-alone.json new file mode 100644 index 000000000000..86fc8802e52e --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-alone.json @@ -0,0 +1,43 @@ +{ + "tests": [ + { + "description": "update: ArrayRemove alone", + "comment": "If the only values in the input are ArrayRemove, then no\nupdate operation should be produced.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [\"ArrayRemove\", 1, 2, 3]}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a", + "removeAllFromArray": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-multi.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-multi.json new file mode 100644 index 000000000000..df880f6792b9 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-multi.json @@ -0,0 +1,75 @@ +{ + "tests": [ + { + "description": "update: multiple ArrayRemove fields", + "comment": "A document can have more than one ArrayRemove field.\nSince all the ArrayRemove fields are removed, the only field in the update is \"a\".", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": [\"ArrayRemove\", 1, 2, 3], \"c\": {\"d\": [\"ArrayRemove\", 4, 5, 6]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "c" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "removeAllFromArray": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + }, + { + "fieldPath": "c.d", + "removeAllFromArray": { + "values": [ + { + "integerValue": "4" + }, + { + "integerValue": "5" + }, + { + "integerValue": "6" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-nested.json new file mode 100644 index 000000000000..28d59aff661f --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-nested.json @@ -0,0 +1,59 @@ +{ + "tests": [ + { + "description": "update: nested ArrayRemove field", + "comment": "An ArrayRemove value can occur at any depth. In this case,\nthe transform applies to the field path \"b.c\". Since \"c\" is removed from the update,\n\"b\" becomes empty, so it is also removed from the update.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": {\"c\": [\"ArrayRemove\", 1, 2, 3]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "b" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b.c", + "removeAllFromArray": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-noarray-nested.json new file mode 100644 index 000000000000..842c5fe3240c --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-noarray-nested.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: ArrayRemove cannot be anywhere inside an array value", + "comment": "There cannot be an array value anywhere on the path from the document\nroot to the ArrayRemove. Firestore transforms don't support array indexing.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, {\"b\": [\"ArrayRemove\", 1, 2, 3]}]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-noarray.json new file mode 100644 index 000000000000..0a371f055488 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-noarray.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: ArrayRemove cannot be in an array value", + "comment": "ArrayRemove must be the value of a field. Firestore\ntransforms don't support array indexing.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2, [\"ArrayRemove\", 1, 2, 3]]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-with-st.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-with-st.json new file mode 100644 index 000000000000..9d110de9caea --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove-with-st.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: The ServerTimestamp sentinel cannot be in an ArrayUnion", + "comment": "The ServerTimestamp sentinel must be the value of a field. It may\nnot appear in an ArrayUnion.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [\"ArrayRemove\", 1, \"ServerTimestamp\", 3]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove.json new file mode 100644 index 000000000000..d925704db63b --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayremove.json @@ -0,0 +1,58 @@ +{ + "tests": [ + { + "description": "update: ArrayRemove with data", + "comment": "A key with ArrayRemove is removed from the data in the update \noperation. Instead it appears in a separate Transform operation.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": [\"ArrayRemove\", 1, 2, 3]}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "removeAllFromArray": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-alone.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-alone.json new file mode 100644 index 000000000000..757ea48c3b7f --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-alone.json @@ -0,0 +1,43 @@ +{ + "tests": [ + { + "description": "update: ArrayUnion alone", + "comment": "If the only values in the input are ArrayUnion, then no\nupdate operation should be produced.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [\"ArrayUnion\", 1, 2, 3]}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-multi.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-multi.json new file mode 100644 index 000000000000..3aafcd0f3545 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-multi.json @@ -0,0 +1,75 @@ +{ + "tests": [ + { + "description": "update: multiple ArrayUnion fields", + "comment": "A document can have more than one ArrayUnion field.\nSince all the ArrayUnion fields are removed, the only field in the update is \"a\".", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": [\"ArrayUnion\", 1, 2, 3], \"c\": {\"d\": [\"ArrayUnion\", 4, 5, 6]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "c" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + }, + { + "fieldPath": "c.d", + "appendMissingElements": { + "values": [ + { + "integerValue": "4" + }, + { + "integerValue": "5" + }, + { + "integerValue": "6" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-nested.json new file mode 100644 index 000000000000..f2bf3770dc77 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-nested.json @@ -0,0 +1,59 @@ +{ + "tests": [ + { + "description": "update: nested ArrayUnion field", + "comment": "An ArrayUnion value can occur at any depth. In this case,\nthe transform applies to the field path \"b.c\". Since \"c\" is removed from the update,\n\"b\" becomes empty, so it is also removed from the update.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": {\"c\": [\"ArrayUnion\", 1, 2, 3]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "b" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b.c", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-noarray-nested.json new file mode 100644 index 000000000000..08745a08b07b --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-noarray-nested.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: ArrayUnion cannot be anywhere inside an array value", + "comment": "There cannot be an array value anywhere on the path from the document\nroot to the ArrayUnion. Firestore transforms don't support array indexing.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, {\"b\": [\"ArrayUnion\", 1, 2, 3]}]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-noarray.json new file mode 100644 index 000000000000..284f42800eba --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-noarray.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: ArrayUnion cannot be in an array value", + "comment": "ArrayUnion must be the value of a field. Firestore\ntransforms don't support array indexing.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2, [\"ArrayRemove\", 1, 2, 3]]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-with-st.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-with-st.json new file mode 100644 index 000000000000..1c47591e29bc --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion-with-st.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: The ServerTimestamp sentinel cannot be in an ArrayUnion", + "comment": "The ServerTimestamp sentinel must be the value of a field. It may\nnot appear in an ArrayUnion.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [\"ArrayUnion\", 1, \"ServerTimestamp\", 3]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion.json new file mode 100644 index 000000000000..60192c9f8c0b --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-arrayunion.json @@ -0,0 +1,58 @@ +{ + "tests": [ + { + "description": "update: ArrayUnion with data", + "comment": "A key with ArrayUnion is removed from the data in the update \noperation. Instead it appears in a separate Transform operation.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": [\"ArrayUnion\", 1, 2, 3]}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-badchar.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-badchar.json new file mode 100644 index 000000000000..7d5e6e4f07bc --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-badchar.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: invalid character", + "comment": "The keys of the data given to Update are interpreted, unlike those of Create and Set. They cannot contain special characters.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a~b\": 1}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-basic.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-basic.json new file mode 100644 index 000000000000..f864247427e8 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-basic.json @@ -0,0 +1,35 @@ +{ + "tests": [ + { + "description": "update: basic", + "comment": "A simple call, resulting in a single update operation.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-complex.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-complex.json new file mode 100644 index 000000000000..ddf8373367c4 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-complex.json @@ -0,0 +1,69 @@ +{ + "tests": [ + { + "description": "update: complex", + "comment": "A call to a write method with complicated input data.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2.5], \"b\": {\"c\": [\"three\", {\"d\": true}]}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "arrayValue": { + "values": [ + { + "integerValue": "1" + }, + { + "doubleValue": 2.5 + } + ] + } + }, + "b": { + "mapValue": { + "fields": { + "c": { + "arrayValue": { + "values": [ + { + "stringValue": "three" + }, + { + "mapValue": { + "fields": { + "d": { + "booleanValue": true + } + } + } + } + ] + } + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "b" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-alone.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-alone.json new file mode 100644 index 000000000000..45598ab40220 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-alone.json @@ -0,0 +1,30 @@ +{ + "tests": [ + { + "description": "update: Delete alone", + "comment": "If the input data consists solely of Deletes, then the update\noperation has no map, just an update mask.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": \"Delete\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d" + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-dot.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-dot.json new file mode 100644 index 000000000000..44f36b0c3e85 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-dot.json @@ -0,0 +1,46 @@ +{ + "tests": [ + { + "description": "update: Delete with a dotted field", + "comment": "After expanding top-level dotted fields, fields with Delete\nvalues are pruned from the output data, but appear in the update mask.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b.c\": \"Delete\", \"b.d\": 2}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + }, + "b": { + "mapValue": { + "fields": { + "d": { + "integerValue": "2" + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "b.c", + "b.d" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-nested.json new file mode 100644 index 000000000000..18d08f3f004e --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-nested.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: Delete cannot be nested", + "comment": "The Delete sentinel must be the value of a top-level key.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": {\"b\": \"Delete\"}}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-noarray-nested.json new file mode 100644 index 000000000000..025cbed0dfb3 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-noarray-nested.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: Delete cannot be anywhere inside an array value", + "comment": "The Delete sentinel must be the value of a field. Deletes are implemented\nby turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not support\narray indexing.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, {\"b\": \"Delete\"}]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-noarray.json new file mode 100644 index 000000000000..dce3806f2c35 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del-noarray.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: Delete cannot be in an array value", + "comment": "The Delete sentinel must be the value of a field. Deletes are\nimplemented by turning the path to the Delete sentinel into a FieldPath, and FieldPaths\ndo not support array indexing.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2, \"Delete\"]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del.json new file mode 100644 index 000000000000..26a6a1bc7e43 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-del.json @@ -0,0 +1,36 @@ +{ + "tests": [ + { + "description": "update: Delete", + "comment": "If a field's value is the Delete sentinel, then it doesn't appear\nin the update data, but does in the mask.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": \"Delete\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "b" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-exists-precond.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-exists-precond.json new file mode 100644 index 000000000000..bdbe274b4c23 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-exists-precond.json @@ -0,0 +1,16 @@ +{ + "tests": [ + { + "description": "update: Exists precondition is invalid", + "comment": "The Update method does not support an explicit exists precondition.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "precondition": { + "exists": true + }, + "jsonData": "{\"a\": 1}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-fp-empty-component.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-fp-empty-component.json new file mode 100644 index 000000000000..50274e49ffe2 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-fp-empty-component.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: empty field path component", + "comment": "Empty fields are not allowed.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a..b\": 1}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-nested-transform-and-nested-value.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-nested-transform-and-nested-value.json new file mode 100644 index 000000000000..ff7bfc6ee944 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-nested-transform-and-nested-value.json @@ -0,0 +1,52 @@ +{ + "tests": [ + { + "description": "update: Nested transforms should not affect the field mask, even\nwhen there are other values that do. Transforms should only affect the\nDocumentTransform_FieldTransform list.", + "comment": "For updates, top-level paths in json-like map inputs\nare split on the dot. That is, an input {\"a.b.c\": 7} results in an update to\nfield c of object b of object a with value 7. In order to specify this behavior,\nthe update must use a fieldmask \"a.b.c\". However, fieldmasks are only used for\nconcrete values - transforms are separately encoded in a\nDocumentTransform_FieldTransform array.\n\nThis test exercises a bug found in python (https://github.com/googleapis/google-cloud-python/issues/7215)\nin which nested transforms ({\"a.c\": \"ServerTimestamp\"}) next to nested values\n({\"a.b\": 7}) incorrectly caused the fieldmask \"a\" to be set, which has the\neffect of wiping out all data in \"a\" other than what was specified in the\njson-like input.\n\nInstead, as this test specifies, transforms should not affect the fieldmask.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a.b\": 7, \"a.c\": \"ServerTimestamp\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "mapValue": { + "fields": { + "b": { + "integerValue": "7" + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "a.b" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a.c", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-no-paths.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-no-paths.json new file mode 100644 index 000000000000..6cfbc01dce20 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-no-paths.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: no paths", + "comment": "It is a client-side error to call Update with empty data.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-all-transforms.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-all-transforms.json new file mode 100644 index 000000000000..01a4c1143dc1 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-all-transforms.json @@ -0,0 +1,105 @@ +{ + "tests": [ + { + "description": "update-paths: all transforms in a single call", + "comment": "A document can be created with any amount of transforms.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + }, + { + "field": [ + "c" + ] + }, + { + "field": [ + "d" + ] + } + ], + "jsonValues": [ + "1", + "\"ServerTimestamp\"", + "[\"ArrayUnion\", 1, 2, 3]", + "[\"ArrayRemove\", 4, 5, 6]" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + }, + { + "fieldPath": "c", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + }, + { + "fieldPath": "d", + "removeAllFromArray": { + "values": [ + { + "integerValue": "4" + }, + { + "integerValue": "5" + }, + { + "integerValue": "6" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-alone.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-alone.json new file mode 100644 index 000000000000..9bc8a1440137 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-alone.json @@ -0,0 +1,52 @@ +{ + "tests": [ + { + "description": "update-paths: ArrayRemove alone", + "comment": "If the only values in the input are ArrayRemove, then no\nupdate operation should be produced.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "[\"ArrayRemove\", 1, 2, 3]" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a", + "removeAllFromArray": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-multi.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-multi.json new file mode 100644 index 000000000000..9a8547120e3a --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-multi.json @@ -0,0 +1,96 @@ +{ + "tests": [ + { + "description": "update-paths: multiple ArrayRemove fields", + "comment": "A document can have more than one ArrayRemove field.\nSince all the ArrayRemove fields are removed, the only field in the update is \"a\".", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + }, + { + "field": [ + "c" + ] + } + ], + "jsonValues": [ + "1", + "[\"ArrayRemove\", 1, 2, 3]", + "{\"d\": [\"ArrayRemove\", 4, 5, 6]}" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "c" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "removeAllFromArray": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + }, + { + "fieldPath": "c.d", + "removeAllFromArray": { + "values": [ + { + "integerValue": "4" + }, + { + "integerValue": "5" + }, + { + "integerValue": "6" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-nested.json new file mode 100644 index 000000000000..e7f952ec3423 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-nested.json @@ -0,0 +1,74 @@ +{ + "tests": [ + { + "description": "update-paths: nested ArrayRemove field", + "comment": "An ArrayRemove value can occur at any depth. In this case,\nthe transform applies to the field path \"b.c\". Since \"c\" is removed from the update,\n\"b\" becomes empty, so it is also removed from the update.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + } + ], + "jsonValues": [ + "1", + "{\"c\": [\"ArrayRemove\", 1, 2, 3]}" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "b" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b.c", + "removeAllFromArray": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-noarray-nested.json new file mode 100644 index 000000000000..b669e870cd31 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-noarray-nested.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "update-paths: ArrayRemove cannot be anywhere inside an array value", + "comment": "There cannot be an array value anywhere on the path from the document\nroot to the ArrayRemove. Firestore transforms don't support array indexing.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "[1, {\"b\": [\"ArrayRemove\", 1, 2, 3]}]" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-noarray.json new file mode 100644 index 000000000000..ff50e11e4fb2 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-noarray.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "update-paths: ArrayRemove cannot be in an array value", + "comment": "ArrayRemove must be the value of a field. Firestore\ntransforms don't support array indexing.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "[1, 2, [\"ArrayRemove\", 1, 2, 3]]" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-with-st.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-with-st.json new file mode 100644 index 000000000000..d27d26e44664 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove-with-st.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "update-paths: The ServerTimestamp sentinel cannot be in an ArrayUnion", + "comment": "The ServerTimestamp sentinel must be the value of a field. It may\nnot appear in an ArrayUnion.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "[\"ArrayRemove\", 1, \"ServerTimestamp\", 3]" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove.json new file mode 100644 index 000000000000..673a2ca2c1af --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayremove.json @@ -0,0 +1,73 @@ +{ + "tests": [ + { + "description": "update-paths: ArrayRemove with data", + "comment": "A key with ArrayRemove is removed from the data in the update \noperation. Instead it appears in a separate Transform operation.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + } + ], + "jsonValues": [ + "1", + "[\"ArrayRemove\", 1, 2, 3]" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "removeAllFromArray": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-alone.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-alone.json new file mode 100644 index 000000000000..81e1e9771ab7 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-alone.json @@ -0,0 +1,52 @@ +{ + "tests": [ + { + "description": "update-paths: ArrayUnion alone", + "comment": "If the only values in the input are ArrayUnion, then no\nupdate operation should be produced.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "[\"ArrayUnion\", 1, 2, 3]" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-multi.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-multi.json new file mode 100644 index 000000000000..ef421bdad180 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-multi.json @@ -0,0 +1,96 @@ +{ + "tests": [ + { + "description": "update-paths: multiple ArrayUnion fields", + "comment": "A document can have more than one ArrayUnion field.\nSince all the ArrayUnion fields are removed, the only field in the update is \"a\".", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + }, + { + "field": [ + "c" + ] + } + ], + "jsonValues": [ + "1", + "[\"ArrayUnion\", 1, 2, 3]", + "{\"d\": [\"ArrayUnion\", 4, 5, 6]}" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "c" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + }, + { + "fieldPath": "c.d", + "appendMissingElements": { + "values": [ + { + "integerValue": "4" + }, + { + "integerValue": "5" + }, + { + "integerValue": "6" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-nested.json new file mode 100644 index 000000000000..2d73527a4048 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-nested.json @@ -0,0 +1,74 @@ +{ + "tests": [ + { + "description": "update-paths: nested ArrayUnion field", + "comment": "An ArrayUnion value can occur at any depth. In this case,\nthe transform applies to the field path \"b.c\". Since \"c\" is removed from the update,\n\"b\" becomes empty, so it is also removed from the update.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + } + ], + "jsonValues": [ + "1", + "{\"c\": [\"ArrayUnion\", 1, 2, 3]}" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "b" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b.c", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-noarray-nested.json new file mode 100644 index 000000000000..0e8a634a4417 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-noarray-nested.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "update-paths: ArrayUnion cannot be anywhere inside an array value", + "comment": "There cannot be an array value anywhere on the path from the document\nroot to the ArrayUnion. Firestore transforms don't support array indexing.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "[1, {\"b\": [\"ArrayUnion\", 1, 2, 3]}]" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-noarray.json new file mode 100644 index 000000000000..ce45841888fa --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-noarray.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "update-paths: ArrayUnion cannot be in an array value", + "comment": "ArrayUnion must be the value of a field. Firestore\ntransforms don't support array indexing.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "[1, 2, [\"ArrayRemove\", 1, 2, 3]]" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-with-st.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-with-st.json new file mode 100644 index 000000000000..c0a4204182cd --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion-with-st.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "update-paths: The ServerTimestamp sentinel cannot be in an ArrayUnion", + "comment": "The ServerTimestamp sentinel must be the value of a field. It may\nnot appear in an ArrayUnion.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "[\"ArrayUnion\", 1, \"ServerTimestamp\", 3]" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion.json new file mode 100644 index 000000000000..1401993d059d --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-arrayunion.json @@ -0,0 +1,73 @@ +{ + "tests": [ + { + "description": "update-paths: ArrayUnion with data", + "comment": "A key with ArrayUnion is removed from the data in the update \noperation. Instead it appears in a separate Transform operation.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + } + ], + "jsonValues": [ + "1", + "[\"ArrayUnion\", 1, 2, 3]" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "appendMissingElements": { + "values": [ + { + "integerValue": "1" + }, + { + "integerValue": "2" + }, + { + "integerValue": "3" + } + ] + } + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-basic.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-basic.json new file mode 100644 index 000000000000..bf1164ac410d --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-basic.json @@ -0,0 +1,44 @@ +{ + "tests": [ + { + "description": "update-paths: basic", + "comment": "A simple call, resulting in a single update operation.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "1" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-complex.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-complex.json new file mode 100644 index 000000000000..2f3faa7846c6 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-complex.json @@ -0,0 +1,84 @@ +{ + "tests": [ + { + "description": "update-paths: complex", + "comment": "A call to a write method with complicated input data.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + } + ], + "jsonValues": [ + "[1, 2.5]", + "{\"c\": [\"three\", {\"d\": true}]}" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "arrayValue": { + "values": [ + { + "integerValue": "1" + }, + { + "doubleValue": 2.5 + } + ] + } + }, + "b": { + "mapValue": { + "fields": { + "c": { + "arrayValue": { + "values": [ + { + "stringValue": "three" + }, + { + "mapValue": { + "fields": { + "d": { + "booleanValue": true + } + } + } + } + ] + } + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "b" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-alone.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-alone.json new file mode 100644 index 000000000000..e3368c86c376 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-alone.json @@ -0,0 +1,39 @@ +{ + "tests": [ + { + "description": "update-paths: Delete alone", + "comment": "If the input data consists solely of Deletes, then the update\noperation has no map, just an update mask.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "\"Delete\"" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d" + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-nested.json new file mode 100644 index 000000000000..07f9f405ea40 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-nested.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "update-paths: Delete cannot be nested", + "comment": "The Delete sentinel must be the value of a top-level key.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "{\"b\": \"Delete\"}" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-noarray-nested.json new file mode 100644 index 000000000000..a74c0aeb570c --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-noarray-nested.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "update-paths: Delete cannot be anywhere inside an array value", + "comment": "The Delete sentinel must be the value of a field. Deletes are implemented\nby turning the path to the Delete sentinel into a FieldPath, and FieldPaths do not support\narray indexing.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "[1, {\"b\": \"Delete\"}]" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-noarray.json new file mode 100644 index 000000000000..fb6d00b72400 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del-noarray.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "update-paths: Delete cannot be in an array value", + "comment": "The Delete sentinel must be the value of a field. Deletes are\nimplemented by turning the path to the Delete sentinel into a FieldPath, and FieldPaths\ndo not support array indexing.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "[1, 2, \"Delete\"]" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del.json new file mode 100644 index 000000000000..cb5f6bedf41e --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-del.json @@ -0,0 +1,51 @@ +{ + "tests": [ + { + "description": "update-paths: Delete", + "comment": "If a field's value is the Delete sentinel, then it doesn't appear\nin the update data, but does in the mask.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + } + ], + "jsonValues": [ + "1", + "\"Delete\"" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "b" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-exists-precond.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-exists-precond.json new file mode 100644 index 000000000000..d495db033010 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-exists-precond.json @@ -0,0 +1,25 @@ +{ + "tests": [ + { + "description": "update-paths: Exists precondition is invalid", + "comment": "The Update method does not support an explicit exists precondition.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "precondition": { + "exists": true + }, + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "1" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-del.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-del.json new file mode 100644 index 000000000000..95b787a91363 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-del.json @@ -0,0 +1,59 @@ +{ + "tests": [ + { + "description": "update-paths: field paths with delete", + "comment": "If one nested field is deleted, and another isn't, preserve the second.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "foo", + "bar" + ] + }, + { + "field": [ + "foo", + "delete" + ] + } + ], + "jsonValues": [ + "1", + "\"Delete\"" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "foo": { + "mapValue": { + "fields": { + "bar": { + "integerValue": "1" + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "foo.bar", + "foo.delete" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-dup-transforms.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-dup-transforms.json new file mode 100644 index 000000000000..aff02a8d2036 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-dup-transforms.json @@ -0,0 +1,34 @@ +{ + "tests": [ + { + "description": "update-paths: duplicate field path with only transforms", + "comment": "The same field cannot occur more than once, even if all the operations are transforms.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + }, + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "[\"ArrayUnion\", 1, 2, 3]", + "\"ServerTimestamp\"", + "[\"ArrayUnion\", 4, 5, 6]" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-dup.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-dup.json new file mode 100644 index 000000000000..71bf4d54a2a4 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-dup.json @@ -0,0 +1,34 @@ +{ + "tests": [ + { + "description": "update-paths: duplicate field path", + "comment": "The same field cannot occur more than once.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + }, + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "1", + "2", + "3" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-empty-component.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-empty-component.json new file mode 100644 index 000000000000..161e9f6eff9e --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-empty-component.json @@ -0,0 +1,23 @@ +{ + "tests": [ + { + "description": "update-paths: empty field path component", + "comment": "Empty fields are not allowed.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "*", + "" + ] + } + ], + "jsonValues": [ + "1" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-empty.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-empty.json new file mode 100644 index 000000000000..9424da130565 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-empty.json @@ -0,0 +1,20 @@ +{ + "tests": [ + { + "description": "update-paths: empty field path", + "comment": "A FieldPath of length zero is invalid.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [] + } + ], + "jsonValues": [ + "1" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-multi.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-multi.json new file mode 100644 index 000000000000..a0afd38b8f26 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-multi.json @@ -0,0 +1,51 @@ +{ + "tests": [ + { + "description": "update-paths: multiple-element field path", + "comment": "The UpdatePaths or equivalent method takes a list of FieldPaths.\nEach FieldPath is a sequence of uninterpreted path components.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a", + "b" + ] + } + ], + "jsonValues": [ + "1" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "mapValue": { + "fields": { + "b": { + "integerValue": "1" + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "a.b" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-nosplit.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-nosplit.json new file mode 100644 index 000000000000..23e9ddc9d3ad --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-fp-nosplit.json @@ -0,0 +1,57 @@ +{ + "tests": [ + { + "description": "update-paths: FieldPath elements are not split on dots", + "comment": "FieldPath components are not split on dots.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a.b", + "f.g" + ] + } + ], + "jsonValues": [ + "{\"n.o\": 7}" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a.b": { + "mapValue": { + "fields": { + "f.g": { + "mapValue": { + "fields": { + "n.o": { + "integerValue": "7" + } + } + } + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "`a.b`.`f.g`" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-nested-transform-and-nested-value.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-nested-transform-and-nested-value.json new file mode 100644 index 000000000000..927d783aee46 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-nested-transform-and-nested-value.json @@ -0,0 +1,69 @@ +{ + "tests": [ + { + "description": "update-paths: Nested transforms should not affect the field mask, even\nwhen there are other values that do. Transforms should only affect the\nDocumentTransform_FieldTransform list.", + "comment": "For updates, top-level paths in json-like map inputs\nare split on the dot. That is, an input {\"a.b.c\": 7} results in an update to\nfield c of object b of object a with value 7. In order to specify this behavior,\nthe update must use a fieldmask \"a.b.c\". However, fieldmasks are only used for\nconcrete values - transforms are separately encoded in a\nDocumentTransform_FieldTransform array.\n\nThis test exercises a bug found in python (https://github.com/googleapis/google-cloud-python/issues/7215)\nin which nested transforms ({\"a.c\": \"ServerTimestamp\"}) next to nested values\n({\"a.b\": 7}) incorrectly caused the fieldmask \"a\" to be set, which has the\neffect of wiping out all data in \"a\" other than what was specified in the\njson-like input.\n\nInstead, as this test specifies, transforms should not affect the fieldmask.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a", + "b" + ] + }, + { + "field": [ + "a", + "c" + ] + } + ], + "jsonValues": [ + "7", + "\"ServerTimestamp\"" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "mapValue": { + "fields": { + "b": { + "integerValue": "7" + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "a.b" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a.c", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-no-paths.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-no-paths.json new file mode 100644 index 000000000000..e8ad035eaf13 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-no-paths.json @@ -0,0 +1,12 @@ +{ + "tests": [ + { + "description": "update-paths: no paths", + "comment": "It is a client-side error to call Update with empty data.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-prefix-1.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-prefix-1.json new file mode 100644 index 000000000000..0bc1c0e812de --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-prefix-1.json @@ -0,0 +1,29 @@ +{ + "tests": [ + { + "description": "update-paths: prefix #1", + "comment": "In the input data, one field cannot be a prefix of another.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a", + "b" + ] + }, + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "1", + "2" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-prefix-2.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-prefix-2.json new file mode 100644 index 000000000000..6f1d152a7077 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-prefix-2.json @@ -0,0 +1,29 @@ +{ + "tests": [ + { + "description": "update-paths: prefix #2", + "comment": "In the input data, one field cannot be a prefix of another.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "a", + "b" + ] + } + ], + "jsonValues": [ + "1", + "2" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-prefix-3.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-prefix-3.json new file mode 100644 index 000000000000..4fe17b292f6a --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-prefix-3.json @@ -0,0 +1,29 @@ +{ + "tests": [ + { + "description": "update-paths: prefix #3", + "comment": "In the input data, one field cannot be a prefix of another, even if the values could in principle be combined.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "a", + "d" + ] + } + ], + "jsonValues": [ + "{\"b\": 1}", + "2" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-special-chars.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-special-chars.json new file mode 100644 index 000000000000..83b27d8dbfde --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-special-chars.json @@ -0,0 +1,62 @@ +{ + "tests": [ + { + "description": "update-paths: special characters", + "comment": "FieldPaths can contain special characters.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "*", + "~" + ] + }, + { + "field": [ + "*", + "`" + ] + } + ], + "jsonValues": [ + "1", + "2" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "*": { + "mapValue": { + "fields": { + "`": { + "integerValue": "2" + }, + "~": { + "integerValue": "1" + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "`*`.`\\``", + "`*`.`~`" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-alone.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-alone.json new file mode 100644 index 000000000000..085d04987713 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-alone.json @@ -0,0 +1,40 @@ +{ + "tests": [ + { + "description": "update-paths: ServerTimestamp alone", + "comment": "If the only values in the input are ServerTimestamps, then no\nupdate operation should be produced.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "\"ServerTimestamp\"" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a", + "setToServerValue": "REQUEST_TIME" + } + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-multi.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-multi.json new file mode 100644 index 000000000000..2d813801ac33 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-multi.json @@ -0,0 +1,72 @@ +{ + "tests": [ + { + "description": "update-paths: multiple ServerTimestamp fields", + "comment": "A document can have more than one ServerTimestamp field.\nSince all the ServerTimestamp fields are removed, the only field in the update is \"a\".", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + }, + { + "field": [ + "c" + ] + } + ], + "jsonValues": [ + "1", + "\"ServerTimestamp\"", + "{\"d\": \"ServerTimestamp\"}" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "c" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + }, + { + "fieldPath": "c.d", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-nested.json new file mode 100644 index 000000000000..8bd35c9111b1 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-nested.json @@ -0,0 +1,62 @@ +{ + "tests": [ + { + "description": "update-paths: nested ServerTimestamp field", + "comment": "A ServerTimestamp value can occur at any depth. In this case,\nthe transform applies to the field path \"b.c\". Since \"c\" is removed from the update,\n\"b\" becomes empty, so it is also removed from the update.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + } + ], + "jsonValues": [ + "1", + "{\"c\": \"ServerTimestamp\"}" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "b" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b.c", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-noarray-nested.json new file mode 100644 index 000000000000..2dd1bcacc775 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-noarray-nested.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "update-paths: ServerTimestamp cannot be anywhere inside an array value", + "comment": "There cannot be an array value anywhere on the path from the document\nroot to the ServerTimestamp sentinel. Firestore transforms don't support array indexing.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "[1, {\"b\": \"ServerTimestamp\"}]" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-noarray.json new file mode 100644 index 000000000000..5da60306bc25 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-noarray.json @@ -0,0 +1,22 @@ +{ + "tests": [ + { + "description": "update-paths: ServerTimestamp cannot be in an array value", + "comment": "The ServerTimestamp sentinel must be the value of a field. Firestore\ntransforms don't support array indexing.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "[1, 2, \"ServerTimestamp\"]" + ], + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-with-empty-map.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-with-empty-map.json new file mode 100644 index 000000000000..ac60b2771d37 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st-with-empty-map.json @@ -0,0 +1,63 @@ +{ + "tests": [ + { + "description": "update-paths: ServerTimestamp beside an empty map", + "comment": "When a ServerTimestamp and a map both reside inside a map, the\nServerTimestamp should be stripped out but the empty map should remain.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "{\"b\": {}, \"c\": \"ServerTimestamp\"}" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "mapValue": { + "fields": { + "b": { + "mapValue": { + "fields": {} + } + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a.c", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st.json new file mode 100644 index 000000000000..011405b9bf7b --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-st.json @@ -0,0 +1,61 @@ +{ + "tests": [ + { + "description": "update-paths: ServerTimestamp with data", + "comment": "A key with the special ServerTimestamp sentinel is removed from\nthe data in the update operation. Instead it appears in a separate Transform operation.\nNote that in these tests, the string \"ServerTimestamp\" should be replaced with the\nspecial ServerTimestamp value.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "fieldPaths": [ + { + "field": [ + "a" + ] + }, + { + "field": [ + "b" + ] + } + ], + "jsonValues": [ + "1", + "\"ServerTimestamp\"" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-uptime.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-uptime.json new file mode 100644 index 000000000000..96801a0cd8e7 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-paths-uptime.json @@ -0,0 +1,47 @@ +{ + "tests": [ + { + "description": "update-paths: last-update-time precondition", + "comment": "The Update call supports a last-update-time precondition.", + "updatePaths": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "precondition": { + "updateTime": "1970-01-01T00:00:42Z" + }, + "fieldPaths": [ + { + "field": [ + "a" + ] + } + ], + "jsonValues": [ + "1" + ], + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "updateTime": "1970-01-01T00:00:42Z" + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-prefix-1.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-prefix-1.json new file mode 100644 index 000000000000..faad69d140bc --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-prefix-1.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: prefix #1", + "comment": "In the input data, one field cannot be a prefix of another.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a.b\": 1, \"a\": 2}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-prefix-2.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-prefix-2.json new file mode 100644 index 000000000000..96545c134867 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-prefix-2.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: prefix #2", + "comment": "In the input data, one field cannot be a prefix of another.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"a.b\": 2}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-prefix-3.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-prefix-3.json new file mode 100644 index 000000000000..95f7024966c7 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-prefix-3.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: prefix #3", + "comment": "In the input data, one field cannot be a prefix of another, even if the values could in principle be combined.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": {\"b\": 1}, \"a.d\": 2}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-quoting.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-quoting.json new file mode 100644 index 000000000000..10e3c35c22ca --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-quoting.json @@ -0,0 +1,47 @@ +{ + "tests": [ + { + "description": "update: non-letter starting chars are quoted, except underscore", + "comment": "In a field path, any component beginning with a non-letter or underscore is quoted.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"_0.1.+2\": 1}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "_0": { + "mapValue": { + "fields": { + "1": { + "mapValue": { + "fields": { + "+2": { + "integerValue": "1" + } + } + } + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "_0.`1`.`+2`" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-split-top-level.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-split-top-level.json new file mode 100644 index 000000000000..eddf360d3731 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-split-top-level.json @@ -0,0 +1,47 @@ +{ + "tests": [ + { + "description": "update: Split on dots for top-level keys only", + "comment": "The Update method splits only top-level keys at dots. Keys at\nother levels are taken literally.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"h.g\": {\"j.k\": 6}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "h": { + "mapValue": { + "fields": { + "g": { + "mapValue": { + "fields": { + "j.k": { + "integerValue": "6" + } + } + } + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "h.g" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-split.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-split.json new file mode 100644 index 000000000000..e18c78bf6e61 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-split.json @@ -0,0 +1,47 @@ +{ + "tests": [ + { + "description": "update: split on dots", + "comment": "The Update method splits top-level keys at dots.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a.b.c\": 1}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "mapValue": { + "fields": { + "b": { + "mapValue": { + "fields": { + "c": { + "integerValue": "1" + } + } + } + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "a.b.c" + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-alone.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-alone.json new file mode 100644 index 000000000000..1a333f30cbb6 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-alone.json @@ -0,0 +1,31 @@ +{ + "tests": [ + { + "description": "update: ServerTimestamp alone", + "comment": "If the only values in the input are ServerTimestamps, then no\nupdate operation should be produced.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": \"ServerTimestamp\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a", + "setToServerValue": "REQUEST_TIME" + } + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-dot.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-dot.json new file mode 100644 index 000000000000..83422ca5271f --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-dot.json @@ -0,0 +1,31 @@ +{ + "tests": [ + { + "description": "update: ServerTimestamp with dotted field", + "comment": "Like other uses of ServerTimestamp, the data is pruned and the\nfield does not appear in the update mask, because it is in the transform. In this case\nAn update operation is produced just to hold the precondition.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a.b.c\": \"ServerTimestamp\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a.b.c", + "setToServerValue": "REQUEST_TIME" + } + ] + }, + "currentDocument": { + "exists": true + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-multi.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-multi.json new file mode 100644 index 000000000000..8105ec27f543 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-multi.json @@ -0,0 +1,51 @@ +{ + "tests": [ + { + "description": "update: multiple ServerTimestamp fields", + "comment": "A document can have more than one ServerTimestamp field.\nSince all the ServerTimestamp fields are removed, the only field in the update is \"a\".", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\", \"c\": {\"d\": \"ServerTimestamp\"}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "c" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + }, + { + "fieldPath": "c.d", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-nested.json new file mode 100644 index 000000000000..5a8e73237c34 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-nested.json @@ -0,0 +1,47 @@ +{ + "tests": [ + { + "description": "update: nested ServerTimestamp field", + "comment": "A ServerTimestamp value can occur at any depth. In this case,\nthe transform applies to the field path \"b.c\". Since \"c\" is removed from the update,\n\"b\" becomes empty, so it is also removed from the update.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": {\"c\": \"ServerTimestamp\"}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a", + "b" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b.c", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-noarray-nested.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-noarray-nested.json new file mode 100644 index 000000000000..9f94501aa7fb --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-noarray-nested.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: ServerTimestamp cannot be anywhere inside an array value", + "comment": "There cannot be an array value anywhere on the path from the document\nroot to the ServerTimestamp sentinel. Firestore transforms don't support array indexing.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, {\"b\": \"ServerTimestamp\"}]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-noarray.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-noarray.json new file mode 100644 index 000000000000..02615bd3ceb2 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-noarray.json @@ -0,0 +1,13 @@ +{ + "tests": [ + { + "description": "update: ServerTimestamp cannot be in an array value", + "comment": "The ServerTimestamp sentinel must be the value of a field. Firestore\ntransforms don't support array indexing.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": [1, 2, \"ServerTimestamp\"]}", + "isError": true + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-with-empty-map.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-with-empty-map.json new file mode 100644 index 000000000000..abeceb03ea8e --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st-with-empty-map.json @@ -0,0 +1,54 @@ +{ + "tests": [ + { + "description": "update: ServerTimestamp beside an empty map", + "comment": "When a ServerTimestamp and a map both reside inside a map, the\nServerTimestamp should be stripped out but the empty map should remain.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": {\"b\": {}, \"c\": \"ServerTimestamp\"}}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "mapValue": { + "fields": { + "b": { + "mapValue": { + "fields": {} + } + } + } + } + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "a.c", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st.json new file mode 100644 index 000000000000..6249d8bda90d --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-st.json @@ -0,0 +1,46 @@ +{ + "tests": [ + { + "description": "update: ServerTimestamp with data", + "comment": "A key with the special ServerTimestamp sentinel is removed from\nthe data in the update operation. Instead it appears in a separate Transform operation.\nNote that in these tests, the string \"ServerTimestamp\" should be replaced with the\nspecial ServerTimestamp value.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "jsonData": "{\"a\": 1, \"b\": \"ServerTimestamp\"}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "exists": true + } + }, + { + "transform": { + "document": "projects/projectID/databases/(default)/documents/C/d", + "fieldTransforms": [ + { + "fieldPath": "b", + "setToServerValue": "REQUEST_TIME" + } + ] + } + } + ] + } + } + } + ] +} diff --git a/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-uptime.json b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-uptime.json new file mode 100644 index 000000000000..9210a2cf0328 --- /dev/null +++ b/google-cloud-testing/google-cloud-conformance-tests/src/main/resources/com/google/cloud/conformance/firestore/v1/update-uptime.json @@ -0,0 +1,38 @@ +{ + "tests": [ + { + "description": "update: last-update-time precondition", + "comment": "The Update call supports a last-update-time precondition.", + "update": { + "docRefPath": "projects/projectID/databases/(default)/documents/C/d", + "precondition": { + "updateTime": "1970-01-01T00:00:42Z" + }, + "jsonData": "{\"a\": 1}", + "request": { + "database": "projects/projectID/databases/(default)", + "writes": [ + { + "update": { + "name": "projects/projectID/databases/(default)/documents/C/d", + "fields": { + "a": { + "integerValue": "1" + } + } + }, + "updateMask": { + "fieldPaths": [ + "a" + ] + }, + "currentDocument": { + "updateTime": "1970-01-01T00:00:42Z" + } + } + ] + } + } + } + ] +}