@google-cloud/firestore-api 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +111 -0
- package/build/protos/google/firestore/admin/v1/backup.proto +112 -0
- package/build/protos/google/firestore/admin/v1/database.proto +403 -0
- package/build/protos/google/firestore/admin/v1/field.proto +154 -0
- package/build/protos/google/firestore/admin/v1/firestore_admin.proto +1229 -0
- package/build/protos/google/firestore/admin/v1/index.proto +378 -0
- package/build/protos/google/firestore/admin/v1/location.proto +30 -0
- package/build/protos/google/firestore/admin/v1/operation.proto +330 -0
- package/build/protos/google/firestore/admin/v1/realtime_updates.proto +40 -0
- package/build/protos/google/firestore/admin/v1/schedule.proto +95 -0
- package/build/protos/google/firestore/admin/v1/snapshot.proto +53 -0
- package/build/protos/google/firestore/admin/v1/user_creds.proto +86 -0
- package/build/protos/google/firestore/v1/aggregation_result.proto +43 -0
- package/build/protos/google/firestore/v1/bloom_filter.proto +73 -0
- package/build/protos/google/firestore/v1/common.proto +111 -0
- package/build/protos/google/firestore/v1/document.proto +247 -0
- package/build/protos/google/firestore/v1/explain_stats.proto +41 -0
- package/build/protos/google/firestore/v1/firestore.proto +1237 -0
- package/build/protos/google/firestore/v1/pipeline.proto +43 -0
- package/build/protos/google/firestore/v1/query.proto +600 -0
- package/build/protos/google/firestore/v1/query_profile.proto +92 -0
- package/build/protos/google/firestore/v1/write.proto +286 -0
- package/build/protos/google/firestore/v1beta1/common.proto +82 -0
- package/build/protos/google/firestore/v1beta1/document.proto +149 -0
- package/build/protos/google/firestore/v1beta1/firestore.proto +900 -0
- package/build/protos/google/firestore/v1beta1/query.proto +300 -0
- package/build/protos/google/firestore/v1beta1/undeliverable_first_gen_event.proto +75 -0
- package/build/protos/google/firestore/v1beta1/write.proto +258 -0
- package/build/protos/protos.d.ts +35648 -0
- package/build/protos/protos.js +1 -0
- package/build/protos/protos.json +1 -0
- package/build/src/index.d.ts +13 -0
- package/build/src/index.js +30 -0
- package/build/src/index.js.map +1 -0
- package/build/src/v1/firestore_admin_client.d.ts +1925 -0
- package/build/src/v1/firestore_admin_client.js +2734 -0
- package/build/src/v1/firestore_admin_client.js.map +1 -0
- package/build/src/v1/firestore_admin_client_config.json +172 -0
- package/build/src/v1/firestore_admin_proto_list.json +13 -0
- package/build/src/v1/firestore_client.d.ts +1204 -0
- package/build/src/v1/firestore_client.js +1605 -0
- package/build/src/v1/firestore_client.js.map +1 -0
- package/build/src/v1/firestore_client_config.json +135 -0
- package/build/src/v1/firestore_proto_list.json +12 -0
- package/build/src/v1/gapic_metadata.json +351 -0
- package/build/src/v1/index.d.ts +2 -0
- package/build/src/v1/index.js +25 -0
- package/build/src/v1/index.js.map +1 -0
- package/build/src/v1beta1/firestore_client.d.ts +930 -0
- package/build/src/v1beta1/firestore_client.js +1310 -0
- package/build/src/v1beta1/firestore_client.js.map +1 -0
- package/build/src/v1beta1/firestore_client_config.json +99 -0
- package/build/src/v1beta1/firestore_proto_list.json +8 -0
- package/build/src/v1beta1/gapic_metadata.json +165 -0
- package/build/src/v1beta1/index.d.ts +1 -0
- package/build/src/v1beta1/index.js +23 -0
- package/build/src/v1beta1/index.js.map +1 -0
- package/package.json +65 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(e=>{"function"==typeof define&&define.amd?define(["protobufjs/minimal"],e):"function"==typeof require&&"object"==typeof module&&module&&module.exports&&(module.exports=e(require("google-gax/build/src/protobuf").protobufMinimal))})(function(o){var e,t,r,n,i,A,d=o.Reader,a=o.Writer,p=o.util,f=o.roots._google_cloud_firestore_api_protos||(o.roots._google_cloud_firestore_api_protos={});function s(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function F(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function l(e){if(this.tags={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function V(e){if(this.activeKeyVersion=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function U(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function B(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function M(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function q(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Q(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function J(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function G(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function W(e){if(this.indexes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function z(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function c(e){if(this.fields=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function u(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Y(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function H(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function K(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function X(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Z(e){if(this.indexSpecs=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function $(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ee(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function g(e,t,r){o.rpc.Service.call(this,e,t,r)}function te(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function re(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function oe(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ne(e){if(this.databases=[],this.unreachable=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ie(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ae(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function se(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function le(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ce(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ue(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function de(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function pe(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function fe(e){if(this.userCreds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ge(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function me(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function be(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ye(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function he(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Oe(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ve(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function je(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function we(e){if(this.backupSchedules=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function xe(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Te(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ke(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Se(e){if(this.indexes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Pe(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ee(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function De(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ie(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Re(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Le(e){if(this.fields=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function _e(e){if(this.collectionIds=[],this.namespaceIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ce(e){if(this.collectionIds=[],this.namespaceIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ne(e){if(this.collectionIds=[],this.namespaceIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ae(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Fe(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ve(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ue(e){if(this.backups=[],this.unreachable=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Be(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Me(e){if(this.tags={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function qe(e){if(this.tags={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Qe(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function m(e){if(this.indexConfigDeltas=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Je(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ge(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function b(e){if(this.collectionIds=[],this.namespaceIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function We(e){if(this.collectionIds=[],this.namespaceIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ze(e){if(this.collectionIds=[],this.namespaceIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ye(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function He(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ke(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Xe(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ze(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function $e(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function et(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function tt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function y(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function rt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ot(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function nt(e){if(this.aggregateFields={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function it(e){if(this.fields={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function h(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function at(e){if(this.values=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function st(e){if(this.fields={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function lt(e){if(this.args=[],this.options={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ct(e){if(this.stages=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ut(e){if(this.args=[],this.options={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function dt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function pt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ft(e){if(this.fieldPaths=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function gt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function mt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function bt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function yt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ht(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ot(e,t,r){o.rpc.Service.call(this,e,t,r)}function vt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function O(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function jt(e){if(this.documents=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function wt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function xt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Tt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function kt(e){if(this.documents=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function St(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Pt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Et(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Dt(e){if(this.writes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function It(e){if(this.writeResults=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Rt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Lt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function _t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ct(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Nt(e){if(this.results=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function At(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ft(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Vt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ut(e){if(this.partitions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Bt(e){if(this.writes=[],this.labels={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Mt(e){if(this.writeResults=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function qt(e){if(this.labels={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Qt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function v(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Jt(e){if(this.documents=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Gt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Wt(e){if(this.targetIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function zt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Yt(e){if(this.collectionIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ht(e){if(this.writes=[],this.labels={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Kt(e){if(this.writeResults=[],this.status=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Xt(e){if(this.options={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function j(e){if(this.from=[],this.orderBy=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Zt(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function $t(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function er(e){if(this.filters=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function tr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function rr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function or(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function nr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ir(e){if(this.fields=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ar(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function sr(e){if(this.aggregations=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function lr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function cr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ur(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function dr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function pr(e){if(this.values=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function fr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function gr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function mr(e){if(this.indexesUsed=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function br(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function yr(e){if(this.updateTransforms=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function hr(e){if(this.fieldTransforms=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function w(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Or(e){if(this.transformResults=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function vr(e){if(this.targetIds=[],this.removedTargetIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function jr(e){if(this.removedTargetIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function wr(e){if(this.removedTargetIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function xr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Tr(e){if(this.fieldPaths=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function kr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Sr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Pr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Er(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Dr(e){if(this.fields={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function x(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ir(e){if(this.values=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Rr(e){if(this.fields={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Lr(e,t,r){o.rpc.Service.call(this,e,t,r)}function _r(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function T(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Cr(e){if(this.documents=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Nr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ar(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Fr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Vr(e){if(this.documents=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ur(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Br(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Mr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function qr(e){if(this.writes=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Qr(e){if(this.writeResults=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Jr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Gr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Wr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function zr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Yr(e){if(this.partitions=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Hr(e){if(this.writes=[],this.labels={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Kr(e){if(this.writeResults=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Xr(e){if(this.labels={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Zr(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function k(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function $r(e){if(this.documents=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function eo(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function to(e){if(this.targetIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ro(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function oo(e){if(this.collectionIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function no(e){if(this.writes=[],this.labels={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function io(e){if(this.writeResults=[],this.status=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function S(e){if(this.from=[],this.orderBy=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ao(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function so(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function lo(e){if(this.filters=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function co(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function uo(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function po(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function fo(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function go(e){if(this.fields=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function mo(e){if(this.values=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function bo(e){if(this.updateTransforms=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function yo(e){if(this.fieldTransforms=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ho(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Oo(e){if(this.transformResults=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function vo(e){if(this.targetIds=[],this.removedTargetIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function jo(e){if(this.removedTargetIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function wo(e){if(this.removedTargetIds=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function xo(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function To(e){if(this.functionName=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ko(e){if(this.pattern=[],this.style=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function So(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Po(e){if(this.rules=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function P(e){if(this.additionalBindings=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Eo(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Do(e){if(this.destinations=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function E(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function D(e){if(this.methodSettings=[],this.codeownerGithubTeams=[],this.librarySettings=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Io(e){if(this.serviceClassNames={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ro(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Lo(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function _o(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Co(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function No(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ao(e){if(this.renamedServices={},this.renamedResources={},this.ignoredResources=[],this.forcedNamespaceAliases=[],this.handwrittenSignatures=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Fo(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Vo(e){if(this.renamedServices={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Uo(e){if(this.autoPopulatedFields=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Bo(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Mo(e){if(this.methods=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function qo(e){if(this.routingParameters=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Qo(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Jo(e){if(this.file=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function I(e){if(this.dependency=[],this.publicDependency=[],this.weakDependency=[],this.optionDependency=[],this.messageType=[],this.enumType=[],this.service=[],this.extension=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function R(e){if(this.field=[],this.extension=[],this.nestedType=[],this.enumType=[],this.extensionRange=[],this.oneofDecl=[],this.reservedRange=[],this.reservedName=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Go(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Wo(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function zo(e){if(this.uninterpretedOption=[],this.declaration=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Yo(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function L(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ho(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ko(e){if(this.value=[],this.reservedRange=[],this.reservedName=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Xo(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Zo(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function $o(e){if(this.method=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function en(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function _(e){if(this.uninterpretedOption=[],this[".google.api.resourceDefinition"]=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function tn(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function C(e){if(this.targets=[],this.editionDefaults=[],this.uninterpretedOption=[],this[".google.api.fieldBehavior"]=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function rn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function on(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function nn(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function an(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function sn(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function ln(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function cn(e){if(this.uninterpretedOption=[],this[".google.api.methodSignature"]=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function un(e){if(this.name=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function dn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function N(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function pn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function fn(e){if(this.defaults=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function gn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function mn(e){if(this.location=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function bn(e){if(this.path=[],this.span=[],this.leadingDetachedComments=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function yn(e){if(this.annotation=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function hn(e){if(this.path=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function On(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function vn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function jn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function wn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function xn(e){if(this.paths=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Tn(e){if(this.fields={},e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function kn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Sn(e){if(this.values=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Pn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function En(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Dn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function In(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Rn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Ln(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function _n(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Cn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Nn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function An(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Fn(e,t,r){o.rpc.Service.call(this,e,t,r)}function Vn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Un(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Bn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Mn(e){if(this.operations=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function qn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Qn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Jn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Gn(e){if(e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}function Wn(e){if(this.details=[],e)for(var t=Object.keys(e),r=0;r<t.length;++r)null!=e[t[r]]&&"__proto__"!==t[r]&&(this[t[r]]=e[t[r]])}return f.google=((A={}).firestore=((n={}).admin=((r={}).v1=((t={}).Backup=(s.prototype.name="",s.prototype.database="",s.prototype.databaseUid="",s.prototype.snapshotTime=null,s.prototype.expireTime=null,s.prototype.stats=null,s.prototype.state=0,s.create=function(e){return new s(e)},s.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(18).string(e.database),null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")&&f.google.protobuf.Timestamp.encode(e.snapshotTime,t.uint32(26).fork(),r+1).ldelim(),null!=e.expireTime&&Object.hasOwnProperty.call(e,"expireTime")&&f.google.protobuf.Timestamp.encode(e.expireTime,t.uint32(34).fork(),r+1).ldelim(),null!=e.stats&&Object.hasOwnProperty.call(e,"stats")&&f.google.firestore.admin.v1.Backup.Stats.encode(e.stats,t.uint32(50).fork(),r+1).ldelim(),null!=e.databaseUid&&Object.hasOwnProperty.call(e,"databaseUid")&&t.uint32(58).string(e.databaseUid),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(64).int32(e.state),t},s.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},s.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Backup;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.database=e.string();break;case 7:i.databaseUid=e.string();break;case 3:i.snapshotTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 4:i.expireTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 6:i.stats=f.google.firestore.admin.v1.Backup.Stats.decode(e,e.uint32(),void 0,o+1);break;case 8:i.state=e.int32();break;default:e.skipType(7&a,o)}}return i},s.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},s.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.databaseUid&&Object.hasOwnProperty.call(e,"databaseUid")&&!p.isString(e.databaseUid))return"databaseUid: string expected";var r;if(null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")&&(r=f.google.protobuf.Timestamp.verify(e.snapshotTime,t+1)))return"snapshotTime."+r;if(null!=e.expireTime&&Object.hasOwnProperty.call(e,"expireTime")&&(r=f.google.protobuf.Timestamp.verify(e.expireTime,t+1)))return"expireTime."+r;if(null!=e.stats&&Object.hasOwnProperty.call(e,"stats")&&(r=f.google.firestore.admin.v1.Backup.Stats.verify(e.stats,t+1)))return"stats."+r;if(null!=e.state&&Object.hasOwnProperty.call(e,"state"))switch(e.state){default:return"state: enum value expected";case 0:case 1:case 2:case 3:}return null},s.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Backup)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Backup: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.Backup;if(null!=e.name&&(r.name=String(e.name)),null!=e.database&&(r.database=String(e.database)),null!=e.databaseUid&&(r.databaseUid=String(e.databaseUid)),null!=e.snapshotTime){if(!p.isObject(e.snapshotTime))throw TypeError(".google.firestore.admin.v1.Backup.snapshotTime: object expected");r.snapshotTime=f.google.protobuf.Timestamp.fromObject(e.snapshotTime,t+1)}if(null!=e.expireTime){if(!p.isObject(e.expireTime))throw TypeError(".google.firestore.admin.v1.Backup.expireTime: object expected");r.expireTime=f.google.protobuf.Timestamp.fromObject(e.expireTime,t+1)}if(null!=e.stats){if(!p.isObject(e.stats))throw TypeError(".google.firestore.admin.v1.Backup.stats: object expected");r.stats=f.google.firestore.admin.v1.Backup.Stats.fromObject(e.stats,t+1)}switch(e.state){default:"number"==typeof e.state&&(r.state=e.state);break;case"STATE_UNSPECIFIED":case 0:r.state=0;break;case"CREATING":case 1:r.state=1;break;case"READY":case 2:r.state=2;break;case"NOT_AVAILABLE":case 3:r.state=3}return r},s.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.name="",o.database="",o.snapshotTime=null,o.expireTime=null,o.stats=null,o.databaseUid="",o.state=t.enums===String?"STATE_UNSPECIFIED":0),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(o.database=e.database),null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")&&(o.snapshotTime=f.google.protobuf.Timestamp.toObject(e.snapshotTime,t,r+1)),null!=e.expireTime&&Object.hasOwnProperty.call(e,"expireTime")&&(o.expireTime=f.google.protobuf.Timestamp.toObject(e.expireTime,t,r+1)),null!=e.stats&&Object.hasOwnProperty.call(e,"stats")&&(o.stats=f.google.firestore.admin.v1.Backup.Stats.toObject(e.stats,t,r+1)),null!=e.databaseUid&&Object.hasOwnProperty.call(e,"databaseUid")&&(o.databaseUid=e.databaseUid),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&(o.state=t.enums!==String||void 0===f.google.firestore.admin.v1.Backup.State[e.state]?e.state:f.google.firestore.admin.v1.Backup.State[e.state]),o},s.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},s.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Backup"},s.Stats=(F.prototype.sizeBytes=p.Long?p.Long.fromBits(0,0,!1):0,F.prototype.documentCount=p.Long?p.Long.fromBits(0,0,!1):0,F.prototype.indexCount=p.Long?p.Long.fromBits(0,0,!1):0,F.create=function(e){return new F(e)},F.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.sizeBytes&&Object.hasOwnProperty.call(e,"sizeBytes")&&t.uint32(8).int64(e.sizeBytes),null!=e.documentCount&&Object.hasOwnProperty.call(e,"documentCount")&&t.uint32(16).int64(e.documentCount),null!=e.indexCount&&Object.hasOwnProperty.call(e,"indexCount")&&t.uint32(24).int64(e.indexCount),t},F.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},F.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Backup.Stats;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.sizeBytes=e.int64();break;case 2:i.documentCount=e.int64();break;case 3:i.indexCount=e.int64();break;default:e.skipType(7&a,o)}}return i},F.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},F.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.sizeBytes&&Object.hasOwnProperty.call(e,"sizeBytes")&&!(p.isInteger(e.sizeBytes)||e.sizeBytes&&p.isInteger(e.sizeBytes.low)&&p.isInteger(e.sizeBytes.high))?"sizeBytes: integer|Long expected":null!=e.documentCount&&Object.hasOwnProperty.call(e,"documentCount")&&!(p.isInteger(e.documentCount)||e.documentCount&&p.isInteger(e.documentCount.low)&&p.isInteger(e.documentCount.high))?"documentCount: integer|Long expected":null!=e.indexCount&&Object.hasOwnProperty.call(e,"indexCount")&&!(p.isInteger(e.indexCount)||e.indexCount&&p.isInteger(e.indexCount.low)&&p.isInteger(e.indexCount.high))?"indexCount: integer|Long expected":null},F.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Backup.Stats)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Backup.Stats: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.Backup.Stats;return null!=e.sizeBytes&&(p.Long?t.sizeBytes=p.Long.fromValue(e.sizeBytes,!1):"string"==typeof e.sizeBytes?t.sizeBytes=parseInt(e.sizeBytes,10):"number"==typeof e.sizeBytes?t.sizeBytes=e.sizeBytes:"object"==typeof e.sizeBytes&&(t.sizeBytes=new p.LongBits(e.sizeBytes.low>>>0,e.sizeBytes.high>>>0).toNumber())),null!=e.documentCount&&(p.Long?t.documentCount=p.Long.fromValue(e.documentCount,!1):"string"==typeof e.documentCount?t.documentCount=parseInt(e.documentCount,10):"number"==typeof e.documentCount?t.documentCount=e.documentCount:"object"==typeof e.documentCount&&(t.documentCount=new p.LongBits(e.documentCount.low>>>0,e.documentCount.high>>>0).toNumber())),null!=e.indexCount&&(p.Long?t.indexCount=p.Long.fromValue(e.indexCount,!1):"string"==typeof e.indexCount?t.indexCount=parseInt(e.indexCount,10):"number"==typeof e.indexCount?t.indexCount=e.indexCount:"object"==typeof e.indexCount&&(t.indexCount=new p.LongBits(e.indexCount.low>>>0,e.indexCount.high>>>0).toNumber())),t},F.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,r={};return t.defaults&&(p.Long?(o=new p.Long(0,0,!1),r.sizeBytes=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):r.sizeBytes=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0,p.Long?(o=new p.Long(0,0,!1),r.documentCount=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):r.documentCount=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0,p.Long?(o=new p.Long(0,0,!1),r.indexCount=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):r.indexCount=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0),null!=e.sizeBytes&&Object.hasOwnProperty.call(e,"sizeBytes")&&("undefined"!=typeof BigInt&&t.longs===BigInt?r.sizeBytes="number"==typeof e.sizeBytes?BigInt(e.sizeBytes):p.Long.fromBits(e.sizeBytes.low>>>0,e.sizeBytes.high>>>0,!1).toBigInt():"number"==typeof e.sizeBytes?r.sizeBytes=t.longs===String?String(e.sizeBytes):e.sizeBytes:r.sizeBytes=t.longs===String?p.Long.prototype.toString.call(e.sizeBytes):t.longs===Number?new p.LongBits(e.sizeBytes.low>>>0,e.sizeBytes.high>>>0).toNumber():e.sizeBytes),null!=e.documentCount&&Object.hasOwnProperty.call(e,"documentCount")&&("undefined"!=typeof BigInt&&t.longs===BigInt?r.documentCount="number"==typeof e.documentCount?BigInt(e.documentCount):p.Long.fromBits(e.documentCount.low>>>0,e.documentCount.high>>>0,!1).toBigInt():"number"==typeof e.documentCount?r.documentCount=t.longs===String?String(e.documentCount):e.documentCount:r.documentCount=t.longs===String?p.Long.prototype.toString.call(e.documentCount):t.longs===Number?new p.LongBits(e.documentCount.low>>>0,e.documentCount.high>>>0).toNumber():e.documentCount),null!=e.indexCount&&Object.hasOwnProperty.call(e,"indexCount")&&("undefined"!=typeof BigInt&&t.longs===BigInt?r.indexCount="number"==typeof e.indexCount?BigInt(e.indexCount):p.Long.fromBits(e.indexCount.low>>>0,e.indexCount.high>>>0,!1).toBigInt():"number"==typeof e.indexCount?r.indexCount=t.longs===String?String(e.indexCount):e.indexCount:r.indexCount=t.longs===String?p.Long.prototype.toString.call(e.indexCount):t.longs===Number?new p.LongBits(e.indexCount.low>>>0,e.indexCount.high>>>0).toNumber():e.indexCount),r},F.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},F.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Backup.Stats"},F),s.State=(i={},(e=Object.create(i))[i[0]="STATE_UNSPECIFIED"]=0,e[i[1]="CREATING"]=1,e[i[2]="READY"]=2,e[i[3]="NOT_AVAILABLE"]=3,e),s),t.Database=(l.prototype.name="",l.prototype.uid="",l.prototype.createTime=null,l.prototype.updateTime=null,l.prototype.deleteTime=null,l.prototype.locationId="",l.prototype.type=0,l.prototype.concurrencyMode=0,l.prototype.versionRetentionPeriod=null,l.prototype.earliestVersionTime=null,l.prototype.pointInTimeRecoveryEnablement=0,l.prototype.appEngineIntegrationMode=0,l.prototype.keyPrefix="",l.prototype.deleteProtectionState=0,l.prototype.cmekConfig=null,l.prototype.previousId="",l.prototype.sourceInfo=null,l.prototype.tags=p.emptyObject,l.prototype.freeTier=null,l.prototype.etag="",l.prototype.databaseEdition=0,l.prototype.realtimeUpdatesMode=0,l.prototype.firestoreDataAccessMode=0,l.prototype.mongodbCompatibleDataAccessMode=0,Object.defineProperty(l.prototype,"_freeTier",{get:p.oneOfGetter(i=["freeTier"]),set:p.oneOfSetter(i)}),l.create=function(e){return new l(e)},l.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.uid&&Object.hasOwnProperty.call(e,"uid")&&t.uint32(26).string(e.uid),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&f.google.protobuf.Timestamp.encode(e.createTime,t.uint32(42).fork(),r+1).ldelim(),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&f.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(50).fork(),r+1).ldelim(),null!=e.deleteTime&&Object.hasOwnProperty.call(e,"deleteTime")&&f.google.protobuf.Timestamp.encode(e.deleteTime,t.uint32(58).fork(),r+1).ldelim(),null!=e.locationId&&Object.hasOwnProperty.call(e,"locationId")&&t.uint32(74).string(e.locationId),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(80).int32(e.type),null!=e.concurrencyMode&&Object.hasOwnProperty.call(e,"concurrencyMode")&&t.uint32(120).int32(e.concurrencyMode),null!=e.versionRetentionPeriod&&Object.hasOwnProperty.call(e,"versionRetentionPeriod")&&f.google.protobuf.Duration.encode(e.versionRetentionPeriod,t.uint32(138).fork(),r+1).ldelim(),null!=e.earliestVersionTime&&Object.hasOwnProperty.call(e,"earliestVersionTime")&&f.google.protobuf.Timestamp.encode(e.earliestVersionTime,t.uint32(146).fork(),r+1).ldelim(),null!=e.appEngineIntegrationMode&&Object.hasOwnProperty.call(e,"appEngineIntegrationMode")&&t.uint32(152).int32(e.appEngineIntegrationMode),null!=e.keyPrefix&&Object.hasOwnProperty.call(e,"keyPrefix")&&t.uint32(162).string(e.keyPrefix),null!=e.pointInTimeRecoveryEnablement&&Object.hasOwnProperty.call(e,"pointInTimeRecoveryEnablement")&&t.uint32(168).int32(e.pointInTimeRecoveryEnablement),null!=e.deleteProtectionState&&Object.hasOwnProperty.call(e,"deleteProtectionState")&&t.uint32(176).int32(e.deleteProtectionState),null!=e.cmekConfig&&Object.hasOwnProperty.call(e,"cmekConfig")&&f.google.firestore.admin.v1.Database.CmekConfig.encode(e.cmekConfig,t.uint32(186).fork(),r+1).ldelim(),null!=e.previousId&&Object.hasOwnProperty.call(e,"previousId")&&t.uint32(202).string(e.previousId),null!=e.sourceInfo&&Object.hasOwnProperty.call(e,"sourceInfo")&&f.google.firestore.admin.v1.Database.SourceInfo.encode(e.sourceInfo,t.uint32(210).fork(),r+1).ldelim(),null!=e.databaseEdition&&Object.hasOwnProperty.call(e,"databaseEdition")&&t.uint32(224).int32(e.databaseEdition),null!=e.tags&&Object.hasOwnProperty.call(e,"tags"))for(var o=Object.keys(e.tags),n=0;n<o.length;++n)t.uint32(234).fork().uint32(10).string(o[n]).uint32(18).string(e.tags[o[n]]).ldelim();return null!=e.freeTier&&Object.hasOwnProperty.call(e,"freeTier")&&t.uint32(240).bool(e.freeTier),null!=e.realtimeUpdatesMode&&Object.hasOwnProperty.call(e,"realtimeUpdatesMode")&&t.uint32(248).int32(e.realtimeUpdatesMode),null!=e.firestoreDataAccessMode&&Object.hasOwnProperty.call(e,"firestoreDataAccessMode")&&t.uint32(264).int32(e.firestoreDataAccessMode),null!=e.mongodbCompatibleDataAccessMode&&Object.hasOwnProperty.call(e,"mongodbCompatibleDataAccessMode")&&t.uint32(272).int32(e.mongodbCompatibleDataAccessMode),null!=e.etag&&Object.hasOwnProperty.call(e,"etag")&&t.uint32(794).string(e.etag),t},l.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},l.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Database;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 3:i.uid=e.string();break;case 5:i.createTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 6:i.updateTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 7:i.deleteTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 9:i.locationId=e.string();break;case 10:i.type=e.int32();break;case 15:i.concurrencyMode=e.int32();break;case 17:i.versionRetentionPeriod=f.google.protobuf.Duration.decode(e,e.uint32(),void 0,o+1);break;case 18:i.earliestVersionTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 21:i.pointInTimeRecoveryEnablement=e.int32();break;case 19:i.appEngineIntegrationMode=e.int32();break;case 20:i.keyPrefix=e.string();break;case 22:i.deleteProtectionState=e.int32();break;case 23:i.cmekConfig=f.google.firestore.admin.v1.Database.CmekConfig.decode(e,e.uint32(),void 0,o+1);break;case 25:i.previousId=e.string();break;case 26:i.sourceInfo=f.google.firestore.admin.v1.Database.SourceInfo.decode(e,e.uint32(),void 0,o+1);break;case 29:i.tags===p.emptyObject&&(i.tags={});for(var s=e.uint32()+e.pos,l="",c="";e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=e.string();break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.tags,l),i.tags[l]=c;break;case 30:i.freeTier=e.bool();break;case 99:i.etag=e.string();break;case 28:i.databaseEdition=e.int32();break;case 31:i.realtimeUpdatesMode=e.int32();break;case 33:i.firestoreDataAccessMode=e.int32();break;case 34:i.mongodbCompatibleDataAccessMode=e.int32();break;default:e.skipType(7&a,o)}}return i},l.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},l.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.uid&&Object.hasOwnProperty.call(e,"uid")&&!p.isString(e.uid))return"uid: string expected";if(null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&(r=f.google.protobuf.Timestamp.verify(e.createTime,t+1)))return"createTime."+r;if(null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(r=f.google.protobuf.Timestamp.verify(e.updateTime,t+1)))return"updateTime."+r;if(null!=e.deleteTime&&Object.hasOwnProperty.call(e,"deleteTime")&&(r=f.google.protobuf.Timestamp.verify(e.deleteTime,t+1)))return"deleteTime."+r;if(null!=e.locationId&&Object.hasOwnProperty.call(e,"locationId")&&!p.isString(e.locationId))return"locationId: string expected";if(null!=e.type&&Object.hasOwnProperty.call(e,"type"))switch(e.type){default:return"type: enum value expected";case 0:case 1:case 2:}if(null!=e.concurrencyMode&&Object.hasOwnProperty.call(e,"concurrencyMode"))switch(e.concurrencyMode){default:return"concurrencyMode: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.versionRetentionPeriod&&Object.hasOwnProperty.call(e,"versionRetentionPeriod")&&(r=f.google.protobuf.Duration.verify(e.versionRetentionPeriod,t+1)))return"versionRetentionPeriod."+r;if(null!=e.earliestVersionTime&&Object.hasOwnProperty.call(e,"earliestVersionTime")&&(r=f.google.protobuf.Timestamp.verify(e.earliestVersionTime,t+1)))return"earliestVersionTime."+r;if(null!=e.pointInTimeRecoveryEnablement&&Object.hasOwnProperty.call(e,"pointInTimeRecoveryEnablement"))switch(e.pointInTimeRecoveryEnablement){default:return"pointInTimeRecoveryEnablement: enum value expected";case 0:case 1:case 2:}if(null!=e.appEngineIntegrationMode&&Object.hasOwnProperty.call(e,"appEngineIntegrationMode"))switch(e.appEngineIntegrationMode){default:return"appEngineIntegrationMode: enum value expected";case 0:case 1:case 2:}if(null!=e.keyPrefix&&Object.hasOwnProperty.call(e,"keyPrefix")&&!p.isString(e.keyPrefix))return"keyPrefix: string expected";if(null!=e.deleteProtectionState&&Object.hasOwnProperty.call(e,"deleteProtectionState"))switch(e.deleteProtectionState){default:return"deleteProtectionState: enum value expected";case 0:case 1:case 2:}if(null!=e.cmekConfig&&Object.hasOwnProperty.call(e,"cmekConfig")&&(r=f.google.firestore.admin.v1.Database.CmekConfig.verify(e.cmekConfig,t+1)))return"cmekConfig."+r;if(null!=e.previousId&&Object.hasOwnProperty.call(e,"previousId")&&!p.isString(e.previousId))return"previousId: string expected";if(null!=e.sourceInfo&&Object.hasOwnProperty.call(e,"sourceInfo")&&(r=f.google.firestore.admin.v1.Database.SourceInfo.verify(e.sourceInfo,t+1)))return"sourceInfo."+r;if(null!=e.tags&&Object.hasOwnProperty.call(e,"tags")){if(!p.isObject(e.tags))return"tags: object expected";for(var o=Object.keys(e.tags),n=0;n<o.length;++n)if(!p.isString(e.tags[o[n]]))return"tags: string{k:string} expected"}if(null!=e.freeTier&&Object.hasOwnProperty.call(e,"freeTier")&&"boolean"!=typeof e.freeTier)return"freeTier: boolean expected";if(null!=e.etag&&Object.hasOwnProperty.call(e,"etag")&&!p.isString(e.etag))return"etag: string expected";if(null!=e.databaseEdition&&Object.hasOwnProperty.call(e,"databaseEdition"))switch(e.databaseEdition){default:return"databaseEdition: enum value expected";case 0:case 1:case 2:}if(null!=e.realtimeUpdatesMode&&Object.hasOwnProperty.call(e,"realtimeUpdatesMode"))switch(e.realtimeUpdatesMode){default:return"realtimeUpdatesMode: enum value expected";case 0:case 1:case 2:}if(null!=e.firestoreDataAccessMode&&Object.hasOwnProperty.call(e,"firestoreDataAccessMode"))switch(e.firestoreDataAccessMode){default:return"firestoreDataAccessMode: enum value expected";case 0:case 1:case 2:}if(null!=e.mongodbCompatibleDataAccessMode&&Object.hasOwnProperty.call(e,"mongodbCompatibleDataAccessMode"))switch(e.mongodbCompatibleDataAccessMode){default:return"mongodbCompatibleDataAccessMode: enum value expected";case 0:case 1:case 2:}return null},l.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Database)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Database: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.Database;if(null!=e.name&&(r.name=String(e.name)),null!=e.uid&&(r.uid=String(e.uid)),null!=e.createTime){if(!p.isObject(e.createTime))throw TypeError(".google.firestore.admin.v1.Database.createTime: object expected");r.createTime=f.google.protobuf.Timestamp.fromObject(e.createTime,t+1)}if(null!=e.updateTime){if(!p.isObject(e.updateTime))throw TypeError(".google.firestore.admin.v1.Database.updateTime: object expected");r.updateTime=f.google.protobuf.Timestamp.fromObject(e.updateTime,t+1)}if(null!=e.deleteTime){if(!p.isObject(e.deleteTime))throw TypeError(".google.firestore.admin.v1.Database.deleteTime: object expected");r.deleteTime=f.google.protobuf.Timestamp.fromObject(e.deleteTime,t+1)}switch(null!=e.locationId&&(r.locationId=String(e.locationId)),e.type){default:"number"==typeof e.type&&(r.type=e.type);break;case"DATABASE_TYPE_UNSPECIFIED":case 0:r.type=0;break;case"FIRESTORE_NATIVE":case 1:r.type=1;break;case"DATASTORE_MODE":case 2:r.type=2}switch(e.concurrencyMode){default:"number"==typeof e.concurrencyMode&&(r.concurrencyMode=e.concurrencyMode);break;case"CONCURRENCY_MODE_UNSPECIFIED":case 0:r.concurrencyMode=0;break;case"OPTIMISTIC":case 1:r.concurrencyMode=1;break;case"PESSIMISTIC":case 2:r.concurrencyMode=2;break;case"OPTIMISTIC_WITH_ENTITY_GROUPS":case 3:r.concurrencyMode=3}if(null!=e.versionRetentionPeriod){if(!p.isObject(e.versionRetentionPeriod))throw TypeError(".google.firestore.admin.v1.Database.versionRetentionPeriod: object expected");r.versionRetentionPeriod=f.google.protobuf.Duration.fromObject(e.versionRetentionPeriod,t+1)}if(null!=e.earliestVersionTime){if(!p.isObject(e.earliestVersionTime))throw TypeError(".google.firestore.admin.v1.Database.earliestVersionTime: object expected");r.earliestVersionTime=f.google.protobuf.Timestamp.fromObject(e.earliestVersionTime,t+1)}switch(e.pointInTimeRecoveryEnablement){default:"number"==typeof e.pointInTimeRecoveryEnablement&&(r.pointInTimeRecoveryEnablement=e.pointInTimeRecoveryEnablement);break;case"POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED":case 0:r.pointInTimeRecoveryEnablement=0;break;case"POINT_IN_TIME_RECOVERY_ENABLED":case 1:r.pointInTimeRecoveryEnablement=1;break;case"POINT_IN_TIME_RECOVERY_DISABLED":case 2:r.pointInTimeRecoveryEnablement=2}switch(e.appEngineIntegrationMode){default:"number"==typeof e.appEngineIntegrationMode&&(r.appEngineIntegrationMode=e.appEngineIntegrationMode);break;case"APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED":case 0:r.appEngineIntegrationMode=0;break;case"ENABLED":case 1:r.appEngineIntegrationMode=1;break;case"DISABLED":case 2:r.appEngineIntegrationMode=2}switch(null!=e.keyPrefix&&(r.keyPrefix=String(e.keyPrefix)),e.deleteProtectionState){default:"number"==typeof e.deleteProtectionState&&(r.deleteProtectionState=e.deleteProtectionState);break;case"DELETE_PROTECTION_STATE_UNSPECIFIED":case 0:r.deleteProtectionState=0;break;case"DELETE_PROTECTION_DISABLED":case 1:r.deleteProtectionState=1;break;case"DELETE_PROTECTION_ENABLED":case 2:r.deleteProtectionState=2}if(null!=e.cmekConfig){if(!p.isObject(e.cmekConfig))throw TypeError(".google.firestore.admin.v1.Database.cmekConfig: object expected");r.cmekConfig=f.google.firestore.admin.v1.Database.CmekConfig.fromObject(e.cmekConfig,t+1)}if(null!=e.previousId&&(r.previousId=String(e.previousId)),null!=e.sourceInfo){if(!p.isObject(e.sourceInfo))throw TypeError(".google.firestore.admin.v1.Database.sourceInfo: object expected");r.sourceInfo=f.google.firestore.admin.v1.Database.SourceInfo.fromObject(e.sourceInfo,t+1)}if(e.tags){if(!p.isObject(e.tags))throw TypeError(".google.firestore.admin.v1.Database.tags: object expected");r.tags={};for(var o=Object.keys(e.tags),n=0;n<o.length;++n)"__proto__"===o[n]&&p.makeProp(r.tags,o[n]),r.tags[o[n]]=String(e.tags[o[n]])}switch(null!=e.freeTier&&(r.freeTier=Boolean(e.freeTier)),null!=e.etag&&(r.etag=String(e.etag)),e.databaseEdition){default:"number"==typeof e.databaseEdition&&(r.databaseEdition=e.databaseEdition);break;case"DATABASE_EDITION_UNSPECIFIED":case 0:r.databaseEdition=0;break;case"STANDARD":case 1:r.databaseEdition=1;break;case"ENTERPRISE":case 2:r.databaseEdition=2}switch(e.realtimeUpdatesMode){default:"number"==typeof e.realtimeUpdatesMode&&(r.realtimeUpdatesMode=e.realtimeUpdatesMode);break;case"REALTIME_UPDATES_MODE_UNSPECIFIED":case 0:r.realtimeUpdatesMode=0;break;case"REALTIME_UPDATES_MODE_ENABLED":case 1:r.realtimeUpdatesMode=1;break;case"REALTIME_UPDATES_MODE_DISABLED":case 2:r.realtimeUpdatesMode=2}switch(e.firestoreDataAccessMode){default:"number"==typeof e.firestoreDataAccessMode&&(r.firestoreDataAccessMode=e.firestoreDataAccessMode);break;case"DATA_ACCESS_MODE_UNSPECIFIED":case 0:r.firestoreDataAccessMode=0;break;case"DATA_ACCESS_MODE_ENABLED":case 1:r.firestoreDataAccessMode=1;break;case"DATA_ACCESS_MODE_DISABLED":case 2:r.firestoreDataAccessMode=2}switch(e.mongodbCompatibleDataAccessMode){default:"number"==typeof e.mongodbCompatibleDataAccessMode&&(r.mongodbCompatibleDataAccessMode=e.mongodbCompatibleDataAccessMode);break;case"DATA_ACCESS_MODE_UNSPECIFIED":case 0:r.mongodbCompatibleDataAccessMode=0;break;case"DATA_ACCESS_MODE_ENABLED":case 1:r.mongodbCompatibleDataAccessMode=1;break;case"DATA_ACCESS_MODE_DISABLED":case 2:r.mongodbCompatibleDataAccessMode=2}return r},l.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.objects||t.defaults)&&(n.tags={}),t.defaults&&(n.name="",n.uid="",n.createTime=null,n.updateTime=null,n.deleteTime=null,n.locationId="",n.type=t.enums===String?"DATABASE_TYPE_UNSPECIFIED":0,n.concurrencyMode=t.enums===String?"CONCURRENCY_MODE_UNSPECIFIED":0,n.versionRetentionPeriod=null,n.earliestVersionTime=null,n.appEngineIntegrationMode=t.enums===String?"APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED":0,n.keyPrefix="",n.pointInTimeRecoveryEnablement=t.enums===String?"POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED":0,n.deleteProtectionState=t.enums===String?"DELETE_PROTECTION_STATE_UNSPECIFIED":0,n.cmekConfig=null,n.previousId="",n.sourceInfo=null,n.databaseEdition=t.enums===String?"DATABASE_EDITION_UNSPECIFIED":0,n.realtimeUpdatesMode=t.enums===String?"REALTIME_UPDATES_MODE_UNSPECIFIED":0,n.firestoreDataAccessMode=t.enums===String?"DATA_ACCESS_MODE_UNSPECIFIED":0,n.mongodbCompatibleDataAccessMode=t.enums===String?"DATA_ACCESS_MODE_UNSPECIFIED":0,n.etag=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(n.name=e.name),null!=e.uid&&Object.hasOwnProperty.call(e,"uid")&&(n.uid=e.uid),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&(n.createTime=f.google.protobuf.Timestamp.toObject(e.createTime,t,r+1)),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(n.updateTime=f.google.protobuf.Timestamp.toObject(e.updateTime,t,r+1)),null!=e.deleteTime&&Object.hasOwnProperty.call(e,"deleteTime")&&(n.deleteTime=f.google.protobuf.Timestamp.toObject(e.deleteTime,t,r+1)),null!=e.locationId&&Object.hasOwnProperty.call(e,"locationId")&&(n.locationId=e.locationId),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&(n.type=t.enums!==String||void 0===f.google.firestore.admin.v1.Database.DatabaseType[e.type]?e.type:f.google.firestore.admin.v1.Database.DatabaseType[e.type]),null!=e.concurrencyMode&&Object.hasOwnProperty.call(e,"concurrencyMode")&&(n.concurrencyMode=t.enums!==String||void 0===f.google.firestore.admin.v1.Database.ConcurrencyMode[e.concurrencyMode]?e.concurrencyMode:f.google.firestore.admin.v1.Database.ConcurrencyMode[e.concurrencyMode]),null!=e.versionRetentionPeriod&&Object.hasOwnProperty.call(e,"versionRetentionPeriod")&&(n.versionRetentionPeriod=f.google.protobuf.Duration.toObject(e.versionRetentionPeriod,t,r+1)),null!=e.earliestVersionTime&&Object.hasOwnProperty.call(e,"earliestVersionTime")&&(n.earliestVersionTime=f.google.protobuf.Timestamp.toObject(e.earliestVersionTime,t,r+1)),null!=e.appEngineIntegrationMode&&Object.hasOwnProperty.call(e,"appEngineIntegrationMode")&&(n.appEngineIntegrationMode=t.enums!==String||void 0===f.google.firestore.admin.v1.Database.AppEngineIntegrationMode[e.appEngineIntegrationMode]?e.appEngineIntegrationMode:f.google.firestore.admin.v1.Database.AppEngineIntegrationMode[e.appEngineIntegrationMode]),null!=e.keyPrefix&&Object.hasOwnProperty.call(e,"keyPrefix")&&(n.keyPrefix=e.keyPrefix),null!=e.pointInTimeRecoveryEnablement&&Object.hasOwnProperty.call(e,"pointInTimeRecoveryEnablement")&&(n.pointInTimeRecoveryEnablement=t.enums!==String||void 0===f.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement[e.pointInTimeRecoveryEnablement]?e.pointInTimeRecoveryEnablement:f.google.firestore.admin.v1.Database.PointInTimeRecoveryEnablement[e.pointInTimeRecoveryEnablement]),null!=e.deleteProtectionState&&Object.hasOwnProperty.call(e,"deleteProtectionState")&&(n.deleteProtectionState=t.enums!==String||void 0===f.google.firestore.admin.v1.Database.DeleteProtectionState[e.deleteProtectionState]?e.deleteProtectionState:f.google.firestore.admin.v1.Database.DeleteProtectionState[e.deleteProtectionState]),null!=e.cmekConfig&&Object.hasOwnProperty.call(e,"cmekConfig")&&(n.cmekConfig=f.google.firestore.admin.v1.Database.CmekConfig.toObject(e.cmekConfig,t,r+1)),null!=e.previousId&&Object.hasOwnProperty.call(e,"previousId")&&(n.previousId=e.previousId),null!=e.sourceInfo&&Object.hasOwnProperty.call(e,"sourceInfo")&&(n.sourceInfo=f.google.firestore.admin.v1.Database.SourceInfo.toObject(e.sourceInfo,t,r+1)),null!=e.databaseEdition&&Object.hasOwnProperty.call(e,"databaseEdition")&&(n.databaseEdition=t.enums!==String||void 0===f.google.firestore.admin.v1.Database.DatabaseEdition[e.databaseEdition]?e.databaseEdition:f.google.firestore.admin.v1.Database.DatabaseEdition[e.databaseEdition]),e.tags&&(o=Object.keys(e.tags)).length){n.tags={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.tags,o[i]),n.tags[o[i]]=e.tags[o[i]]}return null!=e.freeTier&&Object.hasOwnProperty.call(e,"freeTier")&&(n.freeTier=e.freeTier,t.oneofs)&&(n._freeTier="freeTier"),null!=e.realtimeUpdatesMode&&Object.hasOwnProperty.call(e,"realtimeUpdatesMode")&&(n.realtimeUpdatesMode=t.enums!==String||void 0===f.google.firestore.admin.v1.RealtimeUpdatesMode[e.realtimeUpdatesMode]?e.realtimeUpdatesMode:f.google.firestore.admin.v1.RealtimeUpdatesMode[e.realtimeUpdatesMode]),null!=e.firestoreDataAccessMode&&Object.hasOwnProperty.call(e,"firestoreDataAccessMode")&&(n.firestoreDataAccessMode=t.enums!==String||void 0===f.google.firestore.admin.v1.Database.DataAccessMode[e.firestoreDataAccessMode]?e.firestoreDataAccessMode:f.google.firestore.admin.v1.Database.DataAccessMode[e.firestoreDataAccessMode]),null!=e.mongodbCompatibleDataAccessMode&&Object.hasOwnProperty.call(e,"mongodbCompatibleDataAccessMode")&&(n.mongodbCompatibleDataAccessMode=t.enums!==String||void 0===f.google.firestore.admin.v1.Database.DataAccessMode[e.mongodbCompatibleDataAccessMode]?e.mongodbCompatibleDataAccessMode:f.google.firestore.admin.v1.Database.DataAccessMode[e.mongodbCompatibleDataAccessMode]),null!=e.etag&&Object.hasOwnProperty.call(e,"etag")&&(n.etag=e.etag),n},l.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},l.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Database"},l.DatabaseType=(i={},(e=Object.create(i))[i[0]="DATABASE_TYPE_UNSPECIFIED"]=0,e[i[1]="FIRESTORE_NATIVE"]=1,e[i[2]="DATASTORE_MODE"]=2,e),l.ConcurrencyMode=(i={},(e=Object.create(i))[i[0]="CONCURRENCY_MODE_UNSPECIFIED"]=0,e[i[1]="OPTIMISTIC"]=1,e[i[2]="PESSIMISTIC"]=2,e[i[3]="OPTIMISTIC_WITH_ENTITY_GROUPS"]=3,e),l.PointInTimeRecoveryEnablement=(i={},(e=Object.create(i))[i[0]="POINT_IN_TIME_RECOVERY_ENABLEMENT_UNSPECIFIED"]=0,e[i[1]="POINT_IN_TIME_RECOVERY_ENABLED"]=1,e[i[2]="POINT_IN_TIME_RECOVERY_DISABLED"]=2,e),l.AppEngineIntegrationMode=(i={},(e=Object.create(i))[i[0]="APP_ENGINE_INTEGRATION_MODE_UNSPECIFIED"]=0,e[i[1]="ENABLED"]=1,e[i[2]="DISABLED"]=2,e),l.DeleteProtectionState=(i={},(e=Object.create(i))[i[0]="DELETE_PROTECTION_STATE_UNSPECIFIED"]=0,e[i[1]="DELETE_PROTECTION_DISABLED"]=1,e[i[2]="DELETE_PROTECTION_ENABLED"]=2,e),l.CmekConfig=(V.prototype.kmsKeyName="",V.prototype.activeKeyVersion=p.emptyArray,V.create=function(e){return new V(e)},V.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.kmsKeyName&&Object.hasOwnProperty.call(e,"kmsKeyName")&&t.uint32(10).string(e.kmsKeyName),null!=e.activeKeyVersion&&e.activeKeyVersion.length)for(var o=0;o<e.activeKeyVersion.length;++o)t.uint32(18).string(e.activeKeyVersion[o]);return t},V.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},V.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Database.CmekConfig;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.kmsKeyName=e.string();break;case 2:i.activeKeyVersion&&i.activeKeyVersion.length||(i.activeKeyVersion=[]),i.activeKeyVersion.push(e.string());break;default:e.skipType(7&a,o)}}return i},V.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},V.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.kmsKeyName&&Object.hasOwnProperty.call(e,"kmsKeyName")&&!p.isString(e.kmsKeyName))return"kmsKeyName: string expected";if(null!=e.activeKeyVersion&&Object.hasOwnProperty.call(e,"activeKeyVersion")){if(!Array.isArray(e.activeKeyVersion))return"activeKeyVersion: array expected";for(var r=0;r<e.activeKeyVersion.length;++r)if(!p.isString(e.activeKeyVersion[r]))return"activeKeyVersion: string[] expected"}return null},V.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Database.CmekConfig)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Database.CmekConfig: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.Database.CmekConfig;if(null!=e.kmsKeyName&&(r.kmsKeyName=String(e.kmsKeyName)),e.activeKeyVersion){if(!Array.isArray(e.activeKeyVersion))throw TypeError(".google.firestore.admin.v1.Database.CmekConfig.activeKeyVersion: array expected");r.activeKeyVersion=[];for(var o=0;o<e.activeKeyVersion.length;++o)r.activeKeyVersion[o]=String(e.activeKeyVersion[o])}return r},V.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.activeKeyVersion=[]),t.defaults&&(o.kmsKeyName=""),null!=e.kmsKeyName&&Object.hasOwnProperty.call(e,"kmsKeyName")&&(o.kmsKeyName=e.kmsKeyName),e.activeKeyVersion&&e.activeKeyVersion.length){o.activeKeyVersion=[];for(var n=0;n<e.activeKeyVersion.length;++n)o.activeKeyVersion[n]=e.activeKeyVersion[n]}return o},V.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},V.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Database.CmekConfig"},V),l.SourceInfo=(U.prototype.backup=null,U.prototype.operation="",Object.defineProperty(U.prototype,"source",{get:p.oneOfGetter(i=["backup"]),set:p.oneOfSetter(i)}),U.create=function(e){return new U(e)},U.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.backup&&Object.hasOwnProperty.call(e,"backup")&&f.google.firestore.admin.v1.Database.SourceInfo.BackupSource.encode(e.backup,t.uint32(10).fork(),r+1).ldelim(),null!=e.operation&&Object.hasOwnProperty.call(e,"operation")&&t.uint32(26).string(e.operation),t},U.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},U.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Database.SourceInfo;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.backup=f.google.firestore.admin.v1.Database.SourceInfo.BackupSource.decode(e,e.uint32(),void 0,o+1);break;case 3:i.operation=e.string();break;default:e.skipType(7&a,o)}}return i},U.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},U.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.backup&&Object.hasOwnProperty.call(e,"backup")){t=f.google.firestore.admin.v1.Database.SourceInfo.BackupSource.verify(e.backup,t+1);if(t)return"backup."+t}return null!=e.operation&&Object.hasOwnProperty.call(e,"operation")&&!p.isString(e.operation)?"operation: string expected":null},U.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Database.SourceInfo)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Database.SourceInfo: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.Database.SourceInfo;if(null!=e.backup){if(!p.isObject(e.backup))throw TypeError(".google.firestore.admin.v1.Database.SourceInfo.backup: object expected");r.backup=f.google.firestore.admin.v1.Database.SourceInfo.BackupSource.fromObject(e.backup,t+1)}return null!=e.operation&&(r.operation=String(e.operation)),r},U.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.operation=""),null!=e.backup&&Object.hasOwnProperty.call(e,"backup")&&(o.backup=f.google.firestore.admin.v1.Database.SourceInfo.BackupSource.toObject(e.backup,t,r+1),t.oneofs)&&(o.source="backup"),null!=e.operation&&Object.hasOwnProperty.call(e,"operation")&&(o.operation=e.operation),o},U.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},U.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Database.SourceInfo"},U.BackupSource=(B.prototype.backup="",B.create=function(e){return new B(e)},B.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.backup&&Object.hasOwnProperty.call(e,"backup")&&t.uint32(10).string(e.backup),t},B.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},B.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Database.SourceInfo.BackupSource;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.backup=e.string():e.skipType(7&a,o)}return i},B.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},B.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.backup&&Object.hasOwnProperty.call(e,"backup")&&!p.isString(e.backup)?"backup: string expected":null},B.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Database.SourceInfo.BackupSource)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Database.SourceInfo.BackupSource: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.Database.SourceInfo.BackupSource;return null!=e.backup&&(t.backup=String(e.backup)),t},B.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.backup=""),null!=e.backup&&Object.hasOwnProperty.call(e,"backup")&&(r.backup=e.backup),r},B.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},B.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Database.SourceInfo.BackupSource"},B),U),l.EncryptionConfig=(M.prototype.googleDefaultEncryption=null,M.prototype.useSourceEncryption=null,M.prototype.customerManagedEncryption=null,Object.defineProperty(M.prototype,"encryptionType",{get:p.oneOfGetter(e=["googleDefaultEncryption","useSourceEncryption","customerManagedEncryption"]),set:p.oneOfSetter(e)}),M.create=function(e){return new M(e)},M.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.googleDefaultEncryption&&Object.hasOwnProperty.call(e,"googleDefaultEncryption")&&f.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions.encode(e.googleDefaultEncryption,t.uint32(10).fork(),r+1).ldelim(),null!=e.useSourceEncryption&&Object.hasOwnProperty.call(e,"useSourceEncryption")&&f.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions.encode(e.useSourceEncryption,t.uint32(18).fork(),r+1).ldelim(),null!=e.customerManagedEncryption&&Object.hasOwnProperty.call(e,"customerManagedEncryption")&&f.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions.encode(e.customerManagedEncryption,t.uint32(26).fork(),r+1).ldelim(),t},M.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},M.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Database.EncryptionConfig;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.googleDefaultEncryption=f.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions.decode(e,e.uint32(),void 0,o+1);break;case 2:i.useSourceEncryption=f.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions.decode(e,e.uint32(),void 0,o+1);break;case 3:i.customerManagedEncryption=f.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},M.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},M.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.googleDefaultEncryption&&Object.hasOwnProperty.call(e,"googleDefaultEncryption")&&(r=f.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions.verify(e.googleDefaultEncryption,t+(o.encryptionType=1))))return"googleDefaultEncryption."+r;if(null!=e.useSourceEncryption&&Object.hasOwnProperty.call(e,"useSourceEncryption")){if(1===o.encryptionType)return"encryptionType: multiple values";if(r=f.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions.verify(e.useSourceEncryption,t+(o.encryptionType=1)))return"useSourceEncryption."+r}if(null!=e.customerManagedEncryption&&Object.hasOwnProperty.call(e,"customerManagedEncryption")){if(1===o.encryptionType)return"encryptionType: multiple values";if(r=f.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions.verify(e.customerManagedEncryption,t+(o.encryptionType=1)))return"customerManagedEncryption."+r}return null},M.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Database.EncryptionConfig)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Database.EncryptionConfig: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.Database.EncryptionConfig;if(null!=e.googleDefaultEncryption){if(!p.isObject(e.googleDefaultEncryption))throw TypeError(".google.firestore.admin.v1.Database.EncryptionConfig.googleDefaultEncryption: object expected");r.googleDefaultEncryption=f.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions.fromObject(e.googleDefaultEncryption,t+1)}if(null!=e.useSourceEncryption){if(!p.isObject(e.useSourceEncryption))throw TypeError(".google.firestore.admin.v1.Database.EncryptionConfig.useSourceEncryption: object expected");r.useSourceEncryption=f.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions.fromObject(e.useSourceEncryption,t+1)}if(null!=e.customerManagedEncryption){if(!p.isObject(e.customerManagedEncryption))throw TypeError(".google.firestore.admin.v1.Database.EncryptionConfig.customerManagedEncryption: object expected");r.customerManagedEncryption=f.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions.fromObject(e.customerManagedEncryption,t+1)}return r},M.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return null!=e.googleDefaultEncryption&&Object.hasOwnProperty.call(e,"googleDefaultEncryption")&&(o.googleDefaultEncryption=f.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions.toObject(e.googleDefaultEncryption,t,r+1),t.oneofs)&&(o.encryptionType="googleDefaultEncryption"),null!=e.useSourceEncryption&&Object.hasOwnProperty.call(e,"useSourceEncryption")&&(o.useSourceEncryption=f.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions.toObject(e.useSourceEncryption,t,r+1),t.oneofs)&&(o.encryptionType="useSourceEncryption"),null!=e.customerManagedEncryption&&Object.hasOwnProperty.call(e,"customerManagedEncryption")&&(o.customerManagedEncryption=f.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions.toObject(e.customerManagedEncryption,t,r+1),t.oneofs)&&(o.encryptionType="customerManagedEncryption"),o},M.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},M.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Database.EncryptionConfig"},M.GoogleDefaultEncryptionOptions=(q.create=function(e){return new q(e)},q.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return t},q.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},q.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,t=new f.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions;e.pos<n;){var i=e.uint32();if(i===r)break;e.skipType(7&i,o)}return t},q.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},q.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null},q.fromObject=function(e,t){return e instanceof f.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions?e:new f.google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions},q.toObject=function(){return{}},q.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},q.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Database.EncryptionConfig.GoogleDefaultEncryptionOptions"},q),M.SourceEncryptionOptions=(Q.create=function(e){return new Q(e)},Q.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return t},Q.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Q.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,t=new f.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions;e.pos<n;){var i=e.uint32();if(i===r)break;e.skipType(7&i,o)}return t},Q.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Q.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null},Q.fromObject=function(e,t){return e instanceof f.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions?e:new f.google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions},Q.toObject=function(){return{}},Q.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Q.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Database.EncryptionConfig.SourceEncryptionOptions"},Q),M.CustomerManagedEncryptionOptions=(J.prototype.kmsKeyName="",J.create=function(e){return new J(e)},J.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.kmsKeyName&&Object.hasOwnProperty.call(e,"kmsKeyName")&&t.uint32(10).string(e.kmsKeyName),t},J.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},J.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.kmsKeyName=e.string():e.skipType(7&a,o)}return i},J.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},J.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.kmsKeyName&&Object.hasOwnProperty.call(e,"kmsKeyName")&&!p.isString(e.kmsKeyName)?"kmsKeyName: string expected":null},J.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions;return null!=e.kmsKeyName&&(t.kmsKeyName=String(e.kmsKeyName)),t},J.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.kmsKeyName=""),null!=e.kmsKeyName&&Object.hasOwnProperty.call(e,"kmsKeyName")&&(r.kmsKeyName=e.kmsKeyName),r},J.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},J.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Database.EncryptionConfig.CustomerManagedEncryptionOptions"},J),M),l.DatabaseEdition=(i={},(e=Object.create(i))[i[0]="DATABASE_EDITION_UNSPECIFIED"]=0,e[i[1]="STANDARD"]=1,e[i[2]="ENTERPRISE"]=2,e),l.DataAccessMode=(i={},(e=Object.create(i))[i[0]="DATA_ACCESS_MODE_UNSPECIFIED"]=0,e[i[1]="DATA_ACCESS_MODE_ENABLED"]=1,e[i[2]="DATA_ACCESS_MODE_DISABLED"]=2,e),l),t.RealtimeUpdatesMode=(i={},(e=Object.create(i))[i[0]="REALTIME_UPDATES_MODE_UNSPECIFIED"]=0,e[i[1]="REALTIME_UPDATES_MODE_ENABLED"]=1,e[i[2]="REALTIME_UPDATES_MODE_DISABLED"]=2,e),t.Field=(G.prototype.name="",G.prototype.indexConfig=null,G.prototype.ttlConfig=null,G.create=function(e){return new G(e)},G.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.indexConfig&&Object.hasOwnProperty.call(e,"indexConfig")&&f.google.firestore.admin.v1.Field.IndexConfig.encode(e.indexConfig,t.uint32(18).fork(),r+1).ldelim(),null!=e.ttlConfig&&Object.hasOwnProperty.call(e,"ttlConfig")&&f.google.firestore.admin.v1.Field.TtlConfig.encode(e.ttlConfig,t.uint32(26).fork(),r+1).ldelim(),t},G.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},G.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Field;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.indexConfig=f.google.firestore.admin.v1.Field.IndexConfig.decode(e,e.uint32(),void 0,o+1);break;case 3:i.ttlConfig=f.google.firestore.admin.v1.Field.TtlConfig.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},G.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},G.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";var r;if(null!=e.indexConfig&&Object.hasOwnProperty.call(e,"indexConfig")&&(r=f.google.firestore.admin.v1.Field.IndexConfig.verify(e.indexConfig,t+1)))return"indexConfig."+r;if(null!=e.ttlConfig&&Object.hasOwnProperty.call(e,"ttlConfig")&&(r=f.google.firestore.admin.v1.Field.TtlConfig.verify(e.ttlConfig,t+1)))return"ttlConfig."+r;return null},G.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Field)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Field: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.Field;if(null!=e.name&&(r.name=String(e.name)),null!=e.indexConfig){if(!p.isObject(e.indexConfig))throw TypeError(".google.firestore.admin.v1.Field.indexConfig: object expected");r.indexConfig=f.google.firestore.admin.v1.Field.IndexConfig.fromObject(e.indexConfig,t+1)}if(null!=e.ttlConfig){if(!p.isObject(e.ttlConfig))throw TypeError(".google.firestore.admin.v1.Field.ttlConfig: object expected");r.ttlConfig=f.google.firestore.admin.v1.Field.TtlConfig.fromObject(e.ttlConfig,t+1)}return r},G.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.name="",o.indexConfig=null,o.ttlConfig=null),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.indexConfig&&Object.hasOwnProperty.call(e,"indexConfig")&&(o.indexConfig=f.google.firestore.admin.v1.Field.IndexConfig.toObject(e.indexConfig,t,r+1)),null!=e.ttlConfig&&Object.hasOwnProperty.call(e,"ttlConfig")&&(o.ttlConfig=f.google.firestore.admin.v1.Field.TtlConfig.toObject(e.ttlConfig,t,r+1)),o},G.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},G.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Field"},G.IndexConfig=(W.prototype.indexes=p.emptyArray,W.prototype.usesAncestorConfig=!1,W.prototype.ancestorField="",W.prototype.reverting=!1,W.create=function(e){return new W(e)},W.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.indexes&&e.indexes.length)for(var o=0;o<e.indexes.length;++o)f.google.firestore.admin.v1.Index.encode(e.indexes[o],t.uint32(10).fork(),r+1).ldelim();return null!=e.usesAncestorConfig&&Object.hasOwnProperty.call(e,"usesAncestorConfig")&&t.uint32(16).bool(e.usesAncestorConfig),null!=e.ancestorField&&Object.hasOwnProperty.call(e,"ancestorField")&&t.uint32(26).string(e.ancestorField),null!=e.reverting&&Object.hasOwnProperty.call(e,"reverting")&&t.uint32(32).bool(e.reverting),t},W.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},W.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Field.IndexConfig;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.indexes&&i.indexes.length||(i.indexes=[]),i.indexes.push(f.google.firestore.admin.v1.Index.decode(e,e.uint32(),void 0,o+1));break;case 2:i.usesAncestorConfig=e.bool();break;case 3:i.ancestorField=e.string();break;case 4:i.reverting=e.bool();break;default:e.skipType(7&a,o)}}return i},W.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},W.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.indexes&&Object.hasOwnProperty.call(e,"indexes")){if(!Array.isArray(e.indexes))return"indexes: array expected";for(var r=0;r<e.indexes.length;++r){var o=f.google.firestore.admin.v1.Index.verify(e.indexes[r],t+1);if(o)return"indexes."+o}}return null!=e.usesAncestorConfig&&Object.hasOwnProperty.call(e,"usesAncestorConfig")&&"boolean"!=typeof e.usesAncestorConfig?"usesAncestorConfig: boolean expected":null!=e.ancestorField&&Object.hasOwnProperty.call(e,"ancestorField")&&!p.isString(e.ancestorField)?"ancestorField: string expected":null!=e.reverting&&Object.hasOwnProperty.call(e,"reverting")&&"boolean"!=typeof e.reverting?"reverting: boolean expected":null},W.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Field.IndexConfig)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Field.IndexConfig: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.Field.IndexConfig;if(e.indexes){if(!Array.isArray(e.indexes))throw TypeError(".google.firestore.admin.v1.Field.IndexConfig.indexes: array expected");r.indexes=[];for(var o=0;o<e.indexes.length;++o){if(!p.isObject(e.indexes[o]))throw TypeError(".google.firestore.admin.v1.Field.IndexConfig.indexes: object expected");r.indexes[o]=f.google.firestore.admin.v1.Index.fromObject(e.indexes[o],t+1)}}return null!=e.usesAncestorConfig&&(r.usesAncestorConfig=Boolean(e.usesAncestorConfig)),null!=e.ancestorField&&(r.ancestorField=String(e.ancestorField)),null!=e.reverting&&(r.reverting=Boolean(e.reverting)),r},W.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.indexes=[]),t.defaults&&(o.usesAncestorConfig=!1,o.ancestorField="",o.reverting=!1),e.indexes&&e.indexes.length){o.indexes=[];for(var n=0;n<e.indexes.length;++n)o.indexes[n]=f.google.firestore.admin.v1.Index.toObject(e.indexes[n],t,r+1)}return null!=e.usesAncestorConfig&&Object.hasOwnProperty.call(e,"usesAncestorConfig")&&(o.usesAncestorConfig=e.usesAncestorConfig),null!=e.ancestorField&&Object.hasOwnProperty.call(e,"ancestorField")&&(o.ancestorField=e.ancestorField),null!=e.reverting&&Object.hasOwnProperty.call(e,"reverting")&&(o.reverting=e.reverting),o},W.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},W.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Field.IndexConfig"},W),G.TtlConfig=(z.prototype.state=0,z.prototype.expirationOffset=null,z.create=function(e){return new z(e)},z.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(8).int32(e.state),null!=e.expirationOffset&&Object.hasOwnProperty.call(e,"expirationOffset")&&f.google.protobuf.Duration.encode(e.expirationOffset,t.uint32(26).fork(),r+1).ldelim(),t},z.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},z.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Field.TtlConfig;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.state=e.int32();break;case 3:i.expirationOffset=f.google.protobuf.Duration.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},z.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},z.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.state&&Object.hasOwnProperty.call(e,"state"))switch(e.state){default:return"state: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.expirationOffset&&Object.hasOwnProperty.call(e,"expirationOffset")){e=f.google.protobuf.Duration.verify(e.expirationOffset,t+1);if(e)return"expirationOffset."+e}return null},z.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Field.TtlConfig)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Field.TtlConfig: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.Field.TtlConfig;switch(e.state){default:"number"==typeof e.state&&(r.state=e.state);break;case"STATE_UNSPECIFIED":case 0:r.state=0;break;case"CREATING":case 1:r.state=1;break;case"ACTIVE":case 2:r.state=2;break;case"NEEDS_REPAIR":case 3:r.state=3}if(null!=e.expirationOffset){if(!p.isObject(e.expirationOffset))throw TypeError(".google.firestore.admin.v1.Field.TtlConfig.expirationOffset: object expected");r.expirationOffset=f.google.protobuf.Duration.fromObject(e.expirationOffset,t+1)}return r},z.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.state=t.enums===String?"STATE_UNSPECIFIED":0,o.expirationOffset=null),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&(o.state=t.enums!==String||void 0===f.google.firestore.admin.v1.Field.TtlConfig.State[e.state]?e.state:f.google.firestore.admin.v1.Field.TtlConfig.State[e.state]),null!=e.expirationOffset&&Object.hasOwnProperty.call(e,"expirationOffset")&&(o.expirationOffset=f.google.protobuf.Duration.toObject(e.expirationOffset,t,r+1)),o},z.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},z.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Field.TtlConfig"},z.State=(i={},(e=Object.create(i))[i[0]="STATE_UNSPECIFIED"]=0,e[i[1]="CREATING"]=1,e[i[2]="ACTIVE"]=2,e[i[3]="NEEDS_REPAIR"]=3,e),z),G),t.Index=(c.prototype.name="",c.prototype.queryScope=0,c.prototype.apiScope=0,c.prototype.fields=p.emptyArray,c.prototype.state=0,c.prototype.density=0,c.prototype.multikey=!1,c.prototype.shardCount=0,c.prototype.unique=!1,c.prototype.searchIndexOptions=null,c.create=function(e){return new c(e)},c.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.queryScope&&Object.hasOwnProperty.call(e,"queryScope")&&t.uint32(16).int32(e.queryScope),null!=e.fields&&e.fields.length)for(var o=0;o<e.fields.length;++o)f.google.firestore.admin.v1.Index.IndexField.encode(e.fields[o],t.uint32(26).fork(),r+1).ldelim();return null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(32).int32(e.state),null!=e.apiScope&&Object.hasOwnProperty.call(e,"apiScope")&&t.uint32(40).int32(e.apiScope),null!=e.density&&Object.hasOwnProperty.call(e,"density")&&t.uint32(48).int32(e.density),null!=e.multikey&&Object.hasOwnProperty.call(e,"multikey")&&t.uint32(56).bool(e.multikey),null!=e.shardCount&&Object.hasOwnProperty.call(e,"shardCount")&&t.uint32(64).int32(e.shardCount),null!=e.searchIndexOptions&&Object.hasOwnProperty.call(e,"searchIndexOptions")&&f.google.firestore.admin.v1.Index.SearchIndexOptions.encode(e.searchIndexOptions,t.uint32(74).fork(),r+1).ldelim(),null!=e.unique&&Object.hasOwnProperty.call(e,"unique")&&t.uint32(80).bool(e.unique),t},c.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},c.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Index;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.queryScope=e.int32();break;case 5:i.apiScope=e.int32();break;case 3:i.fields&&i.fields.length||(i.fields=[]),i.fields.push(f.google.firestore.admin.v1.Index.IndexField.decode(e,e.uint32(),void 0,o+1));break;case 4:i.state=e.int32();break;case 6:i.density=e.int32();break;case 7:i.multikey=e.bool();break;case 8:i.shardCount=e.int32();break;case 10:i.unique=e.bool();break;case 9:i.searchIndexOptions=f.google.firestore.admin.v1.Index.SearchIndexOptions.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},c.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},c.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.queryScope&&Object.hasOwnProperty.call(e,"queryScope"))switch(e.queryScope){default:return"queryScope: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.apiScope&&Object.hasOwnProperty.call(e,"apiScope"))switch(e.apiScope){default:return"apiScope: enum value expected";case 0:case 1:case 2:}if(null!=e.fields&&Object.hasOwnProperty.call(e,"fields")){if(!Array.isArray(e.fields))return"fields: array expected";for(var r=0;r<e.fields.length;++r)if(o=f.google.firestore.admin.v1.Index.IndexField.verify(e.fields[r],t+1))return"fields."+o}if(null!=e.state&&Object.hasOwnProperty.call(e,"state"))switch(e.state){default:return"state: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.density&&Object.hasOwnProperty.call(e,"density"))switch(e.density){default:return"density: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.multikey&&Object.hasOwnProperty.call(e,"multikey")&&"boolean"!=typeof e.multikey)return"multikey: boolean expected";if(null!=e.shardCount&&Object.hasOwnProperty.call(e,"shardCount")&&!p.isInteger(e.shardCount))return"shardCount: integer expected";if(null!=e.unique&&Object.hasOwnProperty.call(e,"unique")&&"boolean"!=typeof e.unique)return"unique: boolean expected";var o;if(null!=e.searchIndexOptions&&Object.hasOwnProperty.call(e,"searchIndexOptions")&&(o=f.google.firestore.admin.v1.Index.SearchIndexOptions.verify(e.searchIndexOptions,t+1)))return"searchIndexOptions."+o;return null},c.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Index)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Index: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.Index;switch(null!=e.name&&(r.name=String(e.name)),e.queryScope){default:"number"==typeof e.queryScope&&(r.queryScope=e.queryScope);break;case"QUERY_SCOPE_UNSPECIFIED":case 0:r.queryScope=0;break;case"COLLECTION":case 1:r.queryScope=1;break;case"COLLECTION_GROUP":case 2:r.queryScope=2;break;case"COLLECTION_RECURSIVE":case 3:r.queryScope=3}switch(e.apiScope){default:"number"==typeof e.apiScope&&(r.apiScope=e.apiScope);break;case"ANY_API":case 0:r.apiScope=0;break;case"DATASTORE_MODE_API":case 1:r.apiScope=1;break;case"MONGODB_COMPATIBLE_API":case 2:r.apiScope=2}if(e.fields){if(!Array.isArray(e.fields))throw TypeError(".google.firestore.admin.v1.Index.fields: array expected");r.fields=[];for(var o=0;o<e.fields.length;++o){if(!p.isObject(e.fields[o]))throw TypeError(".google.firestore.admin.v1.Index.fields: object expected");r.fields[o]=f.google.firestore.admin.v1.Index.IndexField.fromObject(e.fields[o],t+1)}}switch(e.state){default:"number"==typeof e.state&&(r.state=e.state);break;case"STATE_UNSPECIFIED":case 0:r.state=0;break;case"CREATING":case 1:r.state=1;break;case"READY":case 2:r.state=2;break;case"NEEDS_REPAIR":case 3:r.state=3}switch(e.density){default:"number"==typeof e.density&&(r.density=e.density);break;case"DENSITY_UNSPECIFIED":case 0:r.density=0;break;case"SPARSE_ALL":case 1:r.density=1;break;case"SPARSE_ANY":case 2:r.density=2;break;case"DENSE":case 3:r.density=3}if(null!=e.multikey&&(r.multikey=Boolean(e.multikey)),null!=e.shardCount&&(r.shardCount=0|e.shardCount),null!=e.unique&&(r.unique=Boolean(e.unique)),null!=e.searchIndexOptions){if(!p.isObject(e.searchIndexOptions))throw TypeError(".google.firestore.admin.v1.Index.searchIndexOptions: object expected");r.searchIndexOptions=f.google.firestore.admin.v1.Index.SearchIndexOptions.fromObject(e.searchIndexOptions,t+1)}return r},c.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.fields=[]),t.defaults&&(o.name="",o.queryScope=t.enums===String?"QUERY_SCOPE_UNSPECIFIED":0,o.state=t.enums===String?"STATE_UNSPECIFIED":0,o.apiScope=t.enums===String?"ANY_API":0,o.density=t.enums===String?"DENSITY_UNSPECIFIED":0,o.multikey=!1,o.shardCount=0,o.searchIndexOptions=null,o.unique=!1),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.queryScope&&Object.hasOwnProperty.call(e,"queryScope")&&(o.queryScope=t.enums!==String||void 0===f.google.firestore.admin.v1.Index.QueryScope[e.queryScope]?e.queryScope:f.google.firestore.admin.v1.Index.QueryScope[e.queryScope]),e.fields&&e.fields.length){o.fields=[];for(var n=0;n<e.fields.length;++n)o.fields[n]=f.google.firestore.admin.v1.Index.IndexField.toObject(e.fields[n],t,r+1)}return null!=e.state&&Object.hasOwnProperty.call(e,"state")&&(o.state=t.enums!==String||void 0===f.google.firestore.admin.v1.Index.State[e.state]?e.state:f.google.firestore.admin.v1.Index.State[e.state]),null!=e.apiScope&&Object.hasOwnProperty.call(e,"apiScope")&&(o.apiScope=t.enums!==String||void 0===f.google.firestore.admin.v1.Index.ApiScope[e.apiScope]?e.apiScope:f.google.firestore.admin.v1.Index.ApiScope[e.apiScope]),null!=e.density&&Object.hasOwnProperty.call(e,"density")&&(o.density=t.enums!==String||void 0===f.google.firestore.admin.v1.Index.Density[e.density]?e.density:f.google.firestore.admin.v1.Index.Density[e.density]),null!=e.multikey&&Object.hasOwnProperty.call(e,"multikey")&&(o.multikey=e.multikey),null!=e.shardCount&&Object.hasOwnProperty.call(e,"shardCount")&&(o.shardCount=e.shardCount),null!=e.searchIndexOptions&&Object.hasOwnProperty.call(e,"searchIndexOptions")&&(o.searchIndexOptions=f.google.firestore.admin.v1.Index.SearchIndexOptions.toObject(e.searchIndexOptions,t,r+1)),null!=e.unique&&Object.hasOwnProperty.call(e,"unique")&&(o.unique=e.unique),o},c.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},c.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Index"},c.QueryScope=(i={},(e=Object.create(i))[i[0]="QUERY_SCOPE_UNSPECIFIED"]=0,e[i[1]="COLLECTION"]=1,e[i[2]="COLLECTION_GROUP"]=2,e[i[3]="COLLECTION_RECURSIVE"]=3,e),c.ApiScope=(i={},(e=Object.create(i))[i[0]="ANY_API"]=0,e[i[1]="DATASTORE_MODE_API"]=1,e[i[2]="MONGODB_COMPATIBLE_API"]=2,e),c.IndexField=(u.prototype.fieldPath="",u.prototype.order=null,u.prototype.arrayConfig=null,u.prototype.vectorConfig=null,u.prototype.searchConfig=null,Object.defineProperty(u.prototype,"valueMode",{get:p.oneOfGetter(i=["order","arrayConfig","vectorConfig","searchConfig"]),set:p.oneOfSetter(i)}),u.create=function(e){return new u(e)},u.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&t.uint32(10).string(e.fieldPath),null!=e.order&&Object.hasOwnProperty.call(e,"order")&&t.uint32(16).int32(e.order),null!=e.arrayConfig&&Object.hasOwnProperty.call(e,"arrayConfig")&&t.uint32(24).int32(e.arrayConfig),null!=e.vectorConfig&&Object.hasOwnProperty.call(e,"vectorConfig")&&f.google.firestore.admin.v1.Index.IndexField.VectorConfig.encode(e.vectorConfig,t.uint32(34).fork(),r+1).ldelim(),null!=e.searchConfig&&Object.hasOwnProperty.call(e,"searchConfig")&&f.google.firestore.admin.v1.Index.IndexField.SearchConfig.encode(e.searchConfig,t.uint32(42).fork(),r+1).ldelim(),t},u.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},u.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Index.IndexField;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.fieldPath=e.string();break;case 2:i.order=e.int32();break;case 3:i.arrayConfig=e.int32();break;case 4:i.vectorConfig=f.google.firestore.admin.v1.Index.IndexField.VectorConfig.decode(e,e.uint32(),void 0,o+1);break;case 5:i.searchConfig=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},u.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},u.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&!p.isString(e.fieldPath))return"fieldPath: string expected";if(null!=e.order&&Object.hasOwnProperty.call(e,"order"))switch(o.valueMode=1,e.order){default:return"order: enum value expected";case 0:case 1:case 2:}if(null!=e.arrayConfig&&Object.hasOwnProperty.call(e,"arrayConfig")){if(1===o.valueMode)return"valueMode: multiple values";switch(o.valueMode=1,e.arrayConfig){default:return"arrayConfig: enum value expected";case 0:case 1:}}if(null!=e.vectorConfig&&Object.hasOwnProperty.call(e,"vectorConfig")){if(1===o.valueMode)return"valueMode: multiple values";if(r=f.google.firestore.admin.v1.Index.IndexField.VectorConfig.verify(e.vectorConfig,t+(o.valueMode=1)))return"vectorConfig."+r}if(null!=e.searchConfig&&Object.hasOwnProperty.call(e,"searchConfig")){if(1===o.valueMode)return"valueMode: multiple values";if(r=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.verify(e.searchConfig,t+(o.valueMode=1)))return"searchConfig."+r}return null},u.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Index.IndexField)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Index.IndexField: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.Index.IndexField;switch(null!=e.fieldPath&&(r.fieldPath=String(e.fieldPath)),e.order){default:"number"==typeof e.order&&(r.order=e.order);break;case"ORDER_UNSPECIFIED":case 0:r.order=0;break;case"ASCENDING":case 1:r.order=1;break;case"DESCENDING":case 2:r.order=2}switch(e.arrayConfig){default:"number"==typeof e.arrayConfig&&(r.arrayConfig=e.arrayConfig);break;case"ARRAY_CONFIG_UNSPECIFIED":case 0:r.arrayConfig=0;break;case"CONTAINS":case 1:r.arrayConfig=1}if(null!=e.vectorConfig){if(!p.isObject(e.vectorConfig))throw TypeError(".google.firestore.admin.v1.Index.IndexField.vectorConfig: object expected");r.vectorConfig=f.google.firestore.admin.v1.Index.IndexField.VectorConfig.fromObject(e.vectorConfig,t+1)}if(null!=e.searchConfig){if(!p.isObject(e.searchConfig))throw TypeError(".google.firestore.admin.v1.Index.IndexField.searchConfig: object expected");r.searchConfig=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.fromObject(e.searchConfig,t+1)}return r},u.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.fieldPath=""),null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&(o.fieldPath=e.fieldPath),null!=e.order&&Object.hasOwnProperty.call(e,"order")&&(o.order=t.enums!==String||void 0===f.google.firestore.admin.v1.Index.IndexField.Order[e.order]?e.order:f.google.firestore.admin.v1.Index.IndexField.Order[e.order],t.oneofs)&&(o.valueMode="order"),null!=e.arrayConfig&&Object.hasOwnProperty.call(e,"arrayConfig")&&(o.arrayConfig=t.enums!==String||void 0===f.google.firestore.admin.v1.Index.IndexField.ArrayConfig[e.arrayConfig]?e.arrayConfig:f.google.firestore.admin.v1.Index.IndexField.ArrayConfig[e.arrayConfig],t.oneofs)&&(o.valueMode="arrayConfig"),null!=e.vectorConfig&&Object.hasOwnProperty.call(e,"vectorConfig")&&(o.vectorConfig=f.google.firestore.admin.v1.Index.IndexField.VectorConfig.toObject(e.vectorConfig,t,r+1),t.oneofs)&&(o.valueMode="vectorConfig"),null!=e.searchConfig&&Object.hasOwnProperty.call(e,"searchConfig")&&(o.searchConfig=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.toObject(e.searchConfig,t,r+1),t.oneofs)&&(o.valueMode="searchConfig"),o},u.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},u.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Index.IndexField"},u.Order=(i={},(e=Object.create(i))[i[0]="ORDER_UNSPECIFIED"]=0,e[i[1]="ASCENDING"]=1,e[i[2]="DESCENDING"]=2,e),u.ArrayConfig=(i={},(e=Object.create(i))[i[0]="ARRAY_CONFIG_UNSPECIFIED"]=0,e[i[1]="CONTAINS"]=1,e),u.VectorConfig=(Y.prototype.dimension=0,Y.prototype.flat=null,Object.defineProperty(Y.prototype,"type",{get:p.oneOfGetter(i=["flat"]),set:p.oneOfSetter(i)}),Y.create=function(e){return new Y(e)},Y.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.dimension&&Object.hasOwnProperty.call(e,"dimension")&&t.uint32(8).int32(e.dimension),null!=e.flat&&Object.hasOwnProperty.call(e,"flat")&&f.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex.encode(e.flat,t.uint32(18).fork(),r+1).ldelim(),t},Y.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Y.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Index.IndexField.VectorConfig;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.dimension=e.int32();break;case 2:i.flat=f.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Y.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Y.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.dimension&&Object.hasOwnProperty.call(e,"dimension")&&!p.isInteger(e.dimension))return"dimension: integer expected";if(null!=e.flat&&Object.hasOwnProperty.call(e,"flat")){e=f.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex.verify(e.flat,t+1);if(e)return"flat."+e}return null},Y.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Index.IndexField.VectorConfig)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Index.IndexField.VectorConfig: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.Index.IndexField.VectorConfig;if(null!=e.dimension&&(r.dimension=0|e.dimension),null!=e.flat){if(!p.isObject(e.flat))throw TypeError(".google.firestore.admin.v1.Index.IndexField.VectorConfig.flat: object expected");r.flat=f.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex.fromObject(e.flat,t+1)}return r},Y.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.dimension=0),null!=e.dimension&&Object.hasOwnProperty.call(e,"dimension")&&(o.dimension=e.dimension),null!=e.flat&&Object.hasOwnProperty.call(e,"flat")&&(o.flat=f.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex.toObject(e.flat,t,r+1),t.oneofs)&&(o.type="flat"),o},Y.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Y.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Index.IndexField.VectorConfig"},Y.FlatIndex=(H.create=function(e){return new H(e)},H.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return t},H.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},H.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,t=new f.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex;e.pos<n;){var i=e.uint32();if(i===r)break;e.skipType(7&i,o)}return t},H.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},H.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null},H.fromObject=function(e,t){return e instanceof f.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex?e:new f.google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex},H.toObject=function(){return{}},H.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},H.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Index.IndexField.VectorConfig.FlatIndex"},H),Y),u.SearchConfig=(K.prototype.textSpec=null,K.prototype.geoSpec=null,K.create=function(e){return new K(e)},K.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.textSpec&&Object.hasOwnProperty.call(e,"textSpec")&&f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec.encode(e.textSpec,t.uint32(10).fork(),r+1).ldelim(),null!=e.geoSpec&&Object.hasOwnProperty.call(e,"geoSpec")&&f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec.encode(e.geoSpec,t.uint32(18).fork(),r+1).ldelim(),t},K.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},K.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Index.IndexField.SearchConfig;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.textSpec=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec.decode(e,e.uint32(),void 0,o+1);break;case 2:i.geoSpec=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},K.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},K.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.textSpec&&Object.hasOwnProperty.call(e,"textSpec")&&(r=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec.verify(e.textSpec,t+1)))return"textSpec."+r;if(null!=e.geoSpec&&Object.hasOwnProperty.call(e,"geoSpec")&&(r=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec.verify(e.geoSpec,t+1)))return"geoSpec."+r;return null},K.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Index.IndexField.SearchConfig)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Index.IndexField.SearchConfig: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.Index.IndexField.SearchConfig;if(null!=e.textSpec){if(!p.isObject(e.textSpec))throw TypeError(".google.firestore.admin.v1.Index.IndexField.SearchConfig.textSpec: object expected");r.textSpec=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec.fromObject(e.textSpec,t+1)}if(null!=e.geoSpec){if(!p.isObject(e.geoSpec))throw TypeError(".google.firestore.admin.v1.Index.IndexField.SearchConfig.geoSpec: object expected");r.geoSpec=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec.fromObject(e.geoSpec,t+1)}return r},K.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.textSpec=null,o.geoSpec=null),null!=e.textSpec&&Object.hasOwnProperty.call(e,"textSpec")&&(o.textSpec=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec.toObject(e.textSpec,t,r+1)),null!=e.geoSpec&&Object.hasOwnProperty.call(e,"geoSpec")&&(o.geoSpec=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec.toObject(e.geoSpec,t,r+1)),o},K.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},K.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Index.IndexField.SearchConfig"},K.TextIndexType=(e={},(i=Object.create(e))[e[0]="TEXT_INDEX_TYPE_UNSPECIFIED"]=0,i[e[1]="TOKENIZED"]=1,i),K.TextMatchType=(e={},(i=Object.create(e))[e[0]="TEXT_MATCH_TYPE_UNSPECIFIED"]=0,i[e[1]="MATCH_GLOBALLY"]=1,i),K.SearchTextIndexSpec=(X.prototype.indexType=0,X.prototype.matchType=0,X.create=function(e){return new X(e)},X.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.indexType&&Object.hasOwnProperty.call(e,"indexType")&&t.uint32(8).int32(e.indexType),null!=e.matchType&&Object.hasOwnProperty.call(e,"matchType")&&t.uint32(16).int32(e.matchType),t},X.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},X.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.indexType=e.int32();break;case 2:i.matchType=e.int32();break;default:e.skipType(7&a,o)}}return i},X.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},X.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.indexType&&Object.hasOwnProperty.call(e,"indexType"))switch(e.indexType){default:return"indexType: enum value expected";case 0:case 1:}if(null!=e.matchType&&Object.hasOwnProperty.call(e,"matchType"))switch(e.matchType){default:return"matchType: enum value expected";case 0:case 1:}return null},X.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec;switch(e.indexType){default:"number"==typeof e.indexType&&(r.indexType=e.indexType);break;case"TEXT_INDEX_TYPE_UNSPECIFIED":case 0:r.indexType=0;break;case"TOKENIZED":case 1:r.indexType=1}switch(e.matchType){default:"number"==typeof e.matchType&&(r.matchType=e.matchType);break;case"TEXT_MATCH_TYPE_UNSPECIFIED":case 0:r.matchType=0;break;case"MATCH_GLOBALLY":case 1:r.matchType=1}return r},X.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.indexType=t.enums===String?"TEXT_INDEX_TYPE_UNSPECIFIED":0,r.matchType=t.enums===String?"TEXT_MATCH_TYPE_UNSPECIFIED":0),null!=e.indexType&&Object.hasOwnProperty.call(e,"indexType")&&(r.indexType=t.enums!==String||void 0===f.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType[e.indexType]?e.indexType:f.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextIndexType[e.indexType]),null!=e.matchType&&Object.hasOwnProperty.call(e,"matchType")&&(r.matchType=t.enums!==String||void 0===f.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType[e.matchType]?e.matchType:f.google.firestore.admin.v1.Index.IndexField.SearchConfig.TextMatchType[e.matchType]),r},X.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},X.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec"},X),K.SearchTextSpec=(Z.prototype.indexSpecs=p.emptyArray,Z.create=function(e){return new Z(e)},Z.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.indexSpecs&&e.indexSpecs.length)for(var o=0;o<e.indexSpecs.length;++o)f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec.encode(e.indexSpecs[o],t.uint32(10).fork(),r+1).ldelim();return t},Z.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Z.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?(i.indexSpecs&&i.indexSpecs.length||(i.indexSpecs=[]),i.indexSpecs.push(f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec.decode(e,e.uint32(),void 0,o+1))):e.skipType(7&a,o)}return i},Z.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Z.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.indexSpecs&&Object.hasOwnProperty.call(e,"indexSpecs")){if(!Array.isArray(e.indexSpecs))return"indexSpecs: array expected";for(var r=0;r<e.indexSpecs.length;++r){var o=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec.verify(e.indexSpecs[r],t+1);if(o)return"indexSpecs."+o}}return null},Z.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec;if(e.indexSpecs){if(!Array.isArray(e.indexSpecs))throw TypeError(".google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec.indexSpecs: array expected");r.indexSpecs=[];for(var o=0;o<e.indexSpecs.length;++o){if(!p.isObject(e.indexSpecs[o]))throw TypeError(".google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec.indexSpecs: object expected");r.indexSpecs[o]=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec.fromObject(e.indexSpecs[o],t+1)}}return r},Z.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.indexSpecs=[]),e.indexSpecs&&e.indexSpecs.length){o.indexSpecs=[];for(var n=0;n<e.indexSpecs.length;++n)o.indexSpecs[n]=f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextIndexSpec.toObject(e.indexSpecs[n],t,r+1)}return o},Z.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Z.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchTextSpec"},Z),K.SearchGeoSpec=($.prototype.geoJsonIndexingDisabled=!1,$.create=function(e){return new $(e)},$.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.geoJsonIndexingDisabled&&Object.hasOwnProperty.call(e,"geoJsonIndexingDisabled")&&t.uint32(8).bool(e.geoJsonIndexingDisabled),t},$.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},$.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.geoJsonIndexingDisabled=e.bool():e.skipType(7&a,o)}return i},$.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},$.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.geoJsonIndexingDisabled&&Object.hasOwnProperty.call(e,"geoJsonIndexingDisabled")&&"boolean"!=typeof e.geoJsonIndexingDisabled?"geoJsonIndexingDisabled: boolean expected":null},$.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec;return null!=e.geoJsonIndexingDisabled&&(t.geoJsonIndexingDisabled=Boolean(e.geoJsonIndexingDisabled)),t},$.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.geoJsonIndexingDisabled=!1),null!=e.geoJsonIndexingDisabled&&Object.hasOwnProperty.call(e,"geoJsonIndexingDisabled")&&(r.geoJsonIndexingDisabled=e.geoJsonIndexingDisabled),r},$.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},$.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Index.IndexField.SearchConfig.SearchGeoSpec"},$),K),u),c.State=(e={},(i=Object.create(e))[e[0]="STATE_UNSPECIFIED"]=0,i[e[1]="CREATING"]=1,i[e[2]="READY"]=2,i[e[3]="NEEDS_REPAIR"]=3,i),c.Density=(e={},(i=Object.create(e))[e[0]="DENSITY_UNSPECIFIED"]=0,i[e[1]="SPARSE_ALL"]=1,i[e[2]="SPARSE_ANY"]=2,i[e[3]="DENSE"]=3,i),c.SearchIndexOptions=(ee.prototype.textLanguage="",ee.prototype.textLanguageOverrideFieldPath="",ee.create=function(e){return new ee(e)},ee.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.textLanguage&&Object.hasOwnProperty.call(e,"textLanguage")&&t.uint32(10).string(e.textLanguage),null!=e.textLanguageOverrideFieldPath&&Object.hasOwnProperty.call(e,"textLanguageOverrideFieldPath")&&t.uint32(18).string(e.textLanguageOverrideFieldPath),t},ee.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ee.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Index.SearchIndexOptions;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.textLanguage=e.string();break;case 2:i.textLanguageOverrideFieldPath=e.string();break;default:e.skipType(7&a,o)}}return i},ee.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ee.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.textLanguage&&Object.hasOwnProperty.call(e,"textLanguage")&&!p.isString(e.textLanguage)?"textLanguage: string expected":null!=e.textLanguageOverrideFieldPath&&Object.hasOwnProperty.call(e,"textLanguageOverrideFieldPath")&&!p.isString(e.textLanguageOverrideFieldPath)?"textLanguageOverrideFieldPath: string expected":null},ee.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Index.SearchIndexOptions)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Index.SearchIndexOptions: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.Index.SearchIndexOptions;return null!=e.textLanguage&&(t.textLanguage=String(e.textLanguage)),null!=e.textLanguageOverrideFieldPath&&(t.textLanguageOverrideFieldPath=String(e.textLanguageOverrideFieldPath)),t},ee.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.textLanguage="",r.textLanguageOverrideFieldPath=""),null!=e.textLanguage&&Object.hasOwnProperty.call(e,"textLanguage")&&(r.textLanguage=e.textLanguage),null!=e.textLanguageOverrideFieldPath&&Object.hasOwnProperty.call(e,"textLanguageOverrideFieldPath")&&(r.textLanguageOverrideFieldPath=e.textLanguageOverrideFieldPath),r},ee.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ee.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Index.SearchIndexOptions"},ee),c),t.FirestoreAdmin=(((g.prototype=Object.create(o.rpc.Service.prototype)).constructor=g).create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(g.prototype.createIndex=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.CreateIndexRequest,f.google.longrunning.Operation,t,r)},"name",{value:"CreateIndex"}),Object.defineProperty(g.prototype.listIndexes=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.ListIndexesRequest,f.google.firestore.admin.v1.ListIndexesResponse,t,r)},"name",{value:"ListIndexes"}),Object.defineProperty(g.prototype.getIndex=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.GetIndexRequest,f.google.firestore.admin.v1.Index,t,r)},"name",{value:"GetIndex"}),Object.defineProperty(g.prototype.deleteIndex=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.DeleteIndexRequest,f.google.protobuf.Empty,t,r)},"name",{value:"DeleteIndex"}),Object.defineProperty(g.prototype.getField=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.GetFieldRequest,f.google.firestore.admin.v1.Field,t,r)},"name",{value:"GetField"}),Object.defineProperty(g.prototype.updateField=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.UpdateFieldRequest,f.google.longrunning.Operation,t,r)},"name",{value:"UpdateField"}),Object.defineProperty(g.prototype.listFields=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.ListFieldsRequest,f.google.firestore.admin.v1.ListFieldsResponse,t,r)},"name",{value:"ListFields"}),Object.defineProperty(g.prototype.exportDocuments=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.ExportDocumentsRequest,f.google.longrunning.Operation,t,r)},"name",{value:"ExportDocuments"}),Object.defineProperty(g.prototype.importDocuments=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.ImportDocumentsRequest,f.google.longrunning.Operation,t,r)},"name",{value:"ImportDocuments"}),Object.defineProperty(g.prototype.bulkDeleteDocuments=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.BulkDeleteDocumentsRequest,f.google.longrunning.Operation,t,r)},"name",{value:"BulkDeleteDocuments"}),Object.defineProperty(g.prototype.createDatabase=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.CreateDatabaseRequest,f.google.longrunning.Operation,t,r)},"name",{value:"CreateDatabase"}),Object.defineProperty(g.prototype.getDatabase=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.GetDatabaseRequest,f.google.firestore.admin.v1.Database,t,r)},"name",{value:"GetDatabase"}),Object.defineProperty(g.prototype.listDatabases=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.ListDatabasesRequest,f.google.firestore.admin.v1.ListDatabasesResponse,t,r)},"name",{value:"ListDatabases"}),Object.defineProperty(g.prototype.updateDatabase=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.UpdateDatabaseRequest,f.google.longrunning.Operation,t,r)},"name",{value:"UpdateDatabase"}),Object.defineProperty(g.prototype.deleteDatabase=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.DeleteDatabaseRequest,f.google.longrunning.Operation,t,r)},"name",{value:"DeleteDatabase"}),Object.defineProperty(g.prototype.createUserCreds=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.CreateUserCredsRequest,f.google.firestore.admin.v1.UserCreds,t,r)},"name",{value:"CreateUserCreds"}),Object.defineProperty(g.prototype.getUserCreds=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.GetUserCredsRequest,f.google.firestore.admin.v1.UserCreds,t,r)},"name",{value:"GetUserCreds"}),Object.defineProperty(g.prototype.listUserCreds=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.ListUserCredsRequest,f.google.firestore.admin.v1.ListUserCredsResponse,t,r)},"name",{value:"ListUserCreds"}),Object.defineProperty(g.prototype.enableUserCreds=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.EnableUserCredsRequest,f.google.firestore.admin.v1.UserCreds,t,r)},"name",{value:"EnableUserCreds"}),Object.defineProperty(g.prototype.disableUserCreds=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.DisableUserCredsRequest,f.google.firestore.admin.v1.UserCreds,t,r)},"name",{value:"DisableUserCreds"}),Object.defineProperty(g.prototype.resetUserPassword=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.ResetUserPasswordRequest,f.google.firestore.admin.v1.UserCreds,t,r)},"name",{value:"ResetUserPassword"}),Object.defineProperty(g.prototype.deleteUserCreds=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.DeleteUserCredsRequest,f.google.protobuf.Empty,t,r)},"name",{value:"DeleteUserCreds"}),Object.defineProperty(g.prototype.getBackup=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.GetBackupRequest,f.google.firestore.admin.v1.Backup,t,r)},"name",{value:"GetBackup"}),Object.defineProperty(g.prototype.listBackups=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.ListBackupsRequest,f.google.firestore.admin.v1.ListBackupsResponse,t,r)},"name",{value:"ListBackups"}),Object.defineProperty(g.prototype.deleteBackup=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.DeleteBackupRequest,f.google.protobuf.Empty,t,r)},"name",{value:"DeleteBackup"}),Object.defineProperty(g.prototype.restoreDatabase=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.RestoreDatabaseRequest,f.google.longrunning.Operation,t,r)},"name",{value:"RestoreDatabase"}),Object.defineProperty(g.prototype.createBackupSchedule=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.CreateBackupScheduleRequest,f.google.firestore.admin.v1.BackupSchedule,t,r)},"name",{value:"CreateBackupSchedule"}),Object.defineProperty(g.prototype.getBackupSchedule=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.GetBackupScheduleRequest,f.google.firestore.admin.v1.BackupSchedule,t,r)},"name",{value:"GetBackupSchedule"}),Object.defineProperty(g.prototype.listBackupSchedules=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.ListBackupSchedulesRequest,f.google.firestore.admin.v1.ListBackupSchedulesResponse,t,r)},"name",{value:"ListBackupSchedules"}),Object.defineProperty(g.prototype.updateBackupSchedule=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.UpdateBackupScheduleRequest,f.google.firestore.admin.v1.BackupSchedule,t,r)},"name",{value:"UpdateBackupSchedule"}),Object.defineProperty(g.prototype.deleteBackupSchedule=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.DeleteBackupScheduleRequest,f.google.protobuf.Empty,t,r)},"name",{value:"DeleteBackupSchedule"}),Object.defineProperty(g.prototype.cloneDatabase=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.admin.v1.CloneDatabaseRequest,f.google.longrunning.Operation,t,r)},"name",{value:"CloneDatabase"}),g),t.ListDatabasesRequest=(te.prototype.parent="",te.prototype.showDeleted=!1,te.create=function(e){return new te(e)},te.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.showDeleted&&Object.hasOwnProperty.call(e,"showDeleted")&&t.uint32(32).bool(e.showDeleted),t},te.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},te.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ListDatabasesRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 4:i.showDeleted=e.bool();break;default:e.skipType(7&a,o)}}return i},te.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},te.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent)?"parent: string expected":null!=e.showDeleted&&Object.hasOwnProperty.call(e,"showDeleted")&&"boolean"!=typeof e.showDeleted?"showDeleted: boolean expected":null},te.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ListDatabasesRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ListDatabasesRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.ListDatabasesRequest;return null!=e.parent&&(t.parent=String(e.parent)),null!=e.showDeleted&&(t.showDeleted=Boolean(e.showDeleted)),t},te.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.parent="",r.showDeleted=!1),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(r.parent=e.parent),null!=e.showDeleted&&Object.hasOwnProperty.call(e,"showDeleted")&&(r.showDeleted=e.showDeleted),r},te.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},te.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ListDatabasesRequest"},te),t.CreateDatabaseRequest=(re.prototype.parent="",re.prototype.database=null,re.prototype.databaseId="",re.create=function(e){return new re(e)},re.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&f.google.firestore.admin.v1.Database.encode(e.database,t.uint32(18).fork(),r+1).ldelim(),null!=e.databaseId&&Object.hasOwnProperty.call(e,"databaseId")&&t.uint32(26).string(e.databaseId),t},re.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},re.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.CreateDatabaseRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.database=f.google.firestore.admin.v1.Database.decode(e,e.uint32(),void 0,o+1);break;case 3:i.databaseId=e.string();break;default:e.skipType(7&a,o)}}return i},re.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},re.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.database&&Object.hasOwnProperty.call(e,"database")){t=f.google.firestore.admin.v1.Database.verify(e.database,t+1);if(t)return"database."+t}return null!=e.databaseId&&Object.hasOwnProperty.call(e,"databaseId")&&!p.isString(e.databaseId)?"databaseId: string expected":null},re.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.CreateDatabaseRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.CreateDatabaseRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.CreateDatabaseRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.database){if(!p.isObject(e.database))throw TypeError(".google.firestore.admin.v1.CreateDatabaseRequest.database: object expected");r.database=f.google.firestore.admin.v1.Database.fromObject(e.database,t+1)}return null!=e.databaseId&&(r.databaseId=String(e.databaseId)),r},re.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.parent="",o.database=null,o.databaseId=""),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(o.parent=e.parent),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(o.database=f.google.firestore.admin.v1.Database.toObject(e.database,t,r+1)),null!=e.databaseId&&Object.hasOwnProperty.call(e,"databaseId")&&(o.databaseId=e.databaseId),o},re.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},re.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.CreateDatabaseRequest"},re),t.CreateDatabaseMetadata=(oe.create=function(e){return new oe(e)},oe.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return t},oe.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},oe.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,t=new f.google.firestore.admin.v1.CreateDatabaseMetadata;e.pos<n;){var i=e.uint32();if(i===r)break;e.skipType(7&i,o)}return t},oe.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},oe.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null},oe.fromObject=function(e,t){return e instanceof f.google.firestore.admin.v1.CreateDatabaseMetadata?e:new f.google.firestore.admin.v1.CreateDatabaseMetadata},oe.toObject=function(){return{}},oe.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},oe.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.CreateDatabaseMetadata"},oe),t.ListDatabasesResponse=(ne.prototype.databases=p.emptyArray,ne.prototype.unreachable=p.emptyArray,ne.create=function(e){return new ne(e)},ne.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.databases&&e.databases.length)for(var o=0;o<e.databases.length;++o)f.google.firestore.admin.v1.Database.encode(e.databases[o],t.uint32(10).fork(),r+1).ldelim();if(null!=e.unreachable&&e.unreachable.length)for(o=0;o<e.unreachable.length;++o)t.uint32(26).string(e.unreachable[o]);return t},ne.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ne.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ListDatabasesResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.databases&&i.databases.length||(i.databases=[]),i.databases.push(f.google.firestore.admin.v1.Database.decode(e,e.uint32(),void 0,o+1));break;case 3:i.unreachable&&i.unreachable.length||(i.unreachable=[]),i.unreachable.push(e.string());break;default:e.skipType(7&a,o)}}return i},ne.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ne.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.databases&&Object.hasOwnProperty.call(e,"databases")){if(!Array.isArray(e.databases))return"databases: array expected";for(var r=0;r<e.databases.length;++r){var o=f.google.firestore.admin.v1.Database.verify(e.databases[r],t+1);if(o)return"databases."+o}}if(null!=e.unreachable&&Object.hasOwnProperty.call(e,"unreachable")){if(!Array.isArray(e.unreachable))return"unreachable: array expected";for(r=0;r<e.unreachable.length;++r)if(!p.isString(e.unreachable[r]))return"unreachable: string[] expected"}return null},ne.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ListDatabasesResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ListDatabasesResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.ListDatabasesResponse;if(e.databases){if(!Array.isArray(e.databases))throw TypeError(".google.firestore.admin.v1.ListDatabasesResponse.databases: array expected");r.databases=[];for(var o=0;o<e.databases.length;++o){if(!p.isObject(e.databases[o]))throw TypeError(".google.firestore.admin.v1.ListDatabasesResponse.databases: object expected");r.databases[o]=f.google.firestore.admin.v1.Database.fromObject(e.databases[o],t+1)}}if(e.unreachable){if(!Array.isArray(e.unreachable))throw TypeError(".google.firestore.admin.v1.ListDatabasesResponse.unreachable: array expected");r.unreachable=[];for(o=0;o<e.unreachable.length;++o)r.unreachable[o]=String(e.unreachable[o])}return r},ne.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.databases=[],o.unreachable=[]),e.databases&&e.databases.length){o.databases=[];for(var n=0;n<e.databases.length;++n)o.databases[n]=f.google.firestore.admin.v1.Database.toObject(e.databases[n],t,r+1)}if(e.unreachable&&e.unreachable.length){o.unreachable=[];for(n=0;n<e.unreachable.length;++n)o.unreachable[n]=e.unreachable[n]}return o},ne.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ne.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ListDatabasesResponse"},ne),t.GetDatabaseRequest=(ie.prototype.name="",ie.create=function(e){return new ie(e)},ie.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},ie.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ie.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.GetDatabaseRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},ie.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ie.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},ie.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.GetDatabaseRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.GetDatabaseRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.GetDatabaseRequest;return null!=e.name&&(t.name=String(e.name)),t},ie.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},ie.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ie.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.GetDatabaseRequest"},ie),t.UpdateDatabaseRequest=(ae.prototype.database=null,ae.prototype.updateMask=null,ae.create=function(e){return new ae(e)},ae.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.database&&Object.hasOwnProperty.call(e,"database")&&f.google.firestore.admin.v1.Database.encode(e.database,t.uint32(10).fork(),r+1).ldelim(),null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&f.google.protobuf.FieldMask.encode(e.updateMask,t.uint32(18).fork(),r+1).ldelim(),t},ae.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ae.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.UpdateDatabaseRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=f.google.firestore.admin.v1.Database.decode(e,e.uint32(),void 0,o+1);break;case 2:i.updateMask=f.google.protobuf.FieldMask.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},ae.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ae.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(r=f.google.firestore.admin.v1.Database.verify(e.database,t+1)))return"database."+r;if(null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&(r=f.google.protobuf.FieldMask.verify(e.updateMask,t+1)))return"updateMask."+r;return null},ae.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.UpdateDatabaseRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.UpdateDatabaseRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.UpdateDatabaseRequest;if(null!=e.database){if(!p.isObject(e.database))throw TypeError(".google.firestore.admin.v1.UpdateDatabaseRequest.database: object expected");r.database=f.google.firestore.admin.v1.Database.fromObject(e.database,t+1)}if(null!=e.updateMask){if(!p.isObject(e.updateMask))throw TypeError(".google.firestore.admin.v1.UpdateDatabaseRequest.updateMask: object expected");r.updateMask=f.google.protobuf.FieldMask.fromObject(e.updateMask,t+1)}return r},ae.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.database=null,o.updateMask=null),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(o.database=f.google.firestore.admin.v1.Database.toObject(e.database,t,r+1)),null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&(o.updateMask=f.google.protobuf.FieldMask.toObject(e.updateMask,t,r+1)),o},ae.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ae.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.UpdateDatabaseRequest"},ae),t.UpdateDatabaseMetadata=(se.create=function(e){return new se(e)},se.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return t},se.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},se.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,t=new f.google.firestore.admin.v1.UpdateDatabaseMetadata;e.pos<n;){var i=e.uint32();if(i===r)break;e.skipType(7&i,o)}return t},se.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},se.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null},se.fromObject=function(e,t){return e instanceof f.google.firestore.admin.v1.UpdateDatabaseMetadata?e:new f.google.firestore.admin.v1.UpdateDatabaseMetadata},se.toObject=function(){return{}},se.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},se.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.UpdateDatabaseMetadata"},se),t.DeleteDatabaseRequest=(le.prototype.name="",le.prototype.etag="",le.create=function(e){return new le(e)},le.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.etag&&Object.hasOwnProperty.call(e,"etag")&&t.uint32(26).string(e.etag),t},le.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},le.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.DeleteDatabaseRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 3:i.etag=e.string();break;default:e.skipType(7&a,o)}}return i},le.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},le.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null!=e.etag&&Object.hasOwnProperty.call(e,"etag")&&!p.isString(e.etag)?"etag: string expected":null},le.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.DeleteDatabaseRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.DeleteDatabaseRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.DeleteDatabaseRequest;return null!=e.name&&(t.name=String(e.name)),null!=e.etag&&(t.etag=String(e.etag)),t},le.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name="",r.etag=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),null!=e.etag&&Object.hasOwnProperty.call(e,"etag")&&(r.etag=e.etag),r},le.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},le.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.DeleteDatabaseRequest"},le),t.DeleteDatabaseMetadata=(ce.create=function(e){return new ce(e)},ce.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return t},ce.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ce.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,t=new f.google.firestore.admin.v1.DeleteDatabaseMetadata;e.pos<n;){var i=e.uint32();if(i===r)break;e.skipType(7&i,o)}return t},ce.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ce.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null},ce.fromObject=function(e,t){return e instanceof f.google.firestore.admin.v1.DeleteDatabaseMetadata?e:new f.google.firestore.admin.v1.DeleteDatabaseMetadata},ce.toObject=function(){return{}},ce.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ce.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.DeleteDatabaseMetadata"},ce),t.CreateUserCredsRequest=(ue.prototype.parent="",ue.prototype.userCreds=null,ue.prototype.userCredsId="",ue.create=function(e){return new ue(e)},ue.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.userCreds&&Object.hasOwnProperty.call(e,"userCreds")&&f.google.firestore.admin.v1.UserCreds.encode(e.userCreds,t.uint32(18).fork(),r+1).ldelim(),null!=e.userCredsId&&Object.hasOwnProperty.call(e,"userCredsId")&&t.uint32(26).string(e.userCredsId),t},ue.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ue.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.CreateUserCredsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.userCreds=f.google.firestore.admin.v1.UserCreds.decode(e,e.uint32(),void 0,o+1);break;case 3:i.userCredsId=e.string();break;default:e.skipType(7&a,o)}}return i},ue.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ue.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.userCreds&&Object.hasOwnProperty.call(e,"userCreds")){t=f.google.firestore.admin.v1.UserCreds.verify(e.userCreds,t+1);if(t)return"userCreds."+t}return null!=e.userCredsId&&Object.hasOwnProperty.call(e,"userCredsId")&&!p.isString(e.userCredsId)?"userCredsId: string expected":null},ue.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.CreateUserCredsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.CreateUserCredsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.CreateUserCredsRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.userCreds){if(!p.isObject(e.userCreds))throw TypeError(".google.firestore.admin.v1.CreateUserCredsRequest.userCreds: object expected");r.userCreds=f.google.firestore.admin.v1.UserCreds.fromObject(e.userCreds,t+1)}return null!=e.userCredsId&&(r.userCredsId=String(e.userCredsId)),r},ue.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.parent="",o.userCreds=null,o.userCredsId=""),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(o.parent=e.parent),null!=e.userCreds&&Object.hasOwnProperty.call(e,"userCreds")&&(o.userCreds=f.google.firestore.admin.v1.UserCreds.toObject(e.userCreds,t,r+1)),null!=e.userCredsId&&Object.hasOwnProperty.call(e,"userCredsId")&&(o.userCredsId=e.userCredsId),o},ue.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ue.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.CreateUserCredsRequest"},ue),t.GetUserCredsRequest=(de.prototype.name="",de.create=function(e){return new de(e)},de.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},de.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},de.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.GetUserCredsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},de.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},de.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},de.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.GetUserCredsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.GetUserCredsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.GetUserCredsRequest;return null!=e.name&&(t.name=String(e.name)),t},de.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},de.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},de.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.GetUserCredsRequest"},de),t.ListUserCredsRequest=(pe.prototype.parent="",pe.create=function(e){return new pe(e)},pe.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),t},pe.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},pe.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ListUserCredsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.parent=e.string():e.skipType(7&a,o)}return i},pe.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},pe.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent)?"parent: string expected":null},pe.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ListUserCredsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ListUserCredsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.ListUserCredsRequest;return null!=e.parent&&(t.parent=String(e.parent)),t},pe.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.parent=""),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(r.parent=e.parent),r},pe.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},pe.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ListUserCredsRequest"},pe),t.ListUserCredsResponse=(fe.prototype.userCreds=p.emptyArray,fe.create=function(e){return new fe(e)},fe.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.userCreds&&e.userCreds.length)for(var o=0;o<e.userCreds.length;++o)f.google.firestore.admin.v1.UserCreds.encode(e.userCreds[o],t.uint32(10).fork(),r+1).ldelim();return t},fe.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},fe.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ListUserCredsResponse;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?(i.userCreds&&i.userCreds.length||(i.userCreds=[]),i.userCreds.push(f.google.firestore.admin.v1.UserCreds.decode(e,e.uint32(),void 0,o+1))):e.skipType(7&a,o)}return i},fe.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},fe.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.userCreds&&Object.hasOwnProperty.call(e,"userCreds")){if(!Array.isArray(e.userCreds))return"userCreds: array expected";for(var r=0;r<e.userCreds.length;++r){var o=f.google.firestore.admin.v1.UserCreds.verify(e.userCreds[r],t+1);if(o)return"userCreds."+o}}return null},fe.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ListUserCredsResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ListUserCredsResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.ListUserCredsResponse;if(e.userCreds){if(!Array.isArray(e.userCreds))throw TypeError(".google.firestore.admin.v1.ListUserCredsResponse.userCreds: array expected");r.userCreds=[];for(var o=0;o<e.userCreds.length;++o){if(!p.isObject(e.userCreds[o]))throw TypeError(".google.firestore.admin.v1.ListUserCredsResponse.userCreds: object expected");r.userCreds[o]=f.google.firestore.admin.v1.UserCreds.fromObject(e.userCreds[o],t+1)}}return r},fe.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.userCreds=[]),e.userCreds&&e.userCreds.length){o.userCreds=[];for(var n=0;n<e.userCreds.length;++n)o.userCreds[n]=f.google.firestore.admin.v1.UserCreds.toObject(e.userCreds[n],t,r+1)}return o},fe.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},fe.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ListUserCredsResponse"},fe),t.EnableUserCredsRequest=(ge.prototype.name="",ge.create=function(e){return new ge(e)},ge.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},ge.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ge.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.EnableUserCredsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},ge.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ge.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},ge.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.EnableUserCredsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.EnableUserCredsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.EnableUserCredsRequest;return null!=e.name&&(t.name=String(e.name)),t},ge.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},ge.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ge.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.EnableUserCredsRequest"},ge),t.DisableUserCredsRequest=(me.prototype.name="",me.create=function(e){return new me(e)},me.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},me.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},me.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.DisableUserCredsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},me.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},me.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},me.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.DisableUserCredsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.DisableUserCredsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.DisableUserCredsRequest;return null!=e.name&&(t.name=String(e.name)),t},me.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},me.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},me.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.DisableUserCredsRequest"},me),t.ResetUserPasswordRequest=(be.prototype.name="",be.create=function(e){return new be(e)},be.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},be.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},be.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ResetUserPasswordRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},be.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},be.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},be.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ResetUserPasswordRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ResetUserPasswordRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.ResetUserPasswordRequest;return null!=e.name&&(t.name=String(e.name)),t},be.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},be.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},be.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ResetUserPasswordRequest"},be),t.DeleteUserCredsRequest=(ye.prototype.name="",ye.create=function(e){return new ye(e)},ye.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},ye.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ye.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.DeleteUserCredsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},ye.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ye.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},ye.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.DeleteUserCredsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.DeleteUserCredsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.DeleteUserCredsRequest;return null!=e.name&&(t.name=String(e.name)),t},ye.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},ye.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ye.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.DeleteUserCredsRequest"},ye),t.CreateBackupScheduleRequest=(he.prototype.parent="",he.prototype.backupSchedule=null,he.create=function(e){return new he(e)},he.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.backupSchedule&&Object.hasOwnProperty.call(e,"backupSchedule")&&f.google.firestore.admin.v1.BackupSchedule.encode(e.backupSchedule,t.uint32(18).fork(),r+1).ldelim(),t},he.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},he.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.CreateBackupScheduleRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.backupSchedule=f.google.firestore.admin.v1.BackupSchedule.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},he.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},he.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.backupSchedule&&Object.hasOwnProperty.call(e,"backupSchedule")){e=f.google.firestore.admin.v1.BackupSchedule.verify(e.backupSchedule,t+1);if(e)return"backupSchedule."+e}return null},he.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.CreateBackupScheduleRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.CreateBackupScheduleRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.CreateBackupScheduleRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.backupSchedule){if(!p.isObject(e.backupSchedule))throw TypeError(".google.firestore.admin.v1.CreateBackupScheduleRequest.backupSchedule: object expected");r.backupSchedule=f.google.firestore.admin.v1.BackupSchedule.fromObject(e.backupSchedule,t+1)}return r},he.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.parent="",o.backupSchedule=null),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(o.parent=e.parent),null!=e.backupSchedule&&Object.hasOwnProperty.call(e,"backupSchedule")&&(o.backupSchedule=f.google.firestore.admin.v1.BackupSchedule.toObject(e.backupSchedule,t,r+1)),o},he.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},he.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.CreateBackupScheduleRequest"},he),t.GetBackupScheduleRequest=(Oe.prototype.name="",Oe.create=function(e){return new Oe(e)},Oe.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},Oe.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Oe.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.GetBackupScheduleRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},Oe.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Oe.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},Oe.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.GetBackupScheduleRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.GetBackupScheduleRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.GetBackupScheduleRequest;return null!=e.name&&(t.name=String(e.name)),t},Oe.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},Oe.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Oe.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.GetBackupScheduleRequest"},Oe),t.UpdateBackupScheduleRequest=(ve.prototype.backupSchedule=null,ve.prototype.updateMask=null,ve.create=function(e){return new ve(e)},ve.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.backupSchedule&&Object.hasOwnProperty.call(e,"backupSchedule")&&f.google.firestore.admin.v1.BackupSchedule.encode(e.backupSchedule,t.uint32(10).fork(),r+1).ldelim(),null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&f.google.protobuf.FieldMask.encode(e.updateMask,t.uint32(18).fork(),r+1).ldelim(),t},ve.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ve.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.UpdateBackupScheduleRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.backupSchedule=f.google.firestore.admin.v1.BackupSchedule.decode(e,e.uint32(),void 0,o+1);break;case 2:i.updateMask=f.google.protobuf.FieldMask.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},ve.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ve.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.backupSchedule&&Object.hasOwnProperty.call(e,"backupSchedule")&&(r=f.google.firestore.admin.v1.BackupSchedule.verify(e.backupSchedule,t+1)))return"backupSchedule."+r;if(null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&(r=f.google.protobuf.FieldMask.verify(e.updateMask,t+1)))return"updateMask."+r;return null},ve.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.UpdateBackupScheduleRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.UpdateBackupScheduleRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.UpdateBackupScheduleRequest;if(null!=e.backupSchedule){if(!p.isObject(e.backupSchedule))throw TypeError(".google.firestore.admin.v1.UpdateBackupScheduleRequest.backupSchedule: object expected");r.backupSchedule=f.google.firestore.admin.v1.BackupSchedule.fromObject(e.backupSchedule,t+1)}if(null!=e.updateMask){if(!p.isObject(e.updateMask))throw TypeError(".google.firestore.admin.v1.UpdateBackupScheduleRequest.updateMask: object expected");r.updateMask=f.google.protobuf.FieldMask.fromObject(e.updateMask,t+1)}return r},ve.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.backupSchedule=null,o.updateMask=null),null!=e.backupSchedule&&Object.hasOwnProperty.call(e,"backupSchedule")&&(o.backupSchedule=f.google.firestore.admin.v1.BackupSchedule.toObject(e.backupSchedule,t,r+1)),null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&(o.updateMask=f.google.protobuf.FieldMask.toObject(e.updateMask,t,r+1)),o},ve.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ve.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.UpdateBackupScheduleRequest"},ve),t.ListBackupSchedulesRequest=(je.prototype.parent="",je.create=function(e){return new je(e)},je.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),t},je.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},je.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ListBackupSchedulesRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.parent=e.string():e.skipType(7&a,o)}return i},je.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},je.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent)?"parent: string expected":null},je.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ListBackupSchedulesRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ListBackupSchedulesRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.ListBackupSchedulesRequest;return null!=e.parent&&(t.parent=String(e.parent)),t},je.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.parent=""),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(r.parent=e.parent),r},je.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},je.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ListBackupSchedulesRequest"},je),t.ListBackupSchedulesResponse=(we.prototype.backupSchedules=p.emptyArray,we.create=function(e){return new we(e)},we.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.backupSchedules&&e.backupSchedules.length)for(var o=0;o<e.backupSchedules.length;++o)f.google.firestore.admin.v1.BackupSchedule.encode(e.backupSchedules[o],t.uint32(10).fork(),r+1).ldelim();return t},we.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},we.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ListBackupSchedulesResponse;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?(i.backupSchedules&&i.backupSchedules.length||(i.backupSchedules=[]),i.backupSchedules.push(f.google.firestore.admin.v1.BackupSchedule.decode(e,e.uint32(),void 0,o+1))):e.skipType(7&a,o)}return i},we.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},we.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.backupSchedules&&Object.hasOwnProperty.call(e,"backupSchedules")){if(!Array.isArray(e.backupSchedules))return"backupSchedules: array expected";for(var r=0;r<e.backupSchedules.length;++r){var o=f.google.firestore.admin.v1.BackupSchedule.verify(e.backupSchedules[r],t+1);if(o)return"backupSchedules."+o}}return null},we.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ListBackupSchedulesResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ListBackupSchedulesResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.ListBackupSchedulesResponse;if(e.backupSchedules){if(!Array.isArray(e.backupSchedules))throw TypeError(".google.firestore.admin.v1.ListBackupSchedulesResponse.backupSchedules: array expected");r.backupSchedules=[];for(var o=0;o<e.backupSchedules.length;++o){if(!p.isObject(e.backupSchedules[o]))throw TypeError(".google.firestore.admin.v1.ListBackupSchedulesResponse.backupSchedules: object expected");r.backupSchedules[o]=f.google.firestore.admin.v1.BackupSchedule.fromObject(e.backupSchedules[o],t+1)}}return r},we.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.backupSchedules=[]),e.backupSchedules&&e.backupSchedules.length){o.backupSchedules=[];for(var n=0;n<e.backupSchedules.length;++n)o.backupSchedules[n]=f.google.firestore.admin.v1.BackupSchedule.toObject(e.backupSchedules[n],t,r+1)}return o},we.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},we.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ListBackupSchedulesResponse"},we),t.DeleteBackupScheduleRequest=(xe.prototype.name="",xe.create=function(e){return new xe(e)},xe.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},xe.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},xe.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.DeleteBackupScheduleRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},xe.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},xe.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},xe.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.DeleteBackupScheduleRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.DeleteBackupScheduleRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.DeleteBackupScheduleRequest;return null!=e.name&&(t.name=String(e.name)),t},xe.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},xe.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},xe.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.DeleteBackupScheduleRequest"},xe),t.CreateIndexRequest=(Te.prototype.parent="",Te.prototype.index=null,Te.create=function(e){return new Te(e)},Te.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.index&&Object.hasOwnProperty.call(e,"index")&&f.google.firestore.admin.v1.Index.encode(e.index,t.uint32(18).fork(),r+1).ldelim(),t},Te.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Te.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.CreateIndexRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.index=f.google.firestore.admin.v1.Index.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Te.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Te.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.index&&Object.hasOwnProperty.call(e,"index")){e=f.google.firestore.admin.v1.Index.verify(e.index,t+1);if(e)return"index."+e}return null},Te.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.CreateIndexRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.CreateIndexRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.CreateIndexRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.index){if(!p.isObject(e.index))throw TypeError(".google.firestore.admin.v1.CreateIndexRequest.index: object expected");r.index=f.google.firestore.admin.v1.Index.fromObject(e.index,t+1)}return r},Te.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.parent="",o.index=null),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(o.parent=e.parent),null!=e.index&&Object.hasOwnProperty.call(e,"index")&&(o.index=f.google.firestore.admin.v1.Index.toObject(e.index,t,r+1)),o},Te.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Te.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.CreateIndexRequest"},Te),t.ListIndexesRequest=(ke.prototype.parent="",ke.prototype.filter="",ke.prototype.pageSize=0,ke.prototype.pageToken="",ke.create=function(e){return new ke(e)},ke.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&t.uint32(18).string(e.filter),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&t.uint32(24).int32(e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&t.uint32(34).string(e.pageToken),t},ke.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ke.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ListIndexesRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.filter=e.string();break;case 3:i.pageSize=e.int32();break;case 4:i.pageToken=e.string();break;default:e.skipType(7&a,o)}}return i},ke.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ke.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent)?"parent: string expected":null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&!p.isString(e.filter)?"filter: string expected":null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&!p.isInteger(e.pageSize)?"pageSize: integer expected":null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&!p.isString(e.pageToken)?"pageToken: string expected":null},ke.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ListIndexesRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ListIndexesRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.ListIndexesRequest;return null!=e.parent&&(t.parent=String(e.parent)),null!=e.filter&&(t.filter=String(e.filter)),null!=e.pageSize&&(t.pageSize=0|e.pageSize),null!=e.pageToken&&(t.pageToken=String(e.pageToken)),t},ke.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.parent="",r.filter="",r.pageSize=0,r.pageToken=""),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(r.parent=e.parent),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&(r.filter=e.filter),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&(r.pageSize=e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&(r.pageToken=e.pageToken),r},ke.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ke.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ListIndexesRequest"},ke),t.ListIndexesResponse=(Se.prototype.indexes=p.emptyArray,Se.prototype.nextPageToken="",Se.create=function(e){return new Se(e)},Se.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.indexes&&e.indexes.length)for(var o=0;o<e.indexes.length;++o)f.google.firestore.admin.v1.Index.encode(e.indexes[o],t.uint32(10).fork(),r+1).ldelim();return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(18).string(e.nextPageToken),t},Se.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Se.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ListIndexesResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.indexes&&i.indexes.length||(i.indexes=[]),i.indexes.push(f.google.firestore.admin.v1.Index.decode(e,e.uint32(),void 0,o+1));break;case 2:i.nextPageToken=e.string();break;default:e.skipType(7&a,o)}}return i},Se.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Se.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.indexes&&Object.hasOwnProperty.call(e,"indexes")){if(!Array.isArray(e.indexes))return"indexes: array expected";for(var r=0;r<e.indexes.length;++r){var o=f.google.firestore.admin.v1.Index.verify(e.indexes[r],t+1);if(o)return"indexes."+o}}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&!p.isString(e.nextPageToken)?"nextPageToken: string expected":null},Se.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ListIndexesResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ListIndexesResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.ListIndexesResponse;if(e.indexes){if(!Array.isArray(e.indexes))throw TypeError(".google.firestore.admin.v1.ListIndexesResponse.indexes: array expected");r.indexes=[];for(var o=0;o<e.indexes.length;++o){if(!p.isObject(e.indexes[o]))throw TypeError(".google.firestore.admin.v1.ListIndexesResponse.indexes: object expected");r.indexes[o]=f.google.firestore.admin.v1.Index.fromObject(e.indexes[o],t+1)}}return null!=e.nextPageToken&&(r.nextPageToken=String(e.nextPageToken)),r},Se.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.indexes=[]),t.defaults&&(o.nextPageToken=""),e.indexes&&e.indexes.length){o.indexes=[];for(var n=0;n<e.indexes.length;++n)o.indexes[n]=f.google.firestore.admin.v1.Index.toObject(e.indexes[n],t,r+1)}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&(o.nextPageToken=e.nextPageToken),o},Se.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Se.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ListIndexesResponse"},Se),t.GetIndexRequest=(Pe.prototype.name="",Pe.create=function(e){return new Pe(e)},Pe.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},Pe.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Pe.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.GetIndexRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},Pe.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Pe.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},Pe.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.GetIndexRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.GetIndexRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.GetIndexRequest;return null!=e.name&&(t.name=String(e.name)),t},Pe.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},Pe.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Pe.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.GetIndexRequest"},Pe),t.DeleteIndexRequest=(Ee.prototype.name="",Ee.create=function(e){return new Ee(e)},Ee.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},Ee.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ee.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.DeleteIndexRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},Ee.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ee.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},Ee.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.DeleteIndexRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.DeleteIndexRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.DeleteIndexRequest;return null!=e.name&&(t.name=String(e.name)),t},Ee.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},Ee.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ee.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.DeleteIndexRequest"},Ee),t.UpdateFieldRequest=(De.prototype.field=null,De.prototype.updateMask=null,De.create=function(e){return new De(e)},De.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.field&&Object.hasOwnProperty.call(e,"field")&&f.google.firestore.admin.v1.Field.encode(e.field,t.uint32(10).fork(),r+1).ldelim(),null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&f.google.protobuf.FieldMask.encode(e.updateMask,t.uint32(18).fork(),r+1).ldelim(),t},De.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},De.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.UpdateFieldRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.field=f.google.firestore.admin.v1.Field.decode(e,e.uint32(),void 0,o+1);break;case 2:i.updateMask=f.google.protobuf.FieldMask.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},De.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},De.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.field&&Object.hasOwnProperty.call(e,"field")&&(r=f.google.firestore.admin.v1.Field.verify(e.field,t+1)))return"field."+r;if(null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&(r=f.google.protobuf.FieldMask.verify(e.updateMask,t+1)))return"updateMask."+r;return null},De.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.UpdateFieldRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.UpdateFieldRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.UpdateFieldRequest;if(null!=e.field){if(!p.isObject(e.field))throw TypeError(".google.firestore.admin.v1.UpdateFieldRequest.field: object expected");r.field=f.google.firestore.admin.v1.Field.fromObject(e.field,t+1)}if(null!=e.updateMask){if(!p.isObject(e.updateMask))throw TypeError(".google.firestore.admin.v1.UpdateFieldRequest.updateMask: object expected");r.updateMask=f.google.protobuf.FieldMask.fromObject(e.updateMask,t+1)}return r},De.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.field=null,o.updateMask=null),null!=e.field&&Object.hasOwnProperty.call(e,"field")&&(o.field=f.google.firestore.admin.v1.Field.toObject(e.field,t,r+1)),null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&(o.updateMask=f.google.protobuf.FieldMask.toObject(e.updateMask,t,r+1)),o},De.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},De.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.UpdateFieldRequest"},De),t.GetFieldRequest=(Ie.prototype.name="",Ie.create=function(e){return new Ie(e)},Ie.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},Ie.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ie.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.GetFieldRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},Ie.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ie.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},Ie.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.GetFieldRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.GetFieldRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.GetFieldRequest;return null!=e.name&&(t.name=String(e.name)),t},Ie.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},Ie.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ie.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.GetFieldRequest"},Ie),t.ListFieldsRequest=(Re.prototype.parent="",Re.prototype.filter="",Re.prototype.pageSize=0,Re.prototype.pageToken="",Re.create=function(e){return new Re(e)},Re.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&t.uint32(18).string(e.filter),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&t.uint32(24).int32(e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&t.uint32(34).string(e.pageToken),t},Re.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Re.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ListFieldsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.filter=e.string();break;case 3:i.pageSize=e.int32();break;case 4:i.pageToken=e.string();break;default:e.skipType(7&a,o)}}return i},Re.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Re.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent)?"parent: string expected":null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&!p.isString(e.filter)?"filter: string expected":null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&!p.isInteger(e.pageSize)?"pageSize: integer expected":null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&!p.isString(e.pageToken)?"pageToken: string expected":null},Re.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ListFieldsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ListFieldsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.ListFieldsRequest;return null!=e.parent&&(t.parent=String(e.parent)),null!=e.filter&&(t.filter=String(e.filter)),null!=e.pageSize&&(t.pageSize=0|e.pageSize),null!=e.pageToken&&(t.pageToken=String(e.pageToken)),t},Re.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.parent="",r.filter="",r.pageSize=0,r.pageToken=""),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(r.parent=e.parent),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&(r.filter=e.filter),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&(r.pageSize=e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&(r.pageToken=e.pageToken),r},Re.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Re.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ListFieldsRequest"},Re),t.ListFieldsResponse=(Le.prototype.fields=p.emptyArray,Le.prototype.nextPageToken="",Le.create=function(e){return new Le(e)},Le.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.fields&&e.fields.length)for(var o=0;o<e.fields.length;++o)f.google.firestore.admin.v1.Field.encode(e.fields[o],t.uint32(10).fork(),r+1).ldelim();return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(18).string(e.nextPageToken),t},Le.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Le.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ListFieldsResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.fields&&i.fields.length||(i.fields=[]),i.fields.push(f.google.firestore.admin.v1.Field.decode(e,e.uint32(),void 0,o+1));break;case 2:i.nextPageToken=e.string();break;default:e.skipType(7&a,o)}}return i},Le.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Le.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.fields&&Object.hasOwnProperty.call(e,"fields")){if(!Array.isArray(e.fields))return"fields: array expected";for(var r=0;r<e.fields.length;++r){var o=f.google.firestore.admin.v1.Field.verify(e.fields[r],t+1);if(o)return"fields."+o}}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&!p.isString(e.nextPageToken)?"nextPageToken: string expected":null},Le.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ListFieldsResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ListFieldsResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.ListFieldsResponse;if(e.fields){if(!Array.isArray(e.fields))throw TypeError(".google.firestore.admin.v1.ListFieldsResponse.fields: array expected");r.fields=[];for(var o=0;o<e.fields.length;++o){if(!p.isObject(e.fields[o]))throw TypeError(".google.firestore.admin.v1.ListFieldsResponse.fields: object expected");r.fields[o]=f.google.firestore.admin.v1.Field.fromObject(e.fields[o],t+1)}}return null!=e.nextPageToken&&(r.nextPageToken=String(e.nextPageToken)),r},Le.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.fields=[]),t.defaults&&(o.nextPageToken=""),e.fields&&e.fields.length){o.fields=[];for(var n=0;n<e.fields.length;++n)o.fields[n]=f.google.firestore.admin.v1.Field.toObject(e.fields[n],t,r+1)}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&(o.nextPageToken=e.nextPageToken),o},Le.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Le.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ListFieldsResponse"},Le),t.ExportDocumentsRequest=(_e.prototype.name="",_e.prototype.collectionIds=p.emptyArray,_e.prototype.outputUriPrefix="",_e.prototype.namespaceIds=p.emptyArray,_e.prototype.snapshotTime=null,_e.create=function(e){return new _e(e)},_e.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.collectionIds&&e.collectionIds.length)for(var o=0;o<e.collectionIds.length;++o)t.uint32(18).string(e.collectionIds[o]);if(null!=e.outputUriPrefix&&Object.hasOwnProperty.call(e,"outputUriPrefix")&&t.uint32(26).string(e.outputUriPrefix),null!=e.namespaceIds&&e.namespaceIds.length)for(o=0;o<e.namespaceIds.length;++o)t.uint32(34).string(e.namespaceIds[o]);return null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")&&f.google.protobuf.Timestamp.encode(e.snapshotTime,t.uint32(42).fork(),r+1).ldelim(),t},_e.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},_e.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ExportDocumentsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.collectionIds&&i.collectionIds.length||(i.collectionIds=[]),i.collectionIds.push(e.string());break;case 3:i.outputUriPrefix=e.string();break;case 4:i.namespaceIds&&i.namespaceIds.length||(i.namespaceIds=[]),i.namespaceIds.push(e.string());break;case 5:i.snapshotTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},_e.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},_e.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.collectionIds&&Object.hasOwnProperty.call(e,"collectionIds")){if(!Array.isArray(e.collectionIds))return"collectionIds: array expected";for(var r=0;r<e.collectionIds.length;++r)if(!p.isString(e.collectionIds[r]))return"collectionIds: string[] expected"}if(null!=e.outputUriPrefix&&Object.hasOwnProperty.call(e,"outputUriPrefix")&&!p.isString(e.outputUriPrefix))return"outputUriPrefix: string expected";if(null!=e.namespaceIds&&Object.hasOwnProperty.call(e,"namespaceIds")){if(!Array.isArray(e.namespaceIds))return"namespaceIds: array expected";for(r=0;r<e.namespaceIds.length;++r)if(!p.isString(e.namespaceIds[r]))return"namespaceIds: string[] expected"}if(null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")){t=f.google.protobuf.Timestamp.verify(e.snapshotTime,t+1);if(t)return"snapshotTime."+t}return null},_e.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ExportDocumentsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ExportDocumentsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.ExportDocumentsRequest;if(null!=e.name&&(r.name=String(e.name)),e.collectionIds){if(!Array.isArray(e.collectionIds))throw TypeError(".google.firestore.admin.v1.ExportDocumentsRequest.collectionIds: array expected");r.collectionIds=[];for(var o=0;o<e.collectionIds.length;++o)r.collectionIds[o]=String(e.collectionIds[o])}if(null!=e.outputUriPrefix&&(r.outputUriPrefix=String(e.outputUriPrefix)),e.namespaceIds){if(!Array.isArray(e.namespaceIds))throw TypeError(".google.firestore.admin.v1.ExportDocumentsRequest.namespaceIds: array expected");r.namespaceIds=[];for(o=0;o<e.namespaceIds.length;++o)r.namespaceIds[o]=String(e.namespaceIds[o])}if(null!=e.snapshotTime){if(!p.isObject(e.snapshotTime))throw TypeError(".google.firestore.admin.v1.ExportDocumentsRequest.snapshotTime: object expected");r.snapshotTime=f.google.protobuf.Timestamp.fromObject(e.snapshotTime,t+1)}return r},_e.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.collectionIds=[],o.namespaceIds=[]),t.defaults&&(o.name="",o.outputUriPrefix="",o.snapshotTime=null),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),e.collectionIds&&e.collectionIds.length){o.collectionIds=[];for(var n=0;n<e.collectionIds.length;++n)o.collectionIds[n]=e.collectionIds[n]}if(null!=e.outputUriPrefix&&Object.hasOwnProperty.call(e,"outputUriPrefix")&&(o.outputUriPrefix=e.outputUriPrefix),e.namespaceIds&&e.namespaceIds.length){o.namespaceIds=[];for(n=0;n<e.namespaceIds.length;++n)o.namespaceIds[n]=e.namespaceIds[n]}return null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")&&(o.snapshotTime=f.google.protobuf.Timestamp.toObject(e.snapshotTime,t,r+1)),o},_e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},_e.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ExportDocumentsRequest"},_e),t.ImportDocumentsRequest=(Ce.prototype.name="",Ce.prototype.collectionIds=p.emptyArray,Ce.prototype.inputUriPrefix="",Ce.prototype.namespaceIds=p.emptyArray,Ce.create=function(e){return new Ce(e)},Ce.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.collectionIds&&e.collectionIds.length)for(var o=0;o<e.collectionIds.length;++o)t.uint32(18).string(e.collectionIds[o]);if(null!=e.inputUriPrefix&&Object.hasOwnProperty.call(e,"inputUriPrefix")&&t.uint32(26).string(e.inputUriPrefix),null!=e.namespaceIds&&e.namespaceIds.length)for(o=0;o<e.namespaceIds.length;++o)t.uint32(34).string(e.namespaceIds[o]);return t},Ce.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ce.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ImportDocumentsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.collectionIds&&i.collectionIds.length||(i.collectionIds=[]),i.collectionIds.push(e.string());break;case 3:i.inputUriPrefix=e.string();break;case 4:i.namespaceIds&&i.namespaceIds.length||(i.namespaceIds=[]),i.namespaceIds.push(e.string());break;default:e.skipType(7&a,o)}}return i},Ce.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ce.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.collectionIds&&Object.hasOwnProperty.call(e,"collectionIds")){if(!Array.isArray(e.collectionIds))return"collectionIds: array expected";for(var r=0;r<e.collectionIds.length;++r)if(!p.isString(e.collectionIds[r]))return"collectionIds: string[] expected"}if(null!=e.inputUriPrefix&&Object.hasOwnProperty.call(e,"inputUriPrefix")&&!p.isString(e.inputUriPrefix))return"inputUriPrefix: string expected";if(null!=e.namespaceIds&&Object.hasOwnProperty.call(e,"namespaceIds")){if(!Array.isArray(e.namespaceIds))return"namespaceIds: array expected";for(r=0;r<e.namespaceIds.length;++r)if(!p.isString(e.namespaceIds[r]))return"namespaceIds: string[] expected"}return null},Ce.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ImportDocumentsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ImportDocumentsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.ImportDocumentsRequest;if(null!=e.name&&(r.name=String(e.name)),e.collectionIds){if(!Array.isArray(e.collectionIds))throw TypeError(".google.firestore.admin.v1.ImportDocumentsRequest.collectionIds: array expected");r.collectionIds=[];for(var o=0;o<e.collectionIds.length;++o)r.collectionIds[o]=String(e.collectionIds[o])}if(null!=e.inputUriPrefix&&(r.inputUriPrefix=String(e.inputUriPrefix)),e.namespaceIds){if(!Array.isArray(e.namespaceIds))throw TypeError(".google.firestore.admin.v1.ImportDocumentsRequest.namespaceIds: array expected");r.namespaceIds=[];for(o=0;o<e.namespaceIds.length;++o)r.namespaceIds[o]=String(e.namespaceIds[o])}return r},Ce.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.collectionIds=[],o.namespaceIds=[]),t.defaults&&(o.name="",o.inputUriPrefix=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),e.collectionIds&&e.collectionIds.length){o.collectionIds=[];for(var n=0;n<e.collectionIds.length;++n)o.collectionIds[n]=e.collectionIds[n]}if(null!=e.inputUriPrefix&&Object.hasOwnProperty.call(e,"inputUriPrefix")&&(o.inputUriPrefix=e.inputUriPrefix),e.namespaceIds&&e.namespaceIds.length){o.namespaceIds=[];for(n=0;n<e.namespaceIds.length;++n)o.namespaceIds[n]=e.namespaceIds[n]}return o},Ce.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ce.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ImportDocumentsRequest"},Ce),t.BulkDeleteDocumentsRequest=(Ne.prototype.name="",Ne.prototype.collectionIds=p.emptyArray,Ne.prototype.namespaceIds=p.emptyArray,Ne.create=function(e){return new Ne(e)},Ne.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.collectionIds&&e.collectionIds.length)for(var o=0;o<e.collectionIds.length;++o)t.uint32(18).string(e.collectionIds[o]);if(null!=e.namespaceIds&&e.namespaceIds.length)for(o=0;o<e.namespaceIds.length;++o)t.uint32(26).string(e.namespaceIds[o]);return t},Ne.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ne.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.BulkDeleteDocumentsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.collectionIds&&i.collectionIds.length||(i.collectionIds=[]),i.collectionIds.push(e.string());break;case 3:i.namespaceIds&&i.namespaceIds.length||(i.namespaceIds=[]),i.namespaceIds.push(e.string());break;default:e.skipType(7&a,o)}}return i},Ne.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ne.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.collectionIds&&Object.hasOwnProperty.call(e,"collectionIds")){if(!Array.isArray(e.collectionIds))return"collectionIds: array expected";for(var r=0;r<e.collectionIds.length;++r)if(!p.isString(e.collectionIds[r]))return"collectionIds: string[] expected"}if(null!=e.namespaceIds&&Object.hasOwnProperty.call(e,"namespaceIds")){if(!Array.isArray(e.namespaceIds))return"namespaceIds: array expected";for(r=0;r<e.namespaceIds.length;++r)if(!p.isString(e.namespaceIds[r]))return"namespaceIds: string[] expected"}return null},Ne.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.BulkDeleteDocumentsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.BulkDeleteDocumentsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.BulkDeleteDocumentsRequest;if(null!=e.name&&(r.name=String(e.name)),e.collectionIds){if(!Array.isArray(e.collectionIds))throw TypeError(".google.firestore.admin.v1.BulkDeleteDocumentsRequest.collectionIds: array expected");r.collectionIds=[];for(var o=0;o<e.collectionIds.length;++o)r.collectionIds[o]=String(e.collectionIds[o])}if(e.namespaceIds){if(!Array.isArray(e.namespaceIds))throw TypeError(".google.firestore.admin.v1.BulkDeleteDocumentsRequest.namespaceIds: array expected");r.namespaceIds=[];for(o=0;o<e.namespaceIds.length;++o)r.namespaceIds[o]=String(e.namespaceIds[o])}return r},Ne.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.collectionIds=[],o.namespaceIds=[]),t.defaults&&(o.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),e.collectionIds&&e.collectionIds.length){o.collectionIds=[];for(var n=0;n<e.collectionIds.length;++n)o.collectionIds[n]=e.collectionIds[n]}if(e.namespaceIds&&e.namespaceIds.length){o.namespaceIds=[];for(n=0;n<e.namespaceIds.length;++n)o.namespaceIds[n]=e.namespaceIds[n]}return o},Ne.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ne.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.BulkDeleteDocumentsRequest"},Ne),t.BulkDeleteDocumentsResponse=(Ae.create=function(e){return new Ae(e)},Ae.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return t},Ae.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ae.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,t=new f.google.firestore.admin.v1.BulkDeleteDocumentsResponse;e.pos<n;){var i=e.uint32();if(i===r)break;e.skipType(7&i,o)}return t},Ae.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ae.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null},Ae.fromObject=function(e,t){return e instanceof f.google.firestore.admin.v1.BulkDeleteDocumentsResponse?e:new f.google.firestore.admin.v1.BulkDeleteDocumentsResponse},Ae.toObject=function(){return{}},Ae.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ae.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.BulkDeleteDocumentsResponse"},Ae),t.GetBackupRequest=(Fe.prototype.name="",Fe.create=function(e){return new Fe(e)},Fe.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},Fe.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Fe.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.GetBackupRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},Fe.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Fe.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},Fe.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.GetBackupRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.GetBackupRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.GetBackupRequest;return null!=e.name&&(t.name=String(e.name)),t},Fe.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},Fe.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Fe.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.GetBackupRequest"},Fe),t.ListBackupsRequest=(Ve.prototype.parent="",Ve.prototype.filter="",Ve.create=function(e){return new Ve(e)},Ve.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&t.uint32(18).string(e.filter),t},Ve.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ve.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ListBackupsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.filter=e.string();break;default:e.skipType(7&a,o)}}return i},Ve.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ve.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent)?"parent: string expected":null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&!p.isString(e.filter)?"filter: string expected":null},Ve.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ListBackupsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ListBackupsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.ListBackupsRequest;return null!=e.parent&&(t.parent=String(e.parent)),null!=e.filter&&(t.filter=String(e.filter)),t},Ve.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.parent="",r.filter=""),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(r.parent=e.parent),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&(r.filter=e.filter),r},Ve.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ve.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ListBackupsRequest"},Ve),t.ListBackupsResponse=(Ue.prototype.backups=p.emptyArray,Ue.prototype.unreachable=p.emptyArray,Ue.create=function(e){return new Ue(e)},Ue.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.backups&&e.backups.length)for(var o=0;o<e.backups.length;++o)f.google.firestore.admin.v1.Backup.encode(e.backups[o],t.uint32(10).fork(),r+1).ldelim();if(null!=e.unreachable&&e.unreachable.length)for(o=0;o<e.unreachable.length;++o)t.uint32(26).string(e.unreachable[o]);return t},Ue.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ue.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ListBackupsResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.backups&&i.backups.length||(i.backups=[]),i.backups.push(f.google.firestore.admin.v1.Backup.decode(e,e.uint32(),void 0,o+1));break;case 3:i.unreachable&&i.unreachable.length||(i.unreachable=[]),i.unreachable.push(e.string());break;default:e.skipType(7&a,o)}}return i},Ue.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ue.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.backups&&Object.hasOwnProperty.call(e,"backups")){if(!Array.isArray(e.backups))return"backups: array expected";for(var r=0;r<e.backups.length;++r){var o=f.google.firestore.admin.v1.Backup.verify(e.backups[r],t+1);if(o)return"backups."+o}}if(null!=e.unreachable&&Object.hasOwnProperty.call(e,"unreachable")){if(!Array.isArray(e.unreachable))return"unreachable: array expected";for(r=0;r<e.unreachable.length;++r)if(!p.isString(e.unreachable[r]))return"unreachable: string[] expected"}return null},Ue.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ListBackupsResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ListBackupsResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.ListBackupsResponse;if(e.backups){if(!Array.isArray(e.backups))throw TypeError(".google.firestore.admin.v1.ListBackupsResponse.backups: array expected");r.backups=[];for(var o=0;o<e.backups.length;++o){if(!p.isObject(e.backups[o]))throw TypeError(".google.firestore.admin.v1.ListBackupsResponse.backups: object expected");r.backups[o]=f.google.firestore.admin.v1.Backup.fromObject(e.backups[o],t+1)}}if(e.unreachable){if(!Array.isArray(e.unreachable))throw TypeError(".google.firestore.admin.v1.ListBackupsResponse.unreachable: array expected");r.unreachable=[];for(o=0;o<e.unreachable.length;++o)r.unreachable[o]=String(e.unreachable[o])}return r},Ue.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.backups=[],o.unreachable=[]),e.backups&&e.backups.length){o.backups=[];for(var n=0;n<e.backups.length;++n)o.backups[n]=f.google.firestore.admin.v1.Backup.toObject(e.backups[n],t,r+1)}if(e.unreachable&&e.unreachable.length){o.unreachable=[];for(n=0;n<e.unreachable.length;++n)o.unreachable[n]=e.unreachable[n]}return o},Ue.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ue.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ListBackupsResponse"},Ue),t.DeleteBackupRequest=(Be.prototype.name="",Be.create=function(e){return new Be(e)},Be.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},Be.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Be.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.DeleteBackupRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},Be.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Be.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},Be.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.DeleteBackupRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.DeleteBackupRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.DeleteBackupRequest;return null!=e.name&&(t.name=String(e.name)),t},Be.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},Be.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Be.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.DeleteBackupRequest"},Be),t.RestoreDatabaseRequest=(Me.prototype.parent="",Me.prototype.databaseId="",Me.prototype.backup="",Me.prototype.encryptionConfig=null,Me.prototype.tags=p.emptyObject,Me.create=function(e){return new Me(e)},Me.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.databaseId&&Object.hasOwnProperty.call(e,"databaseId")&&t.uint32(18).string(e.databaseId),null!=e.backup&&Object.hasOwnProperty.call(e,"backup")&&t.uint32(26).string(e.backup),null!=e.encryptionConfig&&Object.hasOwnProperty.call(e,"encryptionConfig")&&f.google.firestore.admin.v1.Database.EncryptionConfig.encode(e.encryptionConfig,t.uint32(74).fork(),r+1).ldelim(),null!=e.tags&&Object.hasOwnProperty.call(e,"tags"))for(var o=Object.keys(e.tags),n=0;n<o.length;++n)t.uint32(82).fork().uint32(10).string(o[n]).uint32(18).string(e.tags[o[n]]).ldelim();return t},Me.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Me.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.RestoreDatabaseRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.databaseId=e.string();break;case 3:i.backup=e.string();break;case 9:i.encryptionConfig=f.google.firestore.admin.v1.Database.EncryptionConfig.decode(e,e.uint32(),void 0,o+1);break;case 10:i.tags===p.emptyObject&&(i.tags={});for(var s=e.uint32()+e.pos,l="",c="";e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=e.string();break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.tags,l),i.tags[l]=c;break;default:e.skipType(7&a,o)}}return i},Me.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Me.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.databaseId&&Object.hasOwnProperty.call(e,"databaseId")&&!p.isString(e.databaseId))return"databaseId: string expected";if(null!=e.backup&&Object.hasOwnProperty.call(e,"backup")&&!p.isString(e.backup))return"backup: string expected";if(null!=e.encryptionConfig&&Object.hasOwnProperty.call(e,"encryptionConfig")){t=f.google.firestore.admin.v1.Database.EncryptionConfig.verify(e.encryptionConfig,t+1);if(t)return"encryptionConfig."+t}if(null!=e.tags&&Object.hasOwnProperty.call(e,"tags")){if(!p.isObject(e.tags))return"tags: object expected";for(var r=Object.keys(e.tags),o=0;o<r.length;++o)if(!p.isString(e.tags[r[o]]))return"tags: string{k:string} expected"}return null},Me.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.RestoreDatabaseRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.RestoreDatabaseRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.RestoreDatabaseRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.databaseId&&(r.databaseId=String(e.databaseId)),null!=e.backup&&(r.backup=String(e.backup)),null!=e.encryptionConfig){if(!p.isObject(e.encryptionConfig))throw TypeError(".google.firestore.admin.v1.RestoreDatabaseRequest.encryptionConfig: object expected");r.encryptionConfig=f.google.firestore.admin.v1.Database.EncryptionConfig.fromObject(e.encryptionConfig,t+1)}if(e.tags){if(!p.isObject(e.tags))throw TypeError(".google.firestore.admin.v1.RestoreDatabaseRequest.tags: object expected");r.tags={};for(var o=Object.keys(e.tags),n=0;n<o.length;++n)"__proto__"===o[n]&&p.makeProp(r.tags,o[n]),r.tags[o[n]]=String(e.tags[o[n]])}return r},Me.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.objects||t.defaults)&&(n.tags={}),t.defaults&&(n.parent="",n.databaseId="",n.backup="",n.encryptionConfig=null),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(n.parent=e.parent),null!=e.databaseId&&Object.hasOwnProperty.call(e,"databaseId")&&(n.databaseId=e.databaseId),null!=e.backup&&Object.hasOwnProperty.call(e,"backup")&&(n.backup=e.backup),null!=e.encryptionConfig&&Object.hasOwnProperty.call(e,"encryptionConfig")&&(n.encryptionConfig=f.google.firestore.admin.v1.Database.EncryptionConfig.toObject(e.encryptionConfig,t,r+1)),e.tags&&(o=Object.keys(e.tags)).length){n.tags={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.tags,o[i]),n.tags[o[i]]=e.tags[o[i]]}return n},Me.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Me.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.RestoreDatabaseRequest"},Me),t.CloneDatabaseRequest=(qe.prototype.parent="",qe.prototype.databaseId="",qe.prototype.pitrSnapshot=null,qe.prototype.encryptionConfig=null,qe.prototype.tags=p.emptyObject,qe.create=function(e){return new qe(e)},qe.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.databaseId&&Object.hasOwnProperty.call(e,"databaseId")&&t.uint32(18).string(e.databaseId),null!=e.encryptionConfig&&Object.hasOwnProperty.call(e,"encryptionConfig")&&f.google.firestore.admin.v1.Database.EncryptionConfig.encode(e.encryptionConfig,t.uint32(34).fork(),r+1).ldelim(),null!=e.tags&&Object.hasOwnProperty.call(e,"tags"))for(var o=Object.keys(e.tags),n=0;n<o.length;++n)t.uint32(42).fork().uint32(10).string(o[n]).uint32(18).string(e.tags[o[n]]).ldelim();return null!=e.pitrSnapshot&&Object.hasOwnProperty.call(e,"pitrSnapshot")&&f.google.firestore.admin.v1.PitrSnapshot.encode(e.pitrSnapshot,t.uint32(50).fork(),r+1).ldelim(),t},qe.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},qe.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.CloneDatabaseRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.databaseId=e.string();break;case 6:i.pitrSnapshot=f.google.firestore.admin.v1.PitrSnapshot.decode(e,e.uint32(),void 0,o+1);break;case 4:i.encryptionConfig=f.google.firestore.admin.v1.Database.EncryptionConfig.decode(e,e.uint32(),void 0,o+1);break;case 5:i.tags===p.emptyObject&&(i.tags={});for(var s=e.uint32()+e.pos,l="",c="";e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=e.string();break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.tags,l),i.tags[l]=c;break;default:e.skipType(7&a,o)}}return i},qe.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},qe.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.databaseId&&Object.hasOwnProperty.call(e,"databaseId")&&!p.isString(e.databaseId))return"databaseId: string expected";var r;if(null!=e.pitrSnapshot&&Object.hasOwnProperty.call(e,"pitrSnapshot")&&(r=f.google.firestore.admin.v1.PitrSnapshot.verify(e.pitrSnapshot,t+1)))return"pitrSnapshot."+r;if(null!=e.encryptionConfig&&Object.hasOwnProperty.call(e,"encryptionConfig")&&(r=f.google.firestore.admin.v1.Database.EncryptionConfig.verify(e.encryptionConfig,t+1)))return"encryptionConfig."+r;if(null!=e.tags&&Object.hasOwnProperty.call(e,"tags")){if(!p.isObject(e.tags))return"tags: object expected";for(var o=Object.keys(e.tags),n=0;n<o.length;++n)if(!p.isString(e.tags[o[n]]))return"tags: string{k:string} expected"}return null},qe.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.CloneDatabaseRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.CloneDatabaseRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.CloneDatabaseRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.databaseId&&(r.databaseId=String(e.databaseId)),null!=e.pitrSnapshot){if(!p.isObject(e.pitrSnapshot))throw TypeError(".google.firestore.admin.v1.CloneDatabaseRequest.pitrSnapshot: object expected");r.pitrSnapshot=f.google.firestore.admin.v1.PitrSnapshot.fromObject(e.pitrSnapshot,t+1)}if(null!=e.encryptionConfig){if(!p.isObject(e.encryptionConfig))throw TypeError(".google.firestore.admin.v1.CloneDatabaseRequest.encryptionConfig: object expected");r.encryptionConfig=f.google.firestore.admin.v1.Database.EncryptionConfig.fromObject(e.encryptionConfig,t+1)}if(e.tags){if(!p.isObject(e.tags))throw TypeError(".google.firestore.admin.v1.CloneDatabaseRequest.tags: object expected");r.tags={};for(var o=Object.keys(e.tags),n=0;n<o.length;++n)"__proto__"===o[n]&&p.makeProp(r.tags,o[n]),r.tags[o[n]]=String(e.tags[o[n]])}return r},qe.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.objects||t.defaults)&&(n.tags={}),t.defaults&&(n.parent="",n.databaseId="",n.encryptionConfig=null,n.pitrSnapshot=null),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(n.parent=e.parent),null!=e.databaseId&&Object.hasOwnProperty.call(e,"databaseId")&&(n.databaseId=e.databaseId),null!=e.encryptionConfig&&Object.hasOwnProperty.call(e,"encryptionConfig")&&(n.encryptionConfig=f.google.firestore.admin.v1.Database.EncryptionConfig.toObject(e.encryptionConfig,t,r+1)),e.tags&&(o=Object.keys(e.tags)).length){n.tags={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.tags,o[i]),n.tags[o[i]]=e.tags[o[i]]}return null!=e.pitrSnapshot&&Object.hasOwnProperty.call(e,"pitrSnapshot")&&(n.pitrSnapshot=f.google.firestore.admin.v1.PitrSnapshot.toObject(e.pitrSnapshot,t,r+1)),n},qe.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},qe.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.CloneDatabaseRequest"},qe),t.IndexOperationMetadata=(Qe.prototype.startTime=null,Qe.prototype.endTime=null,Qe.prototype.index="",Qe.prototype.state=0,Qe.prototype.progressDocuments=null,Qe.prototype.progressBytes=null,Qe.create=function(e){return new Qe(e)},Qe.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&f.google.protobuf.Timestamp.encode(e.startTime,t.uint32(10).fork(),r+1).ldelim(),null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&f.google.protobuf.Timestamp.encode(e.endTime,t.uint32(18).fork(),r+1).ldelim(),null!=e.index&&Object.hasOwnProperty.call(e,"index")&&t.uint32(26).string(e.index),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(32).int32(e.state),null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&f.google.firestore.admin.v1.Progress.encode(e.progressDocuments,t.uint32(42).fork(),r+1).ldelim(),null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&f.google.firestore.admin.v1.Progress.encode(e.progressBytes,t.uint32(50).fork(),r+1).ldelim(),t},Qe.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Qe.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.IndexOperationMetadata;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.startTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 2:i.endTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 3:i.index=e.string();break;case 4:i.state=e.int32();break;case 5:i.progressDocuments=f.google.firestore.admin.v1.Progress.decode(e,e.uint32(),void 0,o+1);break;case 6:i.progressBytes=f.google.firestore.admin.v1.Progress.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Qe.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Qe.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&(r=f.google.protobuf.Timestamp.verify(e.startTime,t+1)))return"startTime."+r;if(null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&(r=f.google.protobuf.Timestamp.verify(e.endTime,t+1)))return"endTime."+r;if(null!=e.index&&Object.hasOwnProperty.call(e,"index")&&!p.isString(e.index))return"index: string expected";if(null!=e.state&&Object.hasOwnProperty.call(e,"state"))switch(e.state){default:return"state: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}if(null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&(r=f.google.firestore.admin.v1.Progress.verify(e.progressDocuments,t+1)))return"progressDocuments."+r;if(null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&(r=f.google.firestore.admin.v1.Progress.verify(e.progressBytes,t+1)))return"progressBytes."+r;return null},Qe.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.IndexOperationMetadata)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.IndexOperationMetadata: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.IndexOperationMetadata;if(null!=e.startTime){if(!p.isObject(e.startTime))throw TypeError(".google.firestore.admin.v1.IndexOperationMetadata.startTime: object expected");r.startTime=f.google.protobuf.Timestamp.fromObject(e.startTime,t+1)}if(null!=e.endTime){if(!p.isObject(e.endTime))throw TypeError(".google.firestore.admin.v1.IndexOperationMetadata.endTime: object expected");r.endTime=f.google.protobuf.Timestamp.fromObject(e.endTime,t+1)}switch(null!=e.index&&(r.index=String(e.index)),e.state){default:"number"==typeof e.state&&(r.state=e.state);break;case"OPERATION_STATE_UNSPECIFIED":case 0:r.state=0;break;case"INITIALIZING":case 1:r.state=1;break;case"PROCESSING":case 2:r.state=2;break;case"CANCELLING":case 3:r.state=3;break;case"FINALIZING":case 4:r.state=4;break;case"SUCCESSFUL":case 5:r.state=5;break;case"FAILED":case 6:r.state=6;break;case"CANCELLED":case 7:r.state=7}if(null!=e.progressDocuments){if(!p.isObject(e.progressDocuments))throw TypeError(".google.firestore.admin.v1.IndexOperationMetadata.progressDocuments: object expected");r.progressDocuments=f.google.firestore.admin.v1.Progress.fromObject(e.progressDocuments,t+1)}if(null!=e.progressBytes){if(!p.isObject(e.progressBytes))throw TypeError(".google.firestore.admin.v1.IndexOperationMetadata.progressBytes: object expected");r.progressBytes=f.google.firestore.admin.v1.Progress.fromObject(e.progressBytes,t+1)}return r},Qe.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.startTime=null,o.endTime=null,o.index="",o.state=t.enums===String?"OPERATION_STATE_UNSPECIFIED":0,o.progressDocuments=null,o.progressBytes=null),null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&(o.startTime=f.google.protobuf.Timestamp.toObject(e.startTime,t,r+1)),null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&(o.endTime=f.google.protobuf.Timestamp.toObject(e.endTime,t,r+1)),null!=e.index&&Object.hasOwnProperty.call(e,"index")&&(o.index=e.index),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&(o.state=t.enums!==String||void 0===f.google.firestore.admin.v1.OperationState[e.state]?e.state:f.google.firestore.admin.v1.OperationState[e.state]),null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&(o.progressDocuments=f.google.firestore.admin.v1.Progress.toObject(e.progressDocuments,t,r+1)),null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&(o.progressBytes=f.google.firestore.admin.v1.Progress.toObject(e.progressBytes,t,r+1)),o},Qe.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Qe.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.IndexOperationMetadata"},Qe),t.FieldOperationMetadata=(m.prototype.startTime=null,m.prototype.endTime=null,m.prototype.field="",m.prototype.indexConfigDeltas=p.emptyArray,m.prototype.state=0,m.prototype.progressDocuments=null,m.prototype.progressBytes=null,m.prototype.ttlConfigDelta=null,m.create=function(e){return new m(e)},m.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&f.google.protobuf.Timestamp.encode(e.startTime,t.uint32(10).fork(),r+1).ldelim(),null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&f.google.protobuf.Timestamp.encode(e.endTime,t.uint32(18).fork(),r+1).ldelim(),null!=e.field&&Object.hasOwnProperty.call(e,"field")&&t.uint32(26).string(e.field),null!=e.indexConfigDeltas&&e.indexConfigDeltas.length)for(var o=0;o<e.indexConfigDeltas.length;++o)f.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.encode(e.indexConfigDeltas[o],t.uint32(34).fork(),r+1).ldelim();return null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(40).int32(e.state),null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&f.google.firestore.admin.v1.Progress.encode(e.progressDocuments,t.uint32(50).fork(),r+1).ldelim(),null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&f.google.firestore.admin.v1.Progress.encode(e.progressBytes,t.uint32(58).fork(),r+1).ldelim(),null!=e.ttlConfigDelta&&Object.hasOwnProperty.call(e,"ttlConfigDelta")&&f.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.encode(e.ttlConfigDelta,t.uint32(66).fork(),r+1).ldelim(),t},m.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},m.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.FieldOperationMetadata;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.startTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 2:i.endTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 3:i.field=e.string();break;case 4:i.indexConfigDeltas&&i.indexConfigDeltas.length||(i.indexConfigDeltas=[]),i.indexConfigDeltas.push(f.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.decode(e,e.uint32(),void 0,o+1));break;case 5:i.state=e.int32();break;case 6:i.progressDocuments=f.google.firestore.admin.v1.Progress.decode(e,e.uint32(),void 0,o+1);break;case 7:i.progressBytes=f.google.firestore.admin.v1.Progress.decode(e,e.uint32(),void 0,o+1);break;case 8:i.ttlConfigDelta=f.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},m.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},m.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&(r=f.google.protobuf.Timestamp.verify(e.startTime,t+1)))return"startTime."+r;if(null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&(r=f.google.protobuf.Timestamp.verify(e.endTime,t+1)))return"endTime."+r;if(null!=e.field&&Object.hasOwnProperty.call(e,"field")&&!p.isString(e.field))return"field: string expected";if(null!=e.indexConfigDeltas&&Object.hasOwnProperty.call(e,"indexConfigDeltas")){if(!Array.isArray(e.indexConfigDeltas))return"indexConfigDeltas: array expected";for(var r,o=0;o<e.indexConfigDeltas.length;++o)if(r=f.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.verify(e.indexConfigDeltas[o],t+1))return"indexConfigDeltas."+r}if(null!=e.state&&Object.hasOwnProperty.call(e,"state"))switch(e.state){default:return"state: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}if(null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&(r=f.google.firestore.admin.v1.Progress.verify(e.progressDocuments,t+1)))return"progressDocuments."+r;if(null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&(r=f.google.firestore.admin.v1.Progress.verify(e.progressBytes,t+1)))return"progressBytes."+r;if(null!=e.ttlConfigDelta&&Object.hasOwnProperty.call(e,"ttlConfigDelta")&&(r=f.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.verify(e.ttlConfigDelta,t+1)))return"ttlConfigDelta."+r;return null},m.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.FieldOperationMetadata)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.FieldOperationMetadata;if(null!=e.startTime){if(!p.isObject(e.startTime))throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.startTime: object expected");r.startTime=f.google.protobuf.Timestamp.fromObject(e.startTime,t+1)}if(null!=e.endTime){if(!p.isObject(e.endTime))throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.endTime: object expected");r.endTime=f.google.protobuf.Timestamp.fromObject(e.endTime,t+1)}if(null!=e.field&&(r.field=String(e.field)),e.indexConfigDeltas){if(!Array.isArray(e.indexConfigDeltas))throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.indexConfigDeltas: array expected");r.indexConfigDeltas=[];for(var o=0;o<e.indexConfigDeltas.length;++o){if(!p.isObject(e.indexConfigDeltas[o]))throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.indexConfigDeltas: object expected");r.indexConfigDeltas[o]=f.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.fromObject(e.indexConfigDeltas[o],t+1)}}switch(e.state){default:"number"==typeof e.state&&(r.state=e.state);break;case"OPERATION_STATE_UNSPECIFIED":case 0:r.state=0;break;case"INITIALIZING":case 1:r.state=1;break;case"PROCESSING":case 2:r.state=2;break;case"CANCELLING":case 3:r.state=3;break;case"FINALIZING":case 4:r.state=4;break;case"SUCCESSFUL":case 5:r.state=5;break;case"FAILED":case 6:r.state=6;break;case"CANCELLED":case 7:r.state=7}if(null!=e.progressDocuments){if(!p.isObject(e.progressDocuments))throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.progressDocuments: object expected");r.progressDocuments=f.google.firestore.admin.v1.Progress.fromObject(e.progressDocuments,t+1)}if(null!=e.progressBytes){if(!p.isObject(e.progressBytes))throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.progressBytes: object expected");r.progressBytes=f.google.firestore.admin.v1.Progress.fromObject(e.progressBytes,t+1)}if(null!=e.ttlConfigDelta){if(!p.isObject(e.ttlConfigDelta))throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.ttlConfigDelta: object expected");r.ttlConfigDelta=f.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.fromObject(e.ttlConfigDelta,t+1)}return r},m.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.indexConfigDeltas=[]),t.defaults&&(o.startTime=null,o.endTime=null,o.field="",o.state=t.enums===String?"OPERATION_STATE_UNSPECIFIED":0,o.progressDocuments=null,o.progressBytes=null,o.ttlConfigDelta=null),null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&(o.startTime=f.google.protobuf.Timestamp.toObject(e.startTime,t,r+1)),null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&(o.endTime=f.google.protobuf.Timestamp.toObject(e.endTime,t,r+1)),null!=e.field&&Object.hasOwnProperty.call(e,"field")&&(o.field=e.field),e.indexConfigDeltas&&e.indexConfigDeltas.length){o.indexConfigDeltas=[];for(var n=0;n<e.indexConfigDeltas.length;++n)o.indexConfigDeltas[n]=f.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.toObject(e.indexConfigDeltas[n],t,r+1)}return null!=e.state&&Object.hasOwnProperty.call(e,"state")&&(o.state=t.enums!==String||void 0===f.google.firestore.admin.v1.OperationState[e.state]?e.state:f.google.firestore.admin.v1.OperationState[e.state]),null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&(o.progressDocuments=f.google.firestore.admin.v1.Progress.toObject(e.progressDocuments,t,r+1)),null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&(o.progressBytes=f.google.firestore.admin.v1.Progress.toObject(e.progressBytes,t,r+1)),null!=e.ttlConfigDelta&&Object.hasOwnProperty.call(e,"ttlConfigDelta")&&(o.ttlConfigDelta=f.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.toObject(e.ttlConfigDelta,t,r+1)),o},m.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},m.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.FieldOperationMetadata"},m.IndexConfigDelta=(Je.prototype.changeType=0,Je.prototype.index=null,Je.create=function(e){return new Je(e)},Je.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.changeType&&Object.hasOwnProperty.call(e,"changeType")&&t.uint32(8).int32(e.changeType),null!=e.index&&Object.hasOwnProperty.call(e,"index")&&f.google.firestore.admin.v1.Index.encode(e.index,t.uint32(18).fork(),r+1).ldelim(),t},Je.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Je.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.changeType=e.int32();break;case 2:i.index=f.google.firestore.admin.v1.Index.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Je.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Je.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.changeType&&Object.hasOwnProperty.call(e,"changeType"))switch(e.changeType){default:return"changeType: enum value expected";case 0:case 1:case 2:}if(null!=e.index&&Object.hasOwnProperty.call(e,"index")){e=f.google.firestore.admin.v1.Index.verify(e.index,t+1);if(e)return"index."+e}return null},Je.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta;switch(e.changeType){default:"number"==typeof e.changeType&&(r.changeType=e.changeType);break;case"CHANGE_TYPE_UNSPECIFIED":case 0:r.changeType=0;break;case"ADD":case 1:r.changeType=1;break;case"REMOVE":case 2:r.changeType=2}if(null!=e.index){if(!p.isObject(e.index))throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.index: object expected");r.index=f.google.firestore.admin.v1.Index.fromObject(e.index,t+1)}return r},Je.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.changeType=t.enums===String?"CHANGE_TYPE_UNSPECIFIED":0,o.index=null),null!=e.changeType&&Object.hasOwnProperty.call(e,"changeType")&&(o.changeType=t.enums!==String||void 0===f.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType[e.changeType]?e.changeType:f.google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta.ChangeType[e.changeType]),null!=e.index&&Object.hasOwnProperty.call(e,"index")&&(o.index=f.google.firestore.admin.v1.Index.toObject(e.index,t,r+1)),o},Je.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Je.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta"},Je.ChangeType=(e={},(i=Object.create(e))[e[0]="CHANGE_TYPE_UNSPECIFIED"]=0,i[e[1]="ADD"]=1,i[e[2]="REMOVE"]=2,i),Je),m.TtlConfigDelta=(Ge.prototype.changeType=0,Ge.prototype.expirationOffset=null,Ge.create=function(e){return new Ge(e)},Ge.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.changeType&&Object.hasOwnProperty.call(e,"changeType")&&t.uint32(8).int32(e.changeType),null!=e.expirationOffset&&Object.hasOwnProperty.call(e,"expirationOffset")&&f.google.protobuf.Duration.encode(e.expirationOffset,t.uint32(26).fork(),r+1).ldelim(),t},Ge.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ge.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.changeType=e.int32();break;case 3:i.expirationOffset=f.google.protobuf.Duration.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Ge.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ge.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.changeType&&Object.hasOwnProperty.call(e,"changeType"))switch(e.changeType){default:return"changeType: enum value expected";case 0:case 1:case 2:}if(null!=e.expirationOffset&&Object.hasOwnProperty.call(e,"expirationOffset")){e=f.google.protobuf.Duration.verify(e.expirationOffset,t+1);if(e)return"expirationOffset."+e}return null},Ge.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta;switch(e.changeType){default:"number"==typeof e.changeType&&(r.changeType=e.changeType);break;case"CHANGE_TYPE_UNSPECIFIED":case 0:r.changeType=0;break;case"ADD":case 1:r.changeType=1;break;case"REMOVE":case 2:r.changeType=2}if(null!=e.expirationOffset){if(!p.isObject(e.expirationOffset))throw TypeError(".google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.expirationOffset: object expected");r.expirationOffset=f.google.protobuf.Duration.fromObject(e.expirationOffset,t+1)}return r},Ge.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.changeType=t.enums===String?"CHANGE_TYPE_UNSPECIFIED":0,o.expirationOffset=null),null!=e.changeType&&Object.hasOwnProperty.call(e,"changeType")&&(o.changeType=t.enums!==String||void 0===f.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType[e.changeType]?e.changeType:f.google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta.ChangeType[e.changeType]),null!=e.expirationOffset&&Object.hasOwnProperty.call(e,"expirationOffset")&&(o.expirationOffset=f.google.protobuf.Duration.toObject(e.expirationOffset,t,r+1)),o},Ge.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ge.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.FieldOperationMetadata.TtlConfigDelta"},Ge.ChangeType=(e={},(i=Object.create(e))[e[0]="CHANGE_TYPE_UNSPECIFIED"]=0,i[e[1]="ADD"]=1,i[e[2]="REMOVE"]=2,i),Ge),m),t.ExportDocumentsMetadata=(b.prototype.startTime=null,b.prototype.endTime=null,b.prototype.operationState=0,b.prototype.progressDocuments=null,b.prototype.progressBytes=null,b.prototype.collectionIds=p.emptyArray,b.prototype.outputUriPrefix="",b.prototype.namespaceIds=p.emptyArray,b.prototype.snapshotTime=null,b.create=function(e){return new b(e)},b.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&f.google.protobuf.Timestamp.encode(e.startTime,t.uint32(10).fork(),r+1).ldelim(),null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&f.google.protobuf.Timestamp.encode(e.endTime,t.uint32(18).fork(),r+1).ldelim(),null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState")&&t.uint32(24).int32(e.operationState),null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&f.google.firestore.admin.v1.Progress.encode(e.progressDocuments,t.uint32(34).fork(),r+1).ldelim(),null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&f.google.firestore.admin.v1.Progress.encode(e.progressBytes,t.uint32(42).fork(),r+1).ldelim(),null!=e.collectionIds&&e.collectionIds.length)for(var o=0;o<e.collectionIds.length;++o)t.uint32(50).string(e.collectionIds[o]);if(null!=e.outputUriPrefix&&Object.hasOwnProperty.call(e,"outputUriPrefix")&&t.uint32(58).string(e.outputUriPrefix),null!=e.namespaceIds&&e.namespaceIds.length)for(o=0;o<e.namespaceIds.length;++o)t.uint32(66).string(e.namespaceIds[o]);return null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")&&f.google.protobuf.Timestamp.encode(e.snapshotTime,t.uint32(74).fork(),r+1).ldelim(),t},b.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},b.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ExportDocumentsMetadata;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.startTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 2:i.endTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 3:i.operationState=e.int32();break;case 4:i.progressDocuments=f.google.firestore.admin.v1.Progress.decode(e,e.uint32(),void 0,o+1);break;case 5:i.progressBytes=f.google.firestore.admin.v1.Progress.decode(e,e.uint32(),void 0,o+1);break;case 6:i.collectionIds&&i.collectionIds.length||(i.collectionIds=[]),i.collectionIds.push(e.string());break;case 7:i.outputUriPrefix=e.string();break;case 8:i.namespaceIds&&i.namespaceIds.length||(i.namespaceIds=[]),i.namespaceIds.push(e.string());break;case 9:i.snapshotTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},b.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},b.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&(r=f.google.protobuf.Timestamp.verify(e.startTime,t+1)))return"startTime."+r;if(null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&(r=f.google.protobuf.Timestamp.verify(e.endTime,t+1)))return"endTime."+r;if(null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState"))switch(e.operationState){default:return"operationState: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}if(null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&(r=f.google.firestore.admin.v1.Progress.verify(e.progressDocuments,t+1)))return"progressDocuments."+r;if(null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&(r=f.google.firestore.admin.v1.Progress.verify(e.progressBytes,t+1)))return"progressBytes."+r;if(null!=e.collectionIds&&Object.hasOwnProperty.call(e,"collectionIds")){if(!Array.isArray(e.collectionIds))return"collectionIds: array expected";for(var o=0;o<e.collectionIds.length;++o)if(!p.isString(e.collectionIds[o]))return"collectionIds: string[] expected"}if(null!=e.outputUriPrefix&&Object.hasOwnProperty.call(e,"outputUriPrefix")&&!p.isString(e.outputUriPrefix))return"outputUriPrefix: string expected";if(null!=e.namespaceIds&&Object.hasOwnProperty.call(e,"namespaceIds")){if(!Array.isArray(e.namespaceIds))return"namespaceIds: array expected";for(o=0;o<e.namespaceIds.length;++o)if(!p.isString(e.namespaceIds[o]))return"namespaceIds: string[] expected"}if(null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")&&(r=f.google.protobuf.Timestamp.verify(e.snapshotTime,t+1)))return"snapshotTime."+r;return null},b.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ExportDocumentsMetadata)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.ExportDocumentsMetadata;if(null!=e.startTime){if(!p.isObject(e.startTime))throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.startTime: object expected");r.startTime=f.google.protobuf.Timestamp.fromObject(e.startTime,t+1)}if(null!=e.endTime){if(!p.isObject(e.endTime))throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.endTime: object expected");r.endTime=f.google.protobuf.Timestamp.fromObject(e.endTime,t+1)}switch(e.operationState){default:"number"==typeof e.operationState&&(r.operationState=e.operationState);break;case"OPERATION_STATE_UNSPECIFIED":case 0:r.operationState=0;break;case"INITIALIZING":case 1:r.operationState=1;break;case"PROCESSING":case 2:r.operationState=2;break;case"CANCELLING":case 3:r.operationState=3;break;case"FINALIZING":case 4:r.operationState=4;break;case"SUCCESSFUL":case 5:r.operationState=5;break;case"FAILED":case 6:r.operationState=6;break;case"CANCELLED":case 7:r.operationState=7}if(null!=e.progressDocuments){if(!p.isObject(e.progressDocuments))throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.progressDocuments: object expected");r.progressDocuments=f.google.firestore.admin.v1.Progress.fromObject(e.progressDocuments,t+1)}if(null!=e.progressBytes){if(!p.isObject(e.progressBytes))throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.progressBytes: object expected");r.progressBytes=f.google.firestore.admin.v1.Progress.fromObject(e.progressBytes,t+1)}if(e.collectionIds){if(!Array.isArray(e.collectionIds))throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.collectionIds: array expected");r.collectionIds=[];for(var o=0;o<e.collectionIds.length;++o)r.collectionIds[o]=String(e.collectionIds[o])}if(null!=e.outputUriPrefix&&(r.outputUriPrefix=String(e.outputUriPrefix)),e.namespaceIds){if(!Array.isArray(e.namespaceIds))throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.namespaceIds: array expected");r.namespaceIds=[];for(o=0;o<e.namespaceIds.length;++o)r.namespaceIds[o]=String(e.namespaceIds[o])}if(null!=e.snapshotTime){if(!p.isObject(e.snapshotTime))throw TypeError(".google.firestore.admin.v1.ExportDocumentsMetadata.snapshotTime: object expected");r.snapshotTime=f.google.protobuf.Timestamp.fromObject(e.snapshotTime,t+1)}return r},b.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.collectionIds=[],o.namespaceIds=[]),t.defaults&&(o.startTime=null,o.endTime=null,o.operationState=t.enums===String?"OPERATION_STATE_UNSPECIFIED":0,o.progressDocuments=null,o.progressBytes=null,o.outputUriPrefix="",o.snapshotTime=null),null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&(o.startTime=f.google.protobuf.Timestamp.toObject(e.startTime,t,r+1)),null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&(o.endTime=f.google.protobuf.Timestamp.toObject(e.endTime,t,r+1)),null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState")&&(o.operationState=t.enums!==String||void 0===f.google.firestore.admin.v1.OperationState[e.operationState]?e.operationState:f.google.firestore.admin.v1.OperationState[e.operationState]),null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&(o.progressDocuments=f.google.firestore.admin.v1.Progress.toObject(e.progressDocuments,t,r+1)),null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&(o.progressBytes=f.google.firestore.admin.v1.Progress.toObject(e.progressBytes,t,r+1)),e.collectionIds&&e.collectionIds.length){o.collectionIds=[];for(var n=0;n<e.collectionIds.length;++n)o.collectionIds[n]=e.collectionIds[n]}if(null!=e.outputUriPrefix&&Object.hasOwnProperty.call(e,"outputUriPrefix")&&(o.outputUriPrefix=e.outputUriPrefix),e.namespaceIds&&e.namespaceIds.length){o.namespaceIds=[];for(n=0;n<e.namespaceIds.length;++n)o.namespaceIds[n]=e.namespaceIds[n]}return null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")&&(o.snapshotTime=f.google.protobuf.Timestamp.toObject(e.snapshotTime,t,r+1)),o},b.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},b.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ExportDocumentsMetadata"},b),t.ImportDocumentsMetadata=(We.prototype.startTime=null,We.prototype.endTime=null,We.prototype.operationState=0,We.prototype.progressDocuments=null,We.prototype.progressBytes=null,We.prototype.collectionIds=p.emptyArray,We.prototype.inputUriPrefix="",We.prototype.namespaceIds=p.emptyArray,We.create=function(e){return new We(e)},We.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&f.google.protobuf.Timestamp.encode(e.startTime,t.uint32(10).fork(),r+1).ldelim(),null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&f.google.protobuf.Timestamp.encode(e.endTime,t.uint32(18).fork(),r+1).ldelim(),null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState")&&t.uint32(24).int32(e.operationState),null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&f.google.firestore.admin.v1.Progress.encode(e.progressDocuments,t.uint32(34).fork(),r+1).ldelim(),null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&f.google.firestore.admin.v1.Progress.encode(e.progressBytes,t.uint32(42).fork(),r+1).ldelim(),null!=e.collectionIds&&e.collectionIds.length)for(var o=0;o<e.collectionIds.length;++o)t.uint32(50).string(e.collectionIds[o]);if(null!=e.inputUriPrefix&&Object.hasOwnProperty.call(e,"inputUriPrefix")&&t.uint32(58).string(e.inputUriPrefix),null!=e.namespaceIds&&e.namespaceIds.length)for(o=0;o<e.namespaceIds.length;++o)t.uint32(66).string(e.namespaceIds[o]);return t},We.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},We.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ImportDocumentsMetadata;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.startTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 2:i.endTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 3:i.operationState=e.int32();break;case 4:i.progressDocuments=f.google.firestore.admin.v1.Progress.decode(e,e.uint32(),void 0,o+1);break;case 5:i.progressBytes=f.google.firestore.admin.v1.Progress.decode(e,e.uint32(),void 0,o+1);break;case 6:i.collectionIds&&i.collectionIds.length||(i.collectionIds=[]),i.collectionIds.push(e.string());break;case 7:i.inputUriPrefix=e.string();break;case 8:i.namespaceIds&&i.namespaceIds.length||(i.namespaceIds=[]),i.namespaceIds.push(e.string());break;default:e.skipType(7&a,o)}}return i},We.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},We.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&(r=f.google.protobuf.Timestamp.verify(e.startTime,t+1)))return"startTime."+r;if(null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&(r=f.google.protobuf.Timestamp.verify(e.endTime,t+1)))return"endTime."+r;if(null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState"))switch(e.operationState){default:return"operationState: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}if(null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&(r=f.google.firestore.admin.v1.Progress.verify(e.progressDocuments,t+1)))return"progressDocuments."+r;if(null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&(r=f.google.firestore.admin.v1.Progress.verify(e.progressBytes,t+1)))return"progressBytes."+r;if(null!=e.collectionIds&&Object.hasOwnProperty.call(e,"collectionIds")){if(!Array.isArray(e.collectionIds))return"collectionIds: array expected";for(var o=0;o<e.collectionIds.length;++o)if(!p.isString(e.collectionIds[o]))return"collectionIds: string[] expected"}if(null!=e.inputUriPrefix&&Object.hasOwnProperty.call(e,"inputUriPrefix")&&!p.isString(e.inputUriPrefix))return"inputUriPrefix: string expected";if(null!=e.namespaceIds&&Object.hasOwnProperty.call(e,"namespaceIds")){if(!Array.isArray(e.namespaceIds))return"namespaceIds: array expected";for(o=0;o<e.namespaceIds.length;++o)if(!p.isString(e.namespaceIds[o]))return"namespaceIds: string[] expected"}return null},We.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ImportDocumentsMetadata)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.ImportDocumentsMetadata;if(null!=e.startTime){if(!p.isObject(e.startTime))throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.startTime: object expected");r.startTime=f.google.protobuf.Timestamp.fromObject(e.startTime,t+1)}if(null!=e.endTime){if(!p.isObject(e.endTime))throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.endTime: object expected");r.endTime=f.google.protobuf.Timestamp.fromObject(e.endTime,t+1)}switch(e.operationState){default:"number"==typeof e.operationState&&(r.operationState=e.operationState);break;case"OPERATION_STATE_UNSPECIFIED":case 0:r.operationState=0;break;case"INITIALIZING":case 1:r.operationState=1;break;case"PROCESSING":case 2:r.operationState=2;break;case"CANCELLING":case 3:r.operationState=3;break;case"FINALIZING":case 4:r.operationState=4;break;case"SUCCESSFUL":case 5:r.operationState=5;break;case"FAILED":case 6:r.operationState=6;break;case"CANCELLED":case 7:r.operationState=7}if(null!=e.progressDocuments){if(!p.isObject(e.progressDocuments))throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.progressDocuments: object expected");r.progressDocuments=f.google.firestore.admin.v1.Progress.fromObject(e.progressDocuments,t+1)}if(null!=e.progressBytes){if(!p.isObject(e.progressBytes))throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.progressBytes: object expected");r.progressBytes=f.google.firestore.admin.v1.Progress.fromObject(e.progressBytes,t+1)}if(e.collectionIds){if(!Array.isArray(e.collectionIds))throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.collectionIds: array expected");r.collectionIds=[];for(var o=0;o<e.collectionIds.length;++o)r.collectionIds[o]=String(e.collectionIds[o])}if(null!=e.inputUriPrefix&&(r.inputUriPrefix=String(e.inputUriPrefix)),e.namespaceIds){if(!Array.isArray(e.namespaceIds))throw TypeError(".google.firestore.admin.v1.ImportDocumentsMetadata.namespaceIds: array expected");r.namespaceIds=[];for(o=0;o<e.namespaceIds.length;++o)r.namespaceIds[o]=String(e.namespaceIds[o])}return r},We.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.collectionIds=[],o.namespaceIds=[]),t.defaults&&(o.startTime=null,o.endTime=null,o.operationState=t.enums===String?"OPERATION_STATE_UNSPECIFIED":0,o.progressDocuments=null,o.progressBytes=null,o.inputUriPrefix=""),null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&(o.startTime=f.google.protobuf.Timestamp.toObject(e.startTime,t,r+1)),null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&(o.endTime=f.google.protobuf.Timestamp.toObject(e.endTime,t,r+1)),null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState")&&(o.operationState=t.enums!==String||void 0===f.google.firestore.admin.v1.OperationState[e.operationState]?e.operationState:f.google.firestore.admin.v1.OperationState[e.operationState]),null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&(o.progressDocuments=f.google.firestore.admin.v1.Progress.toObject(e.progressDocuments,t,r+1)),null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&(o.progressBytes=f.google.firestore.admin.v1.Progress.toObject(e.progressBytes,t,r+1)),e.collectionIds&&e.collectionIds.length){o.collectionIds=[];for(var n=0;n<e.collectionIds.length;++n)o.collectionIds[n]=e.collectionIds[n]}if(null!=e.inputUriPrefix&&Object.hasOwnProperty.call(e,"inputUriPrefix")&&(o.inputUriPrefix=e.inputUriPrefix),e.namespaceIds&&e.namespaceIds.length){o.namespaceIds=[];for(n=0;n<e.namespaceIds.length;++n)o.namespaceIds[n]=e.namespaceIds[n]}return o},We.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},We.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ImportDocumentsMetadata"},We),t.BulkDeleteDocumentsMetadata=(ze.prototype.startTime=null,ze.prototype.endTime=null,ze.prototype.operationState=0,ze.prototype.progressDocuments=null,ze.prototype.progressBytes=null,ze.prototype.collectionIds=p.emptyArray,ze.prototype.namespaceIds=p.emptyArray,ze.prototype.snapshotTime=null,ze.create=function(e){return new ze(e)},ze.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&f.google.protobuf.Timestamp.encode(e.startTime,t.uint32(10).fork(),r+1).ldelim(),null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&f.google.protobuf.Timestamp.encode(e.endTime,t.uint32(18).fork(),r+1).ldelim(),null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState")&&t.uint32(24).int32(e.operationState),null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&f.google.firestore.admin.v1.Progress.encode(e.progressDocuments,t.uint32(34).fork(),r+1).ldelim(),null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&f.google.firestore.admin.v1.Progress.encode(e.progressBytes,t.uint32(42).fork(),r+1).ldelim(),null!=e.collectionIds&&e.collectionIds.length)for(var o=0;o<e.collectionIds.length;++o)t.uint32(50).string(e.collectionIds[o]);if(null!=e.namespaceIds&&e.namespaceIds.length)for(o=0;o<e.namespaceIds.length;++o)t.uint32(58).string(e.namespaceIds[o]);return null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")&&f.google.protobuf.Timestamp.encode(e.snapshotTime,t.uint32(66).fork(),r+1).ldelim(),t},ze.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ze.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.BulkDeleteDocumentsMetadata;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.startTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 2:i.endTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 3:i.operationState=e.int32();break;case 4:i.progressDocuments=f.google.firestore.admin.v1.Progress.decode(e,e.uint32(),void 0,o+1);break;case 5:i.progressBytes=f.google.firestore.admin.v1.Progress.decode(e,e.uint32(),void 0,o+1);break;case 6:i.collectionIds&&i.collectionIds.length||(i.collectionIds=[]),i.collectionIds.push(e.string());break;case 7:i.namespaceIds&&i.namespaceIds.length||(i.namespaceIds=[]),i.namespaceIds.push(e.string());break;case 8:i.snapshotTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},ze.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ze.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&(r=f.google.protobuf.Timestamp.verify(e.startTime,t+1)))return"startTime."+r;if(null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&(r=f.google.protobuf.Timestamp.verify(e.endTime,t+1)))return"endTime."+r;if(null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState"))switch(e.operationState){default:return"operationState: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}if(null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&(r=f.google.firestore.admin.v1.Progress.verify(e.progressDocuments,t+1)))return"progressDocuments."+r;if(null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&(r=f.google.firestore.admin.v1.Progress.verify(e.progressBytes,t+1)))return"progressBytes."+r;if(null!=e.collectionIds&&Object.hasOwnProperty.call(e,"collectionIds")){if(!Array.isArray(e.collectionIds))return"collectionIds: array expected";for(var o=0;o<e.collectionIds.length;++o)if(!p.isString(e.collectionIds[o]))return"collectionIds: string[] expected"}if(null!=e.namespaceIds&&Object.hasOwnProperty.call(e,"namespaceIds")){if(!Array.isArray(e.namespaceIds))return"namespaceIds: array expected";for(o=0;o<e.namespaceIds.length;++o)if(!p.isString(e.namespaceIds[o]))return"namespaceIds: string[] expected"}if(null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")&&(r=f.google.protobuf.Timestamp.verify(e.snapshotTime,t+1)))return"snapshotTime."+r;return null},ze.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.BulkDeleteDocumentsMetadata)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.BulkDeleteDocumentsMetadata: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.BulkDeleteDocumentsMetadata;if(null!=e.startTime){if(!p.isObject(e.startTime))throw TypeError(".google.firestore.admin.v1.BulkDeleteDocumentsMetadata.startTime: object expected");r.startTime=f.google.protobuf.Timestamp.fromObject(e.startTime,t+1)}if(null!=e.endTime){if(!p.isObject(e.endTime))throw TypeError(".google.firestore.admin.v1.BulkDeleteDocumentsMetadata.endTime: object expected");r.endTime=f.google.protobuf.Timestamp.fromObject(e.endTime,t+1)}switch(e.operationState){default:"number"==typeof e.operationState&&(r.operationState=e.operationState);break;case"OPERATION_STATE_UNSPECIFIED":case 0:r.operationState=0;break;case"INITIALIZING":case 1:r.operationState=1;break;case"PROCESSING":case 2:r.operationState=2;break;case"CANCELLING":case 3:r.operationState=3;break;case"FINALIZING":case 4:r.operationState=4;break;case"SUCCESSFUL":case 5:r.operationState=5;break;case"FAILED":case 6:r.operationState=6;break;case"CANCELLED":case 7:r.operationState=7}if(null!=e.progressDocuments){if(!p.isObject(e.progressDocuments))throw TypeError(".google.firestore.admin.v1.BulkDeleteDocumentsMetadata.progressDocuments: object expected");r.progressDocuments=f.google.firestore.admin.v1.Progress.fromObject(e.progressDocuments,t+1)}if(null!=e.progressBytes){if(!p.isObject(e.progressBytes))throw TypeError(".google.firestore.admin.v1.BulkDeleteDocumentsMetadata.progressBytes: object expected");r.progressBytes=f.google.firestore.admin.v1.Progress.fromObject(e.progressBytes,t+1)}if(e.collectionIds){if(!Array.isArray(e.collectionIds))throw TypeError(".google.firestore.admin.v1.BulkDeleteDocumentsMetadata.collectionIds: array expected");r.collectionIds=[];for(var o=0;o<e.collectionIds.length;++o)r.collectionIds[o]=String(e.collectionIds[o])}if(e.namespaceIds){if(!Array.isArray(e.namespaceIds))throw TypeError(".google.firestore.admin.v1.BulkDeleteDocumentsMetadata.namespaceIds: array expected");r.namespaceIds=[];for(o=0;o<e.namespaceIds.length;++o)r.namespaceIds[o]=String(e.namespaceIds[o])}if(null!=e.snapshotTime){if(!p.isObject(e.snapshotTime))throw TypeError(".google.firestore.admin.v1.BulkDeleteDocumentsMetadata.snapshotTime: object expected");r.snapshotTime=f.google.protobuf.Timestamp.fromObject(e.snapshotTime,t+1)}return r},ze.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.collectionIds=[],o.namespaceIds=[]),t.defaults&&(o.startTime=null,o.endTime=null,o.operationState=t.enums===String?"OPERATION_STATE_UNSPECIFIED":0,o.progressDocuments=null,o.progressBytes=null,o.snapshotTime=null),null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&(o.startTime=f.google.protobuf.Timestamp.toObject(e.startTime,t,r+1)),null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&(o.endTime=f.google.protobuf.Timestamp.toObject(e.endTime,t,r+1)),null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState")&&(o.operationState=t.enums!==String||void 0===f.google.firestore.admin.v1.OperationState[e.operationState]?e.operationState:f.google.firestore.admin.v1.OperationState[e.operationState]),null!=e.progressDocuments&&Object.hasOwnProperty.call(e,"progressDocuments")&&(o.progressDocuments=f.google.firestore.admin.v1.Progress.toObject(e.progressDocuments,t,r+1)),null!=e.progressBytes&&Object.hasOwnProperty.call(e,"progressBytes")&&(o.progressBytes=f.google.firestore.admin.v1.Progress.toObject(e.progressBytes,t,r+1)),e.collectionIds&&e.collectionIds.length){o.collectionIds=[];for(var n=0;n<e.collectionIds.length;++n)o.collectionIds[n]=e.collectionIds[n]}if(e.namespaceIds&&e.namespaceIds.length){o.namespaceIds=[];for(n=0;n<e.namespaceIds.length;++n)o.namespaceIds[n]=e.namespaceIds[n]}return null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")&&(o.snapshotTime=f.google.protobuf.Timestamp.toObject(e.snapshotTime,t,r+1)),o},ze.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ze.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.BulkDeleteDocumentsMetadata"},ze),t.ExportDocumentsResponse=(Ye.prototype.outputUriPrefix="",Ye.create=function(e){return new Ye(e)},Ye.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.outputUriPrefix&&Object.hasOwnProperty.call(e,"outputUriPrefix")&&t.uint32(10).string(e.outputUriPrefix),t},Ye.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ye.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.ExportDocumentsResponse;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.outputUriPrefix=e.string():e.skipType(7&a,o)}return i},Ye.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ye.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.outputUriPrefix&&Object.hasOwnProperty.call(e,"outputUriPrefix")&&!p.isString(e.outputUriPrefix)?"outputUriPrefix: string expected":null},Ye.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.ExportDocumentsResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.ExportDocumentsResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.ExportDocumentsResponse;return null!=e.outputUriPrefix&&(t.outputUriPrefix=String(e.outputUriPrefix)),t},Ye.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.outputUriPrefix=""),null!=e.outputUriPrefix&&Object.hasOwnProperty.call(e,"outputUriPrefix")&&(r.outputUriPrefix=e.outputUriPrefix),r},Ye.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ye.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.ExportDocumentsResponse"},Ye),t.RestoreDatabaseMetadata=(He.prototype.startTime=null,He.prototype.endTime=null,He.prototype.operationState=0,He.prototype.database="",He.prototype.backup="",He.prototype.progressPercentage=null,He.create=function(e){return new He(e)},He.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&f.google.protobuf.Timestamp.encode(e.startTime,t.uint32(10).fork(),r+1).ldelim(),null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&f.google.protobuf.Timestamp.encode(e.endTime,t.uint32(18).fork(),r+1).ldelim(),null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState")&&t.uint32(24).int32(e.operationState),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(34).string(e.database),null!=e.backup&&Object.hasOwnProperty.call(e,"backup")&&t.uint32(42).string(e.backup),null!=e.progressPercentage&&Object.hasOwnProperty.call(e,"progressPercentage")&&f.google.firestore.admin.v1.Progress.encode(e.progressPercentage,t.uint32(66).fork(),r+1).ldelim(),t},He.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},He.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.RestoreDatabaseMetadata;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.startTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 2:i.endTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 3:i.operationState=e.int32();break;case 4:i.database=e.string();break;case 5:i.backup=e.string();break;case 8:i.progressPercentage=f.google.firestore.admin.v1.Progress.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},He.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},He.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&(r=f.google.protobuf.Timestamp.verify(e.startTime,t+1)))return"startTime."+r;if(null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&(r=f.google.protobuf.Timestamp.verify(e.endTime,t+1)))return"endTime."+r;if(null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState"))switch(e.operationState){default:return"operationState: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.backup&&Object.hasOwnProperty.call(e,"backup")&&!p.isString(e.backup))return"backup: string expected";if(null!=e.progressPercentage&&Object.hasOwnProperty.call(e,"progressPercentage")&&(r=f.google.firestore.admin.v1.Progress.verify(e.progressPercentage,t+1)))return"progressPercentage."+r;return null},He.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.RestoreDatabaseMetadata)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.RestoreDatabaseMetadata: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.RestoreDatabaseMetadata;if(null!=e.startTime){if(!p.isObject(e.startTime))throw TypeError(".google.firestore.admin.v1.RestoreDatabaseMetadata.startTime: object expected");r.startTime=f.google.protobuf.Timestamp.fromObject(e.startTime,t+1)}if(null!=e.endTime){if(!p.isObject(e.endTime))throw TypeError(".google.firestore.admin.v1.RestoreDatabaseMetadata.endTime: object expected");r.endTime=f.google.protobuf.Timestamp.fromObject(e.endTime,t+1)}switch(e.operationState){default:"number"==typeof e.operationState&&(r.operationState=e.operationState);break;case"OPERATION_STATE_UNSPECIFIED":case 0:r.operationState=0;break;case"INITIALIZING":case 1:r.operationState=1;break;case"PROCESSING":case 2:r.operationState=2;break;case"CANCELLING":case 3:r.operationState=3;break;case"FINALIZING":case 4:r.operationState=4;break;case"SUCCESSFUL":case 5:r.operationState=5;break;case"FAILED":case 6:r.operationState=6;break;case"CANCELLED":case 7:r.operationState=7}if(null!=e.database&&(r.database=String(e.database)),null!=e.backup&&(r.backup=String(e.backup)),null!=e.progressPercentage){if(!p.isObject(e.progressPercentage))throw TypeError(".google.firestore.admin.v1.RestoreDatabaseMetadata.progressPercentage: object expected");r.progressPercentage=f.google.firestore.admin.v1.Progress.fromObject(e.progressPercentage,t+1)}return r},He.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.startTime=null,o.endTime=null,o.operationState=t.enums===String?"OPERATION_STATE_UNSPECIFIED":0,o.database="",o.backup="",o.progressPercentage=null),null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&(o.startTime=f.google.protobuf.Timestamp.toObject(e.startTime,t,r+1)),null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&(o.endTime=f.google.protobuf.Timestamp.toObject(e.endTime,t,r+1)),null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState")&&(o.operationState=t.enums!==String||void 0===f.google.firestore.admin.v1.OperationState[e.operationState]?e.operationState:f.google.firestore.admin.v1.OperationState[e.operationState]),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(o.database=e.database),null!=e.backup&&Object.hasOwnProperty.call(e,"backup")&&(o.backup=e.backup),null!=e.progressPercentage&&Object.hasOwnProperty.call(e,"progressPercentage")&&(o.progressPercentage=f.google.firestore.admin.v1.Progress.toObject(e.progressPercentage,t,r+1)),o},He.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},He.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.RestoreDatabaseMetadata"},He),t.CloneDatabaseMetadata=(Ke.prototype.startTime=null,Ke.prototype.endTime=null,Ke.prototype.operationState=0,Ke.prototype.database="",Ke.prototype.pitrSnapshot=null,Ke.prototype.progressPercentage=null,Ke.create=function(e){return new Ke(e)},Ke.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&f.google.protobuf.Timestamp.encode(e.startTime,t.uint32(10).fork(),r+1).ldelim(),null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&f.google.protobuf.Timestamp.encode(e.endTime,t.uint32(18).fork(),r+1).ldelim(),null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState")&&t.uint32(24).int32(e.operationState),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(34).string(e.database),null!=e.progressPercentage&&Object.hasOwnProperty.call(e,"progressPercentage")&&f.google.firestore.admin.v1.Progress.encode(e.progressPercentage,t.uint32(50).fork(),r+1).ldelim(),null!=e.pitrSnapshot&&Object.hasOwnProperty.call(e,"pitrSnapshot")&&f.google.firestore.admin.v1.PitrSnapshot.encode(e.pitrSnapshot,t.uint32(58).fork(),r+1).ldelim(),t},Ke.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ke.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.CloneDatabaseMetadata;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.startTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 2:i.endTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 3:i.operationState=e.int32();break;case 4:i.database=e.string();break;case 7:i.pitrSnapshot=f.google.firestore.admin.v1.PitrSnapshot.decode(e,e.uint32(),void 0,o+1);break;case 6:i.progressPercentage=f.google.firestore.admin.v1.Progress.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Ke.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ke.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&(r=f.google.protobuf.Timestamp.verify(e.startTime,t+1)))return"startTime."+r;if(null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&(r=f.google.protobuf.Timestamp.verify(e.endTime,t+1)))return"endTime."+r;if(null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState"))switch(e.operationState){default:return"operationState: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.pitrSnapshot&&Object.hasOwnProperty.call(e,"pitrSnapshot")&&(r=f.google.firestore.admin.v1.PitrSnapshot.verify(e.pitrSnapshot,t+1)))return"pitrSnapshot."+r;if(null!=e.progressPercentage&&Object.hasOwnProperty.call(e,"progressPercentage")&&(r=f.google.firestore.admin.v1.Progress.verify(e.progressPercentage,t+1)))return"progressPercentage."+r;return null},Ke.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.CloneDatabaseMetadata)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.CloneDatabaseMetadata: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.CloneDatabaseMetadata;if(null!=e.startTime){if(!p.isObject(e.startTime))throw TypeError(".google.firestore.admin.v1.CloneDatabaseMetadata.startTime: object expected");r.startTime=f.google.protobuf.Timestamp.fromObject(e.startTime,t+1)}if(null!=e.endTime){if(!p.isObject(e.endTime))throw TypeError(".google.firestore.admin.v1.CloneDatabaseMetadata.endTime: object expected");r.endTime=f.google.protobuf.Timestamp.fromObject(e.endTime,t+1)}switch(e.operationState){default:"number"==typeof e.operationState&&(r.operationState=e.operationState);break;case"OPERATION_STATE_UNSPECIFIED":case 0:r.operationState=0;break;case"INITIALIZING":case 1:r.operationState=1;break;case"PROCESSING":case 2:r.operationState=2;break;case"CANCELLING":case 3:r.operationState=3;break;case"FINALIZING":case 4:r.operationState=4;break;case"SUCCESSFUL":case 5:r.operationState=5;break;case"FAILED":case 6:r.operationState=6;break;case"CANCELLED":case 7:r.operationState=7}if(null!=e.database&&(r.database=String(e.database)),null!=e.pitrSnapshot){if(!p.isObject(e.pitrSnapshot))throw TypeError(".google.firestore.admin.v1.CloneDatabaseMetadata.pitrSnapshot: object expected");r.pitrSnapshot=f.google.firestore.admin.v1.PitrSnapshot.fromObject(e.pitrSnapshot,t+1)}if(null!=e.progressPercentage){if(!p.isObject(e.progressPercentage))throw TypeError(".google.firestore.admin.v1.CloneDatabaseMetadata.progressPercentage: object expected");r.progressPercentage=f.google.firestore.admin.v1.Progress.fromObject(e.progressPercentage,t+1)}return r},Ke.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.startTime=null,o.endTime=null,o.operationState=t.enums===String?"OPERATION_STATE_UNSPECIFIED":0,o.database="",o.progressPercentage=null,o.pitrSnapshot=null),null!=e.startTime&&Object.hasOwnProperty.call(e,"startTime")&&(o.startTime=f.google.protobuf.Timestamp.toObject(e.startTime,t,r+1)),null!=e.endTime&&Object.hasOwnProperty.call(e,"endTime")&&(o.endTime=f.google.protobuf.Timestamp.toObject(e.endTime,t,r+1)),null!=e.operationState&&Object.hasOwnProperty.call(e,"operationState")&&(o.operationState=t.enums!==String||void 0===f.google.firestore.admin.v1.OperationState[e.operationState]?e.operationState:f.google.firestore.admin.v1.OperationState[e.operationState]),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(o.database=e.database),null!=e.progressPercentage&&Object.hasOwnProperty.call(e,"progressPercentage")&&(o.progressPercentage=f.google.firestore.admin.v1.Progress.toObject(e.progressPercentage,t,r+1)),null!=e.pitrSnapshot&&Object.hasOwnProperty.call(e,"pitrSnapshot")&&(o.pitrSnapshot=f.google.firestore.admin.v1.PitrSnapshot.toObject(e.pitrSnapshot,t,r+1)),o},Ke.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ke.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.CloneDatabaseMetadata"},Ke),t.Progress=(Xe.prototype.estimatedWork=p.Long?p.Long.fromBits(0,0,!1):0,Xe.prototype.completedWork=p.Long?p.Long.fromBits(0,0,!1):0,Xe.create=function(e){return new Xe(e)},Xe.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.estimatedWork&&Object.hasOwnProperty.call(e,"estimatedWork")&&t.uint32(8).int64(e.estimatedWork),null!=e.completedWork&&Object.hasOwnProperty.call(e,"completedWork")&&t.uint32(16).int64(e.completedWork),t},Xe.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Xe.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.Progress;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.estimatedWork=e.int64();break;case 2:i.completedWork=e.int64();break;default:e.skipType(7&a,o)}}return i},Xe.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Xe.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.estimatedWork&&Object.hasOwnProperty.call(e,"estimatedWork")&&!(p.isInteger(e.estimatedWork)||e.estimatedWork&&p.isInteger(e.estimatedWork.low)&&p.isInteger(e.estimatedWork.high))?"estimatedWork: integer|Long expected":null!=e.completedWork&&Object.hasOwnProperty.call(e,"completedWork")&&!(p.isInteger(e.completedWork)||e.completedWork&&p.isInteger(e.completedWork.low)&&p.isInteger(e.completedWork.high))?"completedWork: integer|Long expected":null},Xe.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.Progress)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.Progress: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.Progress;return null!=e.estimatedWork&&(p.Long?t.estimatedWork=p.Long.fromValue(e.estimatedWork,!1):"string"==typeof e.estimatedWork?t.estimatedWork=parseInt(e.estimatedWork,10):"number"==typeof e.estimatedWork?t.estimatedWork=e.estimatedWork:"object"==typeof e.estimatedWork&&(t.estimatedWork=new p.LongBits(e.estimatedWork.low>>>0,e.estimatedWork.high>>>0).toNumber())),null!=e.completedWork&&(p.Long?t.completedWork=p.Long.fromValue(e.completedWork,!1):"string"==typeof e.completedWork?t.completedWork=parseInt(e.completedWork,10):"number"==typeof e.completedWork?t.completedWork=e.completedWork:"object"==typeof e.completedWork&&(t.completedWork=new p.LongBits(e.completedWork.low>>>0,e.completedWork.high>>>0).toNumber())),t},Xe.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,r={};return t.defaults&&(p.Long?(o=new p.Long(0,0,!1),r.estimatedWork=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):r.estimatedWork=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0,p.Long?(o=new p.Long(0,0,!1),r.completedWork=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):r.completedWork=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0),null!=e.estimatedWork&&Object.hasOwnProperty.call(e,"estimatedWork")&&("undefined"!=typeof BigInt&&t.longs===BigInt?r.estimatedWork="number"==typeof e.estimatedWork?BigInt(e.estimatedWork):p.Long.fromBits(e.estimatedWork.low>>>0,e.estimatedWork.high>>>0,!1).toBigInt():"number"==typeof e.estimatedWork?r.estimatedWork=t.longs===String?String(e.estimatedWork):e.estimatedWork:r.estimatedWork=t.longs===String?p.Long.prototype.toString.call(e.estimatedWork):t.longs===Number?new p.LongBits(e.estimatedWork.low>>>0,e.estimatedWork.high>>>0).toNumber():e.estimatedWork),null!=e.completedWork&&Object.hasOwnProperty.call(e,"completedWork")&&("undefined"!=typeof BigInt&&t.longs===BigInt?r.completedWork="number"==typeof e.completedWork?BigInt(e.completedWork):p.Long.fromBits(e.completedWork.low>>>0,e.completedWork.high>>>0,!1).toBigInt():"number"==typeof e.completedWork?r.completedWork=t.longs===String?String(e.completedWork):e.completedWork:r.completedWork=t.longs===String?p.Long.prototype.toString.call(e.completedWork):t.longs===Number?new p.LongBits(e.completedWork.low>>>0,e.completedWork.high>>>0).toNumber():e.completedWork),r},Xe.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Xe.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.Progress"},Xe),t.OperationState=(e={},(i=Object.create(e))[e[0]="OPERATION_STATE_UNSPECIFIED"]=0,i[e[1]="INITIALIZING"]=1,i[e[2]="PROCESSING"]=2,i[e[3]="CANCELLING"]=3,i[e[4]="FINALIZING"]=4,i[e[5]="SUCCESSFUL"]=5,i[e[6]="FAILED"]=6,i[e[7]="CANCELLED"]=7,i),t.PitrSnapshot=(Ze.prototype.database="",Ze.prototype.databaseUid=p.newBuffer([]),Ze.prototype.snapshotTime=null,Ze.create=function(e){return new Ze(e)},Ze.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.databaseUid&&Object.hasOwnProperty.call(e,"databaseUid")&&t.uint32(18).bytes(e.databaseUid),null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")&&f.google.protobuf.Timestamp.encode(e.snapshotTime,t.uint32(26).fork(),r+1).ldelim(),t},Ze.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ze.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.PitrSnapshot;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.databaseUid=e.bytes();break;case 3:i.snapshotTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Ze.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ze.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.databaseUid&&Object.hasOwnProperty.call(e,"databaseUid")&&!(e.databaseUid&&"number"==typeof e.databaseUid.length||p.isString(e.databaseUid)))return"databaseUid: buffer expected";if(null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")){e=f.google.protobuf.Timestamp.verify(e.snapshotTime,t+1);if(e)return"snapshotTime."+e}return null},Ze.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.PitrSnapshot)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.PitrSnapshot: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.PitrSnapshot;if(null!=e.database&&(r.database=String(e.database)),null!=e.databaseUid&&("string"==typeof e.databaseUid?p.base64.decode(e.databaseUid,r.databaseUid=p.newBuffer(p.base64.length(e.databaseUid)),0):0<=e.databaseUid.length&&(r.databaseUid=e.databaseUid)),null!=e.snapshotTime){if(!p.isObject(e.snapshotTime))throw TypeError(".google.firestore.admin.v1.PitrSnapshot.snapshotTime: object expected");r.snapshotTime=f.google.protobuf.Timestamp.fromObject(e.snapshotTime,t+1)}return r},Ze.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.database="",t.bytes===String?o.databaseUid="":(o.databaseUid=[],t.bytes!==Array&&(o.databaseUid=p.newBuffer(o.databaseUid))),o.snapshotTime=null),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(o.database=e.database),null!=e.databaseUid&&Object.hasOwnProperty.call(e,"databaseUid")&&(o.databaseUid=t.bytes===String?p.base64.encode(e.databaseUid,0,e.databaseUid.length):t.bytes===Array?Array.prototype.slice.call(e.databaseUid):e.databaseUid),null!=e.snapshotTime&&Object.hasOwnProperty.call(e,"snapshotTime")&&(o.snapshotTime=f.google.protobuf.Timestamp.toObject(e.snapshotTime,t,r+1)),o},Ze.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ze.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.PitrSnapshot"},Ze),t.BackupSchedule=($e.prototype.name="",$e.prototype.createTime=null,$e.prototype.updateTime=null,$e.prototype.retention=null,$e.prototype.dailyRecurrence=null,$e.prototype.weeklyRecurrence=null,Object.defineProperty($e.prototype,"recurrence",{get:p.oneOfGetter(e=["dailyRecurrence","weeklyRecurrence"]),set:p.oneOfSetter(e)}),$e.create=function(e){return new $e(e)},$e.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&f.google.protobuf.Timestamp.encode(e.createTime,t.uint32(26).fork(),r+1).ldelim(),null!=e.retention&&Object.hasOwnProperty.call(e,"retention")&&f.google.protobuf.Duration.encode(e.retention,t.uint32(50).fork(),r+1).ldelim(),null!=e.dailyRecurrence&&Object.hasOwnProperty.call(e,"dailyRecurrence")&&f.google.firestore.admin.v1.DailyRecurrence.encode(e.dailyRecurrence,t.uint32(58).fork(),r+1).ldelim(),null!=e.weeklyRecurrence&&Object.hasOwnProperty.call(e,"weeklyRecurrence")&&f.google.firestore.admin.v1.WeeklyRecurrence.encode(e.weeklyRecurrence,t.uint32(66).fork(),r+1).ldelim(),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&f.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(82).fork(),r+1).ldelim(),t},$e.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},$e.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.BackupSchedule;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 3:i.createTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 10:i.updateTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 6:i.retention=f.google.protobuf.Duration.decode(e,e.uint32(),void 0,o+1);break;case 7:i.dailyRecurrence=f.google.firestore.admin.v1.DailyRecurrence.decode(e,e.uint32(),void 0,o+1);break;case 8:i.weeklyRecurrence=f.google.firestore.admin.v1.WeeklyRecurrence.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},$e.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},$e.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&(r=f.google.protobuf.Timestamp.verify(e.createTime,t+1)))return"createTime."+r;if(null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(r=f.google.protobuf.Timestamp.verify(e.updateTime,t+1)))return"updateTime."+r;if(null!=e.retention&&Object.hasOwnProperty.call(e,"retention")&&(r=f.google.protobuf.Duration.verify(e.retention,t+1)))return"retention."+r;if(null!=e.dailyRecurrence&&Object.hasOwnProperty.call(e,"dailyRecurrence")&&(r=f.google.firestore.admin.v1.DailyRecurrence.verify(e.dailyRecurrence,t+(o.recurrence=1))))return"dailyRecurrence."+r;if(null!=e.weeklyRecurrence&&Object.hasOwnProperty.call(e,"weeklyRecurrence")){if(1===o.recurrence)return"recurrence: multiple values";if(r=f.google.firestore.admin.v1.WeeklyRecurrence.verify(e.weeklyRecurrence,t+(o.recurrence=1)))return"weeklyRecurrence."+r}return null},$e.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.BackupSchedule)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.BackupSchedule: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.BackupSchedule;if(null!=e.name&&(r.name=String(e.name)),null!=e.createTime){if(!p.isObject(e.createTime))throw TypeError(".google.firestore.admin.v1.BackupSchedule.createTime: object expected");r.createTime=f.google.protobuf.Timestamp.fromObject(e.createTime,t+1)}if(null!=e.updateTime){if(!p.isObject(e.updateTime))throw TypeError(".google.firestore.admin.v1.BackupSchedule.updateTime: object expected");r.updateTime=f.google.protobuf.Timestamp.fromObject(e.updateTime,t+1)}if(null!=e.retention){if(!p.isObject(e.retention))throw TypeError(".google.firestore.admin.v1.BackupSchedule.retention: object expected");r.retention=f.google.protobuf.Duration.fromObject(e.retention,t+1)}if(null!=e.dailyRecurrence){if(!p.isObject(e.dailyRecurrence))throw TypeError(".google.firestore.admin.v1.BackupSchedule.dailyRecurrence: object expected");r.dailyRecurrence=f.google.firestore.admin.v1.DailyRecurrence.fromObject(e.dailyRecurrence,t+1)}if(null!=e.weeklyRecurrence){if(!p.isObject(e.weeklyRecurrence))throw TypeError(".google.firestore.admin.v1.BackupSchedule.weeklyRecurrence: object expected");r.weeklyRecurrence=f.google.firestore.admin.v1.WeeklyRecurrence.fromObject(e.weeklyRecurrence,t+1)}return r},$e.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.name="",o.createTime=null,o.retention=null,o.updateTime=null),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&(o.createTime=f.google.protobuf.Timestamp.toObject(e.createTime,t,r+1)),null!=e.retention&&Object.hasOwnProperty.call(e,"retention")&&(o.retention=f.google.protobuf.Duration.toObject(e.retention,t,r+1)),null!=e.dailyRecurrence&&Object.hasOwnProperty.call(e,"dailyRecurrence")&&(o.dailyRecurrence=f.google.firestore.admin.v1.DailyRecurrence.toObject(e.dailyRecurrence,t,r+1),t.oneofs)&&(o.recurrence="dailyRecurrence"),null!=e.weeklyRecurrence&&Object.hasOwnProperty.call(e,"weeklyRecurrence")&&(o.weeklyRecurrence=f.google.firestore.admin.v1.WeeklyRecurrence.toObject(e.weeklyRecurrence,t,r+1),t.oneofs)&&(o.recurrence="weeklyRecurrence"),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(o.updateTime=f.google.protobuf.Timestamp.toObject(e.updateTime,t,r+1)),o},$e.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},$e.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.BackupSchedule"},$e),t.DailyRecurrence=(et.create=function(e){return new et(e)},et.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return t},et.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},et.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,t=new f.google.firestore.admin.v1.DailyRecurrence;e.pos<n;){var i=e.uint32();if(i===r)break;e.skipType(7&i,o)}return t},et.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},et.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null},et.fromObject=function(e,t){return e instanceof f.google.firestore.admin.v1.DailyRecurrence?e:new f.google.firestore.admin.v1.DailyRecurrence},et.toObject=function(){return{}},et.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},et.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.DailyRecurrence"},et),t.WeeklyRecurrence=(tt.prototype.day=0,tt.create=function(e){return new tt(e)},tt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.day&&Object.hasOwnProperty.call(e,"day")&&t.uint32(16).int32(e.day),t},tt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},tt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.WeeklyRecurrence;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==2?i.day=e.int32():e.skipType(7&a,o)}return i},tt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},tt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.day&&Object.hasOwnProperty.call(e,"day"))switch(e.day){default:return"day: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}return null},tt.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.WeeklyRecurrence)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.WeeklyRecurrence: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.WeeklyRecurrence;switch(e.day){default:"number"==typeof e.day&&(r.day=e.day);break;case"DAY_OF_WEEK_UNSPECIFIED":case 0:r.day=0;break;case"MONDAY":case 1:r.day=1;break;case"TUESDAY":case 2:r.day=2;break;case"WEDNESDAY":case 3:r.day=3;break;case"THURSDAY":case 4:r.day=4;break;case"FRIDAY":case 5:r.day=5;break;case"SATURDAY":case 6:r.day=6;break;case"SUNDAY":case 7:r.day=7}return r},tt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.day=t.enums===String?"DAY_OF_WEEK_UNSPECIFIED":0),null!=e.day&&Object.hasOwnProperty.call(e,"day")&&(r.day=t.enums!==String||void 0===f.google.type.DayOfWeek[e.day]?e.day:f.google.type.DayOfWeek[e.day]),r},tt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},tt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.WeeklyRecurrence"},tt),t.UserCreds=(y.prototype.name="",y.prototype.createTime=null,y.prototype.updateTime=null,y.prototype.state=0,y.prototype.securePassword="",y.prototype.resourceIdentity=null,Object.defineProperty(y.prototype,"UserCredsIdentity",{get:p.oneOfGetter(i=["resourceIdentity"]),set:p.oneOfSetter(i)}),y.create=function(e){return new y(e)},y.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&f.google.protobuf.Timestamp.encode(e.createTime,t.uint32(18).fork(),r+1).ldelim(),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&f.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(26).fork(),r+1).ldelim(),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&t.uint32(32).int32(e.state),null!=e.securePassword&&Object.hasOwnProperty.call(e,"securePassword")&&t.uint32(42).string(e.securePassword),null!=e.resourceIdentity&&Object.hasOwnProperty.call(e,"resourceIdentity")&&f.google.firestore.admin.v1.UserCreds.ResourceIdentity.encode(e.resourceIdentity,t.uint32(50).fork(),r+1).ldelim(),t},y.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},y.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.UserCreds;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.createTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 3:i.updateTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 4:i.state=e.int32();break;case 5:i.securePassword=e.string();break;case 6:i.resourceIdentity=f.google.firestore.admin.v1.UserCreds.ResourceIdentity.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},y.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},y.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&(r=f.google.protobuf.Timestamp.verify(e.createTime,t+1)))return"createTime."+r;if(null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(r=f.google.protobuf.Timestamp.verify(e.updateTime,t+1)))return"updateTime."+r;if(null!=e.state&&Object.hasOwnProperty.call(e,"state"))switch(e.state){default:return"state: enum value expected";case 0:case 1:case 2:}if(null!=e.securePassword&&Object.hasOwnProperty.call(e,"securePassword")&&!p.isString(e.securePassword))return"securePassword: string expected";if(null!=e.resourceIdentity&&Object.hasOwnProperty.call(e,"resourceIdentity")&&(r=f.google.firestore.admin.v1.UserCreds.ResourceIdentity.verify(e.resourceIdentity,t+1)))return"resourceIdentity."+r;return null},y.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.UserCreds)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.UserCreds: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.admin.v1.UserCreds;if(null!=e.name&&(r.name=String(e.name)),null!=e.createTime){if(!p.isObject(e.createTime))throw TypeError(".google.firestore.admin.v1.UserCreds.createTime: object expected");r.createTime=f.google.protobuf.Timestamp.fromObject(e.createTime,t+1)}if(null!=e.updateTime){if(!p.isObject(e.updateTime))throw TypeError(".google.firestore.admin.v1.UserCreds.updateTime: object expected");r.updateTime=f.google.protobuf.Timestamp.fromObject(e.updateTime,t+1)}switch(e.state){default:"number"==typeof e.state&&(r.state=e.state);break;case"STATE_UNSPECIFIED":case 0:r.state=0;break;case"ENABLED":case 1:r.state=1;break;case"DISABLED":case 2:r.state=2}if(null!=e.securePassword&&(r.securePassword=String(e.securePassword)),null!=e.resourceIdentity){if(!p.isObject(e.resourceIdentity))throw TypeError(".google.firestore.admin.v1.UserCreds.resourceIdentity: object expected");r.resourceIdentity=f.google.firestore.admin.v1.UserCreds.ResourceIdentity.fromObject(e.resourceIdentity,t+1)}return r},y.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.name="",o.createTime=null,o.updateTime=null,o.state=t.enums===String?"STATE_UNSPECIFIED":0,o.securePassword=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&(o.createTime=f.google.protobuf.Timestamp.toObject(e.createTime,t,r+1)),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(o.updateTime=f.google.protobuf.Timestamp.toObject(e.updateTime,t,r+1)),null!=e.state&&Object.hasOwnProperty.call(e,"state")&&(o.state=t.enums!==String||void 0===f.google.firestore.admin.v1.UserCreds.State[e.state]?e.state:f.google.firestore.admin.v1.UserCreds.State[e.state]),null!=e.securePassword&&Object.hasOwnProperty.call(e,"securePassword")&&(o.securePassword=e.securePassword),null!=e.resourceIdentity&&Object.hasOwnProperty.call(e,"resourceIdentity")&&(o.resourceIdentity=f.google.firestore.admin.v1.UserCreds.ResourceIdentity.toObject(e.resourceIdentity,t,r+1),t.oneofs)&&(o.UserCredsIdentity="resourceIdentity"),o},y.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},y.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.UserCreds"},y.State=(i={},(e=Object.create(i))[i[0]="STATE_UNSPECIFIED"]=0,e[i[1]="ENABLED"]=1,e[i[2]="DISABLED"]=2,e),y.ResourceIdentity=(rt.prototype.principal="",rt.create=function(e){return new rt(e)},rt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.principal&&Object.hasOwnProperty.call(e,"principal")&&t.uint32(10).string(e.principal),t},rt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},rt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.admin.v1.UserCreds.ResourceIdentity;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.principal=e.string():e.skipType(7&a,o)}return i},rt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},rt.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.principal&&Object.hasOwnProperty.call(e,"principal")&&!p.isString(e.principal)?"principal: string expected":null},rt.fromObject=function(e,t){if(e instanceof f.google.firestore.admin.v1.UserCreds.ResourceIdentity)return e;if(!p.isObject(e))throw TypeError(".google.firestore.admin.v1.UserCreds.ResourceIdentity: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.admin.v1.UserCreds.ResourceIdentity;return null!=e.principal&&(t.principal=String(e.principal)),t},rt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.principal=""),null!=e.principal&&Object.hasOwnProperty.call(e,"principal")&&(r.principal=e.principal),r},rt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},rt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.UserCreds.ResourceIdentity"},rt),y),t.LocationMetadata=(ot.create=function(e){return new ot(e)},ot.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return t},ot.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ot.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,t=new f.google.firestore.admin.v1.LocationMetadata;e.pos<n;){var i=e.uint32();if(i===r)break;e.skipType(7&i,o)}return t},ot.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ot.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null},ot.fromObject=function(e,t){return e instanceof f.google.firestore.admin.v1.LocationMetadata?e:new f.google.firestore.admin.v1.LocationMetadata},ot.toObject=function(){return{}},ot.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ot.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.admin.v1.LocationMetadata"},ot),t),r),n.v1=((i={}).AggregationResult=(nt.prototype.aggregateFields=p.emptyObject,nt.create=function(e){return new nt(e)},nt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.aggregateFields&&Object.hasOwnProperty.call(e,"aggregateFields"))for(var o=Object.keys(e.aggregateFields),n=0;n<o.length;++n)t.uint32(18).fork().uint32(10).string(o[n]),f.google.firestore.v1.Value.encode(e.aggregateFields[o[n]],t.uint32(18).fork(),r+1).ldelim().ldelim();return t},nt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},nt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.AggregationResult;e.pos<n;){var a=e.uint32();if(a===r)break;if(a>>>3==2){i.aggregateFields===p.emptyObject&&(i.aggregateFields={});for(var s=e.uint32()+e.pos,l="",c=null;e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.aggregateFields,l),i.aggregateFields[l]=c}else e.skipType(7&a,o)}return i},nt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},nt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.aggregateFields&&Object.hasOwnProperty.call(e,"aggregateFields")){if(!p.isObject(e.aggregateFields))return"aggregateFields: object expected";for(var r=Object.keys(e.aggregateFields),o=0;o<r.length;++o){var n=f.google.firestore.v1.Value.verify(e.aggregateFields[r[o]],t+1);if(n)return"aggregateFields."+n}}return null},nt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.AggregationResult)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.AggregationResult: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.AggregationResult;if(e.aggregateFields){if(!p.isObject(e.aggregateFields))throw TypeError(".google.firestore.v1.AggregationResult.aggregateFields: object expected");r.aggregateFields={};for(var o=Object.keys(e.aggregateFields),n=0;n<o.length;++n){if("__proto__"===o[n]&&p.makeProp(r.aggregateFields,o[n]),!p.isObject(e.aggregateFields[o[n]]))throw TypeError(".google.firestore.v1.AggregationResult.aggregateFields: object expected");r.aggregateFields[o[n]]=f.google.firestore.v1.Value.fromObject(e.aggregateFields[o[n]],t+1)}}return r},nt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.objects||t.defaults)&&(n.aggregateFields={}),e.aggregateFields&&(o=Object.keys(e.aggregateFields)).length){n.aggregateFields={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.aggregateFields,o[i]),n.aggregateFields[o[i]]=f.google.firestore.v1.Value.toObject(e.aggregateFields[o[i]],t,r+1)}return n},nt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},nt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.AggregationResult"},nt),i.Document=(it.prototype.name="",it.prototype.fields=p.emptyObject,it.prototype.createTime=null,it.prototype.updateTime=null,it.create=function(e){return new it(e)},it.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.fields&&Object.hasOwnProperty.call(e,"fields"))for(var o=Object.keys(e.fields),n=0;n<o.length;++n)t.uint32(18).fork().uint32(10).string(o[n]),f.google.firestore.v1.Value.encode(e.fields[o[n]],t.uint32(18).fork(),r+1).ldelim().ldelim();return null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&f.google.protobuf.Timestamp.encode(e.createTime,t.uint32(26).fork(),r+1).ldelim(),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&f.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(34).fork(),r+1).ldelim(),t},it.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},it.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.Document;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.fields===p.emptyObject&&(i.fields={});for(var s=e.uint32()+e.pos,l="",c=null;e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.fields,l),i.fields[l]=c;break;case 3:i.createTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 4:i.updateTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},it.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},it.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.fields&&Object.hasOwnProperty.call(e,"fields")){if(!p.isObject(e.fields))return"fields: object expected";for(var r=Object.keys(e.fields),o=0;o<r.length;++o)if(n=f.google.firestore.v1.Value.verify(e.fields[r[o]],t+1))return"fields."+n}var n;if(null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&(n=f.google.protobuf.Timestamp.verify(e.createTime,t+1)))return"createTime."+n;if(null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(n=f.google.protobuf.Timestamp.verify(e.updateTime,t+1)))return"updateTime."+n;return null},it.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.Document)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.Document: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.Document;if(null!=e.name&&(r.name=String(e.name)),e.fields){if(!p.isObject(e.fields))throw TypeError(".google.firestore.v1.Document.fields: object expected");r.fields={};for(var o=Object.keys(e.fields),n=0;n<o.length;++n){if("__proto__"===o[n]&&p.makeProp(r.fields,o[n]),!p.isObject(e.fields[o[n]]))throw TypeError(".google.firestore.v1.Document.fields: object expected");r.fields[o[n]]=f.google.firestore.v1.Value.fromObject(e.fields[o[n]],t+1)}}if(null!=e.createTime){if(!p.isObject(e.createTime))throw TypeError(".google.firestore.v1.Document.createTime: object expected");r.createTime=f.google.protobuf.Timestamp.fromObject(e.createTime,t+1)}if(null!=e.updateTime){if(!p.isObject(e.updateTime))throw TypeError(".google.firestore.v1.Document.updateTime: object expected");r.updateTime=f.google.protobuf.Timestamp.fromObject(e.updateTime,t+1)}return r},it.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.objects||t.defaults)&&(n.fields={}),t.defaults&&(n.name="",n.createTime=null,n.updateTime=null),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(n.name=e.name),e.fields&&(o=Object.keys(e.fields)).length){n.fields={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.fields,o[i]),n.fields[o[i]]=f.google.firestore.v1.Value.toObject(e.fields[o[i]],t,r+1)}return null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&(n.createTime=f.google.protobuf.Timestamp.toObject(e.createTime,t,r+1)),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(n.updateTime=f.google.protobuf.Timestamp.toObject(e.updateTime,t,r+1)),n},it.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},it.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.Document"},it),i.Value=(h.prototype.nullValue=null,h.prototype.booleanValue=null,h.prototype.integerValue=null,h.prototype.doubleValue=null,h.prototype.timestampValue=null,h.prototype.stringValue=null,h.prototype.bytesValue=null,h.prototype.referenceValue=null,h.prototype.geoPointValue=null,h.prototype.arrayValue=null,h.prototype.mapValue=null,h.prototype.fieldReferenceValue=null,h.prototype.variableReferenceValue=null,h.prototype.functionValue=null,h.prototype.pipelineValue=null,Object.defineProperty(h.prototype,"valueType",{get:p.oneOfGetter(e=["nullValue","booleanValue","integerValue","doubleValue","timestampValue","stringValue","bytesValue","referenceValue","geoPointValue","arrayValue","mapValue","fieldReferenceValue","variableReferenceValue","functionValue","pipelineValue"]),set:p.oneOfSetter(e)}),h.create=function(e){return new h(e)},h.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.booleanValue&&Object.hasOwnProperty.call(e,"booleanValue")&&t.uint32(8).bool(e.booleanValue),null!=e.integerValue&&Object.hasOwnProperty.call(e,"integerValue")&&t.uint32(16).int64(e.integerValue),null!=e.doubleValue&&Object.hasOwnProperty.call(e,"doubleValue")&&t.uint32(25).double(e.doubleValue),null!=e.referenceValue&&Object.hasOwnProperty.call(e,"referenceValue")&&t.uint32(42).string(e.referenceValue),null!=e.mapValue&&Object.hasOwnProperty.call(e,"mapValue")&&f.google.firestore.v1.MapValue.encode(e.mapValue,t.uint32(50).fork(),r+1).ldelim(),null!=e.geoPointValue&&Object.hasOwnProperty.call(e,"geoPointValue")&&f.google.type.LatLng.encode(e.geoPointValue,t.uint32(66).fork(),r+1).ldelim(),null!=e.arrayValue&&Object.hasOwnProperty.call(e,"arrayValue")&&f.google.firestore.v1.ArrayValue.encode(e.arrayValue,t.uint32(74).fork(),r+1).ldelim(),null!=e.timestampValue&&Object.hasOwnProperty.call(e,"timestampValue")&&f.google.protobuf.Timestamp.encode(e.timestampValue,t.uint32(82).fork(),r+1).ldelim(),null!=e.nullValue&&Object.hasOwnProperty.call(e,"nullValue")&&t.uint32(88).int32(e.nullValue),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&t.uint32(138).string(e.stringValue),null!=e.bytesValue&&Object.hasOwnProperty.call(e,"bytesValue")&&t.uint32(146).bytes(e.bytesValue),null!=e.fieldReferenceValue&&Object.hasOwnProperty.call(e,"fieldReferenceValue")&&t.uint32(154).string(e.fieldReferenceValue),null!=e.functionValue&&Object.hasOwnProperty.call(e,"functionValue")&&f.google.firestore.v1.Function.encode(e.functionValue,t.uint32(162).fork(),r+1).ldelim(),null!=e.pipelineValue&&Object.hasOwnProperty.call(e,"pipelineValue")&&f.google.firestore.v1.Pipeline.encode(e.pipelineValue,t.uint32(170).fork(),r+1).ldelim(),null!=e.variableReferenceValue&&Object.hasOwnProperty.call(e,"variableReferenceValue")&&t.uint32(178).string(e.variableReferenceValue),t},h.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},h.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.Value;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 11:i.nullValue=e.int32();break;case 1:i.booleanValue=e.bool();break;case 2:i.integerValue=e.int64();break;case 3:i.doubleValue=e.double();break;case 10:i.timestampValue=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 17:i.stringValue=e.string();break;case 18:i.bytesValue=e.bytes();break;case 5:i.referenceValue=e.string();break;case 8:i.geoPointValue=f.google.type.LatLng.decode(e,e.uint32(),void 0,o+1);break;case 9:i.arrayValue=f.google.firestore.v1.ArrayValue.decode(e,e.uint32(),void 0,o+1);break;case 6:i.mapValue=f.google.firestore.v1.MapValue.decode(e,e.uint32(),void 0,o+1);break;case 19:i.fieldReferenceValue=e.string();break;case 22:i.variableReferenceValue=e.string();break;case 20:i.functionValue=f.google.firestore.v1.Function.decode(e,e.uint32(),void 0,o+1);break;case 21:i.pipelineValue=f.google.firestore.v1.Pipeline.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},h.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},h.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.nullValue&&Object.hasOwnProperty.call(e,"nullValue")&&(o.valueType=1,0!==e.nullValue))return"nullValue: enum value expected";if(null!=e.booleanValue&&Object.hasOwnProperty.call(e,"booleanValue")){if(1===o.valueType)return"valueType: multiple values";if(o.valueType=1,"boolean"!=typeof e.booleanValue)return"booleanValue: boolean expected"}if(null!=e.integerValue&&Object.hasOwnProperty.call(e,"integerValue")){if(1===o.valueType)return"valueType: multiple values";if(o.valueType=1,!(p.isInteger(e.integerValue)||e.integerValue&&p.isInteger(e.integerValue.low)&&p.isInteger(e.integerValue.high)))return"integerValue: integer|Long expected"}if(null!=e.doubleValue&&Object.hasOwnProperty.call(e,"doubleValue")){if(1===o.valueType)return"valueType: multiple values";if(o.valueType=1,"number"!=typeof e.doubleValue)return"doubleValue: number expected"}if(null!=e.timestampValue&&Object.hasOwnProperty.call(e,"timestampValue")){if(1===o.valueType)return"valueType: multiple values";if(r=f.google.protobuf.Timestamp.verify(e.timestampValue,t+(o.valueType=1)))return"timestampValue."+r}if(null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")){if(1===o.valueType)return"valueType: multiple values";if(o.valueType=1,!p.isString(e.stringValue))return"stringValue: string expected"}if(null!=e.bytesValue&&Object.hasOwnProperty.call(e,"bytesValue")){if(1===o.valueType)return"valueType: multiple values";if(o.valueType=1,!(e.bytesValue&&"number"==typeof e.bytesValue.length||p.isString(e.bytesValue)))return"bytesValue: buffer expected"}if(null!=e.referenceValue&&Object.hasOwnProperty.call(e,"referenceValue")){if(1===o.valueType)return"valueType: multiple values";if(o.valueType=1,!p.isString(e.referenceValue))return"referenceValue: string expected"}if(null!=e.geoPointValue&&Object.hasOwnProperty.call(e,"geoPointValue")){if(1===o.valueType)return"valueType: multiple values";if(r=f.google.type.LatLng.verify(e.geoPointValue,t+(o.valueType=1)))return"geoPointValue."+r}if(null!=e.arrayValue&&Object.hasOwnProperty.call(e,"arrayValue")){if(1===o.valueType)return"valueType: multiple values";if(r=f.google.firestore.v1.ArrayValue.verify(e.arrayValue,t+(o.valueType=1)))return"arrayValue."+r}if(null!=e.mapValue&&Object.hasOwnProperty.call(e,"mapValue")){if(1===o.valueType)return"valueType: multiple values";if(r=f.google.firestore.v1.MapValue.verify(e.mapValue,t+(o.valueType=1)))return"mapValue."+r}if(null!=e.fieldReferenceValue&&Object.hasOwnProperty.call(e,"fieldReferenceValue")){if(1===o.valueType)return"valueType: multiple values";if(o.valueType=1,!p.isString(e.fieldReferenceValue))return"fieldReferenceValue: string expected"}if(null!=e.variableReferenceValue&&Object.hasOwnProperty.call(e,"variableReferenceValue")){if(1===o.valueType)return"valueType: multiple values";if(o.valueType=1,!p.isString(e.variableReferenceValue))return"variableReferenceValue: string expected"}if(null!=e.functionValue&&Object.hasOwnProperty.call(e,"functionValue")){if(1===o.valueType)return"valueType: multiple values";if(r=f.google.firestore.v1.Function.verify(e.functionValue,t+(o.valueType=1)))return"functionValue."+r}if(null!=e.pipelineValue&&Object.hasOwnProperty.call(e,"pipelineValue")){if(1===o.valueType)return"valueType: multiple values";if(r=f.google.firestore.v1.Pipeline.verify(e.pipelineValue,t+(o.valueType=1)))return"pipelineValue."+r}return null},h.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.Value)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.Value: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.Value;switch(e.nullValue){default:"number"==typeof e.nullValue&&(r.nullValue=e.nullValue);break;case"NULL_VALUE":case 0:r.nullValue=0}if(null!=e.booleanValue&&(r.booleanValue=Boolean(e.booleanValue)),null!=e.integerValue&&(p.Long?r.integerValue=p.Long.fromValue(e.integerValue,!1):"string"==typeof e.integerValue?r.integerValue=parseInt(e.integerValue,10):"number"==typeof e.integerValue?r.integerValue=e.integerValue:"object"==typeof e.integerValue&&(r.integerValue=new p.LongBits(e.integerValue.low>>>0,e.integerValue.high>>>0).toNumber())),null!=e.doubleValue&&(r.doubleValue=Number(e.doubleValue)),null!=e.timestampValue){if(!p.isObject(e.timestampValue))throw TypeError(".google.firestore.v1.Value.timestampValue: object expected");r.timestampValue=f.google.protobuf.Timestamp.fromObject(e.timestampValue,t+1)}if(null!=e.stringValue&&(r.stringValue=String(e.stringValue)),null!=e.bytesValue&&("string"==typeof e.bytesValue?p.base64.decode(e.bytesValue,r.bytesValue=p.newBuffer(p.base64.length(e.bytesValue)),0):0<=e.bytesValue.length&&(r.bytesValue=e.bytesValue)),null!=e.referenceValue&&(r.referenceValue=String(e.referenceValue)),null!=e.geoPointValue){if(!p.isObject(e.geoPointValue))throw TypeError(".google.firestore.v1.Value.geoPointValue: object expected");r.geoPointValue=f.google.type.LatLng.fromObject(e.geoPointValue,t+1)}if(null!=e.arrayValue){if(!p.isObject(e.arrayValue))throw TypeError(".google.firestore.v1.Value.arrayValue: object expected");r.arrayValue=f.google.firestore.v1.ArrayValue.fromObject(e.arrayValue,t+1)}if(null!=e.mapValue){if(!p.isObject(e.mapValue))throw TypeError(".google.firestore.v1.Value.mapValue: object expected");r.mapValue=f.google.firestore.v1.MapValue.fromObject(e.mapValue,t+1)}if(null!=e.fieldReferenceValue&&(r.fieldReferenceValue=String(e.fieldReferenceValue)),null!=e.variableReferenceValue&&(r.variableReferenceValue=String(e.variableReferenceValue)),null!=e.functionValue){if(!p.isObject(e.functionValue))throw TypeError(".google.firestore.v1.Value.functionValue: object expected");r.functionValue=f.google.firestore.v1.Function.fromObject(e.functionValue,t+1)}if(null!=e.pipelineValue){if(!p.isObject(e.pipelineValue))throw TypeError(".google.firestore.v1.Value.pipelineValue: object expected");r.pipelineValue=f.google.firestore.v1.Pipeline.fromObject(e.pipelineValue,t+1)}return r},h.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return null!=e.booleanValue&&Object.hasOwnProperty.call(e,"booleanValue")&&(o.booleanValue=e.booleanValue,t.oneofs)&&(o.valueType="booleanValue"),null!=e.integerValue&&Object.hasOwnProperty.call(e,"integerValue")&&("undefined"!=typeof BigInt&&t.longs===BigInt?o.integerValue="number"==typeof e.integerValue?BigInt(e.integerValue):p.Long.fromBits(e.integerValue.low>>>0,e.integerValue.high>>>0,!1).toBigInt():"number"==typeof e.integerValue?o.integerValue=t.longs===String?String(e.integerValue):e.integerValue:o.integerValue=t.longs===String?p.Long.prototype.toString.call(e.integerValue):t.longs===Number?new p.LongBits(e.integerValue.low>>>0,e.integerValue.high>>>0).toNumber():e.integerValue,t.oneofs)&&(o.valueType="integerValue"),null!=e.doubleValue&&Object.hasOwnProperty.call(e,"doubleValue")&&(o.doubleValue=t.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue,t.oneofs)&&(o.valueType="doubleValue"),null!=e.referenceValue&&Object.hasOwnProperty.call(e,"referenceValue")&&(o.referenceValue=e.referenceValue,t.oneofs)&&(o.valueType="referenceValue"),null!=e.mapValue&&Object.hasOwnProperty.call(e,"mapValue")&&(o.mapValue=f.google.firestore.v1.MapValue.toObject(e.mapValue,t,r+1),t.oneofs)&&(o.valueType="mapValue"),null!=e.geoPointValue&&Object.hasOwnProperty.call(e,"geoPointValue")&&(o.geoPointValue=f.google.type.LatLng.toObject(e.geoPointValue,t,r+1),t.oneofs)&&(o.valueType="geoPointValue"),null!=e.arrayValue&&Object.hasOwnProperty.call(e,"arrayValue")&&(o.arrayValue=f.google.firestore.v1.ArrayValue.toObject(e.arrayValue,t,r+1),t.oneofs)&&(o.valueType="arrayValue"),null!=e.timestampValue&&Object.hasOwnProperty.call(e,"timestampValue")&&(o.timestampValue=f.google.protobuf.Timestamp.toObject(e.timestampValue,t,r+1),t.oneofs)&&(o.valueType="timestampValue"),null!=e.nullValue&&Object.hasOwnProperty.call(e,"nullValue")&&(o.nullValue=t.enums!==String||void 0===f.google.protobuf.NullValue[e.nullValue]?e.nullValue:f.google.protobuf.NullValue[e.nullValue],t.oneofs)&&(o.valueType="nullValue"),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&(o.stringValue=e.stringValue,t.oneofs)&&(o.valueType="stringValue"),null!=e.bytesValue&&Object.hasOwnProperty.call(e,"bytesValue")&&(o.bytesValue=t.bytes===String?p.base64.encode(e.bytesValue,0,e.bytesValue.length):t.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue,t.oneofs)&&(o.valueType="bytesValue"),null!=e.fieldReferenceValue&&Object.hasOwnProperty.call(e,"fieldReferenceValue")&&(o.fieldReferenceValue=e.fieldReferenceValue,t.oneofs)&&(o.valueType="fieldReferenceValue"),null!=e.functionValue&&Object.hasOwnProperty.call(e,"functionValue")&&(o.functionValue=f.google.firestore.v1.Function.toObject(e.functionValue,t,r+1),t.oneofs)&&(o.valueType="functionValue"),null!=e.pipelineValue&&Object.hasOwnProperty.call(e,"pipelineValue")&&(o.pipelineValue=f.google.firestore.v1.Pipeline.toObject(e.pipelineValue,t,r+1),t.oneofs)&&(o.valueType="pipelineValue"),null!=e.variableReferenceValue&&Object.hasOwnProperty.call(e,"variableReferenceValue")&&(o.variableReferenceValue=e.variableReferenceValue,t.oneofs)&&(o.valueType="variableReferenceValue"),o},h.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},h.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.Value"},h),i.ArrayValue=(at.prototype.values=p.emptyArray,at.create=function(e){return new at(e)},at.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.values&&e.values.length)for(var o=0;o<e.values.length;++o)f.google.firestore.v1.Value.encode(e.values[o],t.uint32(10).fork(),r+1).ldelim();return t},at.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},at.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.ArrayValue;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?(i.values&&i.values.length||(i.values=[]),i.values.push(f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1))):e.skipType(7&a,o)}return i},at.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},at.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.values&&Object.hasOwnProperty.call(e,"values")){if(!Array.isArray(e.values))return"values: array expected";for(var r=0;r<e.values.length;++r){var o=f.google.firestore.v1.Value.verify(e.values[r],t+1);if(o)return"values."+o}}return null},at.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.ArrayValue)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.ArrayValue: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.ArrayValue;if(e.values){if(!Array.isArray(e.values))throw TypeError(".google.firestore.v1.ArrayValue.values: array expected");r.values=[];for(var o=0;o<e.values.length;++o){if(!p.isObject(e.values[o]))throw TypeError(".google.firestore.v1.ArrayValue.values: object expected");r.values[o]=f.google.firestore.v1.Value.fromObject(e.values[o],t+1)}}return r},at.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.values=[]),e.values&&e.values.length){o.values=[];for(var n=0;n<e.values.length;++n)o.values[n]=f.google.firestore.v1.Value.toObject(e.values[n],t,r+1)}return o},at.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},at.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ArrayValue"},at),i.MapValue=(st.prototype.fields=p.emptyObject,st.create=function(e){return new st(e)},st.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.fields&&Object.hasOwnProperty.call(e,"fields"))for(var o=Object.keys(e.fields),n=0;n<o.length;++n)t.uint32(10).fork().uint32(10).string(o[n]),f.google.firestore.v1.Value.encode(e.fields[o[n]],t.uint32(18).fork(),r+1).ldelim().ldelim();return t},st.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},st.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.MapValue;e.pos<n;){var a=e.uint32();if(a===r)break;if(a>>>3==1){i.fields===p.emptyObject&&(i.fields={});for(var s=e.uint32()+e.pos,l="",c=null;e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.fields,l),i.fields[l]=c}else e.skipType(7&a,o)}return i},st.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},st.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.fields&&Object.hasOwnProperty.call(e,"fields")){if(!p.isObject(e.fields))return"fields: object expected";for(var r=Object.keys(e.fields),o=0;o<r.length;++o){var n=f.google.firestore.v1.Value.verify(e.fields[r[o]],t+1);if(n)return"fields."+n}}return null},st.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.MapValue)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.MapValue: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.MapValue;if(e.fields){if(!p.isObject(e.fields))throw TypeError(".google.firestore.v1.MapValue.fields: object expected");r.fields={};for(var o=Object.keys(e.fields),n=0;n<o.length;++n){if("__proto__"===o[n]&&p.makeProp(r.fields,o[n]),!p.isObject(e.fields[o[n]]))throw TypeError(".google.firestore.v1.MapValue.fields: object expected");r.fields[o[n]]=f.google.firestore.v1.Value.fromObject(e.fields[o[n]],t+1)}}return r},st.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.objects||t.defaults)&&(n.fields={}),e.fields&&(o=Object.keys(e.fields)).length){n.fields={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.fields,o[i]),n.fields[o[i]]=f.google.firestore.v1.Value.toObject(e.fields[o[i]],t,r+1)}return n},st.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},st.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.MapValue"},st),i.Function=(lt.prototype.name="",lt.prototype.args=p.emptyArray,lt.prototype.options=p.emptyObject,lt.create=function(e){return new lt(e)},lt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.args&&e.args.length)for(var o=0;o<e.args.length;++o)f.google.firestore.v1.Value.encode(e.args[o],t.uint32(18).fork(),r+1).ldelim();if(null!=e.options&&Object.hasOwnProperty.call(e,"options"))for(var n=Object.keys(e.options),o=0;o<n.length;++o)t.uint32(26).fork().uint32(10).string(n[o]),f.google.firestore.v1.Value.encode(e.options[n[o]],t.uint32(18).fork(),r+1).ldelim().ldelim();return t},lt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},lt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.Function;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.args&&i.args.length||(i.args=[]),i.args.push(f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1));break;case 3:i.options===p.emptyObject&&(i.options={});for(var s=e.uint32()+e.pos,l="",c=null;e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.options,l),i.options[l]=c;break;default:e.skipType(7&a,o)}}return i},lt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},lt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.args&&Object.hasOwnProperty.call(e,"args")){if(!Array.isArray(e.args))return"args: array expected";for(var r=0;r<e.args.length;++r)if(o=f.google.firestore.v1.Value.verify(e.args[r],t+1))return"args."+o}if(null!=e.options&&Object.hasOwnProperty.call(e,"options")){if(!p.isObject(e.options))return"options: object expected";for(var o,n=Object.keys(e.options),r=0;r<n.length;++r)if(o=f.google.firestore.v1.Value.verify(e.options[n[r]],t+1))return"options."+o}return null},lt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.Function)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.Function: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.Function;if(null!=e.name&&(r.name=String(e.name)),e.args){if(!Array.isArray(e.args))throw TypeError(".google.firestore.v1.Function.args: array expected");r.args=[];for(var o=0;o<e.args.length;++o){if(!p.isObject(e.args[o]))throw TypeError(".google.firestore.v1.Function.args: object expected");r.args[o]=f.google.firestore.v1.Value.fromObject(e.args[o],t+1)}}if(e.options){if(!p.isObject(e.options))throw TypeError(".google.firestore.v1.Function.options: object expected");r.options={};for(var n=Object.keys(e.options),o=0;o<n.length;++o){if("__proto__"===n[o]&&p.makeProp(r.options,n[o]),!p.isObject(e.options[n[o]]))throw TypeError(".google.firestore.v1.Function.options: object expected");r.options[n[o]]=f.google.firestore.v1.Value.fromObject(e.options[n[o]],t+1)}}return r},lt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.arrays||t.defaults)&&(n.args=[]),(t.objects||t.defaults)&&(n.options={}),t.defaults&&(n.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(n.name=e.name),e.args&&e.args.length){n.args=[];for(var i=0;i<e.args.length;++i)n.args[i]=f.google.firestore.v1.Value.toObject(e.args[i],t,r+1)}if(e.options&&(o=Object.keys(e.options)).length){n.options={};for(i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.options,o[i]),n.options[o[i]]=f.google.firestore.v1.Value.toObject(e.options[o[i]],t,r+1)}return n},lt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},lt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.Function"},lt),i.Pipeline=(ct.prototype.stages=p.emptyArray,ct.create=function(e){return new ct(e)},ct.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.stages&&e.stages.length)for(var o=0;o<e.stages.length;++o)f.google.firestore.v1.Pipeline.Stage.encode(e.stages[o],t.uint32(10).fork(),r+1).ldelim();return t},ct.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ct.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.Pipeline;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?(i.stages&&i.stages.length||(i.stages=[]),i.stages.push(f.google.firestore.v1.Pipeline.Stage.decode(e,e.uint32(),void 0,o+1))):e.skipType(7&a,o)}return i},ct.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ct.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.stages&&Object.hasOwnProperty.call(e,"stages")){if(!Array.isArray(e.stages))return"stages: array expected";for(var r=0;r<e.stages.length;++r){var o=f.google.firestore.v1.Pipeline.Stage.verify(e.stages[r],t+1);if(o)return"stages."+o}}return null},ct.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.Pipeline)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.Pipeline: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.Pipeline;if(e.stages){if(!Array.isArray(e.stages))throw TypeError(".google.firestore.v1.Pipeline.stages: array expected");r.stages=[];for(var o=0;o<e.stages.length;++o){if(!p.isObject(e.stages[o]))throw TypeError(".google.firestore.v1.Pipeline.stages: object expected");r.stages[o]=f.google.firestore.v1.Pipeline.Stage.fromObject(e.stages[o],t+1)}}return r},ct.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.stages=[]),e.stages&&e.stages.length){o.stages=[];for(var n=0;n<e.stages.length;++n)o.stages[n]=f.google.firestore.v1.Pipeline.Stage.toObject(e.stages[n],t,r+1)}return o},ct.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ct.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.Pipeline"},ct.Stage=(ut.prototype.name="",ut.prototype.args=p.emptyArray,ut.prototype.options=p.emptyObject,ut.create=function(e){return new ut(e)},ut.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.args&&e.args.length)for(var o=0;o<e.args.length;++o)f.google.firestore.v1.Value.encode(e.args[o],t.uint32(18).fork(),r+1).ldelim();if(null!=e.options&&Object.hasOwnProperty.call(e,"options"))for(var n=Object.keys(e.options),o=0;o<n.length;++o)t.uint32(26).fork().uint32(10).string(n[o]),f.google.firestore.v1.Value.encode(e.options[n[o]],t.uint32(18).fork(),r+1).ldelim().ldelim();return t},ut.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ut.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.Pipeline.Stage;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.args&&i.args.length||(i.args=[]),i.args.push(f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1));break;case 3:i.options===p.emptyObject&&(i.options={});for(var s=e.uint32()+e.pos,l="",c=null;e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.options,l),i.options[l]=c;break;default:e.skipType(7&a,o)}}return i},ut.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ut.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.args&&Object.hasOwnProperty.call(e,"args")){if(!Array.isArray(e.args))return"args: array expected";for(var r=0;r<e.args.length;++r)if(o=f.google.firestore.v1.Value.verify(e.args[r],t+1))return"args."+o}if(null!=e.options&&Object.hasOwnProperty.call(e,"options")){if(!p.isObject(e.options))return"options: object expected";for(var o,n=Object.keys(e.options),r=0;r<n.length;++r)if(o=f.google.firestore.v1.Value.verify(e.options[n[r]],t+1))return"options."+o}return null},ut.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.Pipeline.Stage)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.Pipeline.Stage: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.Pipeline.Stage;if(null!=e.name&&(r.name=String(e.name)),e.args){if(!Array.isArray(e.args))throw TypeError(".google.firestore.v1.Pipeline.Stage.args: array expected");r.args=[];for(var o=0;o<e.args.length;++o){if(!p.isObject(e.args[o]))throw TypeError(".google.firestore.v1.Pipeline.Stage.args: object expected");r.args[o]=f.google.firestore.v1.Value.fromObject(e.args[o],t+1)}}if(e.options){if(!p.isObject(e.options))throw TypeError(".google.firestore.v1.Pipeline.Stage.options: object expected");r.options={};for(var n=Object.keys(e.options),o=0;o<n.length;++o){if("__proto__"===n[o]&&p.makeProp(r.options,n[o]),!p.isObject(e.options[n[o]]))throw TypeError(".google.firestore.v1.Pipeline.Stage.options: object expected");r.options[n[o]]=f.google.firestore.v1.Value.fromObject(e.options[n[o]],t+1)}}return r},ut.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.arrays||t.defaults)&&(n.args=[]),(t.objects||t.defaults)&&(n.options={}),t.defaults&&(n.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(n.name=e.name),e.args&&e.args.length){n.args=[];for(var i=0;i<e.args.length;++i)n.args[i]=f.google.firestore.v1.Value.toObject(e.args[i],t,r+1)}if(e.options&&(o=Object.keys(e.options)).length){n.options={};for(i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.options,o[i]),n.options[o[i]]=f.google.firestore.v1.Value.toObject(e.options[o[i]],t,r+1)}return n},ut.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ut.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.Pipeline.Stage"},ut),ct),i.BitSequence=(dt.prototype.bitmap=p.newBuffer([]),dt.prototype.padding=0,dt.create=function(e){return new dt(e)},dt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.bitmap&&Object.hasOwnProperty.call(e,"bitmap")&&t.uint32(10).bytes(e.bitmap),null!=e.padding&&Object.hasOwnProperty.call(e,"padding")&&t.uint32(16).int32(e.padding),t},dt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},dt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.BitSequence;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.bitmap=e.bytes();break;case 2:i.padding=e.int32();break;default:e.skipType(7&a,o)}}return i},dt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},dt.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.bitmap&&Object.hasOwnProperty.call(e,"bitmap")&&!(e.bitmap&&"number"==typeof e.bitmap.length||p.isString(e.bitmap))?"bitmap: buffer expected":null!=e.padding&&Object.hasOwnProperty.call(e,"padding")&&!p.isInteger(e.padding)?"padding: integer expected":null},dt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.BitSequence)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.BitSequence: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.v1.BitSequence;return null!=e.bitmap&&("string"==typeof e.bitmap?p.base64.decode(e.bitmap,t.bitmap=p.newBuffer(p.base64.length(e.bitmap)),0):0<=e.bitmap.length&&(t.bitmap=e.bitmap)),null!=e.padding&&(t.padding=0|e.padding),t},dt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(t.bytes===String?r.bitmap="":(r.bitmap=[],t.bytes!==Array&&(r.bitmap=p.newBuffer(r.bitmap))),r.padding=0),null!=e.bitmap&&Object.hasOwnProperty.call(e,"bitmap")&&(r.bitmap=t.bytes===String?p.base64.encode(e.bitmap,0,e.bitmap.length):t.bytes===Array?Array.prototype.slice.call(e.bitmap):e.bitmap),null!=e.padding&&Object.hasOwnProperty.call(e,"padding")&&(r.padding=e.padding),r},dt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},dt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.BitSequence"},dt),i.BloomFilter=(pt.prototype.bits=null,pt.prototype.hashCount=0,pt.create=function(e){return new pt(e)},pt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.bits&&Object.hasOwnProperty.call(e,"bits")&&f.google.firestore.v1.BitSequence.encode(e.bits,t.uint32(10).fork(),r+1).ldelim(),null!=e.hashCount&&Object.hasOwnProperty.call(e,"hashCount")&&t.uint32(16).int32(e.hashCount),t},pt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},pt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.BloomFilter;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.bits=f.google.firestore.v1.BitSequence.decode(e,e.uint32(),void 0,o+1);break;case 2:i.hashCount=e.int32();break;default:e.skipType(7&a,o)}}return i},pt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},pt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.bits&&Object.hasOwnProperty.call(e,"bits")){t=f.google.firestore.v1.BitSequence.verify(e.bits,t+1);if(t)return"bits."+t}return null!=e.hashCount&&Object.hasOwnProperty.call(e,"hashCount")&&!p.isInteger(e.hashCount)?"hashCount: integer expected":null},pt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.BloomFilter)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.BloomFilter: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.BloomFilter;if(null!=e.bits){if(!p.isObject(e.bits))throw TypeError(".google.firestore.v1.BloomFilter.bits: object expected");r.bits=f.google.firestore.v1.BitSequence.fromObject(e.bits,t+1)}return null!=e.hashCount&&(r.hashCount=0|e.hashCount),r},pt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.bits=null,o.hashCount=0),null!=e.bits&&Object.hasOwnProperty.call(e,"bits")&&(o.bits=f.google.firestore.v1.BitSequence.toObject(e.bits,t,r+1)),null!=e.hashCount&&Object.hasOwnProperty.call(e,"hashCount")&&(o.hashCount=e.hashCount),o},pt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},pt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.BloomFilter"},pt),i.DocumentMask=(ft.prototype.fieldPaths=p.emptyArray,ft.create=function(e){return new ft(e)},ft.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.fieldPaths&&e.fieldPaths.length)for(var o=0;o<e.fieldPaths.length;++o)t.uint32(10).string(e.fieldPaths[o]);return t},ft.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ft.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.DocumentMask;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?(i.fieldPaths&&i.fieldPaths.length||(i.fieldPaths=[]),i.fieldPaths.push(e.string())):e.skipType(7&a,o)}return i},ft.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ft.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.fieldPaths&&Object.hasOwnProperty.call(e,"fieldPaths")){if(!Array.isArray(e.fieldPaths))return"fieldPaths: array expected";for(var r=0;r<e.fieldPaths.length;++r)if(!p.isString(e.fieldPaths[r]))return"fieldPaths: string[] expected"}return null},ft.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.DocumentMask)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.DocumentMask: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.DocumentMask;if(e.fieldPaths){if(!Array.isArray(e.fieldPaths))throw TypeError(".google.firestore.v1.DocumentMask.fieldPaths: array expected");r.fieldPaths=[];for(var o=0;o<e.fieldPaths.length;++o)r.fieldPaths[o]=String(e.fieldPaths[o])}return r},ft.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.fieldPaths=[]),e.fieldPaths&&e.fieldPaths.length){o.fieldPaths=[];for(var n=0;n<e.fieldPaths.length;++n)o.fieldPaths[n]=e.fieldPaths[n]}return o},ft.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ft.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.DocumentMask"},ft),i.Precondition=(gt.prototype.exists=null,gt.prototype.updateTime=null,Object.defineProperty(gt.prototype,"conditionType",{get:p.oneOfGetter(e=["exists","updateTime"]),set:p.oneOfSetter(e)}),gt.create=function(e){return new gt(e)},gt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.exists&&Object.hasOwnProperty.call(e,"exists")&&t.uint32(8).bool(e.exists),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&f.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(18).fork(),r+1).ldelim(),t},gt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},gt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.Precondition;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.exists=e.bool();break;case 2:i.updateTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},gt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},gt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r={};if(null!=e.exists&&Object.hasOwnProperty.call(e,"exists")&&(r.conditionType=1,"boolean"!=typeof e.exists))return"exists: boolean expected";if(null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")){if(1===r.conditionType)return"conditionType: multiple values";e=f.google.protobuf.Timestamp.verify(e.updateTime,t+(r.conditionType=1));if(e)return"updateTime."+e}return null},gt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.Precondition)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.Precondition: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.Precondition;if(null!=e.exists&&(r.exists=Boolean(e.exists)),null!=e.updateTime){if(!p.isObject(e.updateTime))throw TypeError(".google.firestore.v1.Precondition.updateTime: object expected");r.updateTime=f.google.protobuf.Timestamp.fromObject(e.updateTime,t+1)}return r},gt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return null!=e.exists&&Object.hasOwnProperty.call(e,"exists")&&(o.exists=e.exists,t.oneofs)&&(o.conditionType="exists"),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(o.updateTime=f.google.protobuf.Timestamp.toObject(e.updateTime,t,r+1),t.oneofs)&&(o.conditionType="updateTime"),o},gt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},gt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.Precondition"},gt),i.TransactionOptions=(mt.prototype.readOnly=null,mt.prototype.readWrite=null,Object.defineProperty(mt.prototype,"mode",{get:p.oneOfGetter(e=["readOnly","readWrite"]),set:p.oneOfSetter(e)}),mt.create=function(e){return new mt(e)},mt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.readOnly&&Object.hasOwnProperty.call(e,"readOnly")&&f.google.firestore.v1.TransactionOptions.ReadOnly.encode(e.readOnly,t.uint32(18).fork(),r+1).ldelim(),null!=e.readWrite&&Object.hasOwnProperty.call(e,"readWrite")&&f.google.firestore.v1.TransactionOptions.ReadWrite.encode(e.readWrite,t.uint32(26).fork(),r+1).ldelim(),t},mt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},mt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.TransactionOptions;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 2:i.readOnly=f.google.firestore.v1.TransactionOptions.ReadOnly.decode(e,e.uint32(),void 0,o+1);break;case 3:i.readWrite=f.google.firestore.v1.TransactionOptions.ReadWrite.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},mt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},mt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.readOnly&&Object.hasOwnProperty.call(e,"readOnly")&&(r=f.google.firestore.v1.TransactionOptions.ReadOnly.verify(e.readOnly,t+(o.mode=1))))return"readOnly."+r;if(null!=e.readWrite&&Object.hasOwnProperty.call(e,"readWrite")){if(1===o.mode)return"mode: multiple values";if(r=f.google.firestore.v1.TransactionOptions.ReadWrite.verify(e.readWrite,t+(o.mode=1)))return"readWrite."+r}return null},mt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.TransactionOptions)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.TransactionOptions: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.TransactionOptions;if(null!=e.readOnly){if(!p.isObject(e.readOnly))throw TypeError(".google.firestore.v1.TransactionOptions.readOnly: object expected");r.readOnly=f.google.firestore.v1.TransactionOptions.ReadOnly.fromObject(e.readOnly,t+1)}if(null!=e.readWrite){if(!p.isObject(e.readWrite))throw TypeError(".google.firestore.v1.TransactionOptions.readWrite: object expected");r.readWrite=f.google.firestore.v1.TransactionOptions.ReadWrite.fromObject(e.readWrite,t+1)}return r},mt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return null!=e.readOnly&&Object.hasOwnProperty.call(e,"readOnly")&&(o.readOnly=f.google.firestore.v1.TransactionOptions.ReadOnly.toObject(e.readOnly,t,r+1),t.oneofs)&&(o.mode="readOnly"),null!=e.readWrite&&Object.hasOwnProperty.call(e,"readWrite")&&(o.readWrite=f.google.firestore.v1.TransactionOptions.ReadWrite.toObject(e.readWrite,t,r+1),t.oneofs)&&(o.mode="readWrite"),o},mt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},mt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.TransactionOptions"},mt.ConcurrencyMode=(e={},(t=Object.create(e))[e[0]="CONCURRENCY_MODE_UNSPECIFIED"]=0,t[e[1]="OPTIMISTIC"]=1,t[e[2]="PESSIMISTIC"]=2,t),mt.ReadWrite=(bt.prototype.retryTransaction=p.newBuffer([]),bt.prototype.concurrencyMode=0,bt.create=function(e){return new bt(e)},bt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.retryTransaction&&Object.hasOwnProperty.call(e,"retryTransaction")&&t.uint32(10).bytes(e.retryTransaction),null!=e.concurrencyMode&&Object.hasOwnProperty.call(e,"concurrencyMode")&&t.uint32(16).int32(e.concurrencyMode),t},bt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},bt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.TransactionOptions.ReadWrite;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.retryTransaction=e.bytes();break;case 2:i.concurrencyMode=e.int32();break;default:e.skipType(7&a,o)}}return i},bt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},bt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.retryTransaction&&Object.hasOwnProperty.call(e,"retryTransaction")&&!(e.retryTransaction&&"number"==typeof e.retryTransaction.length||p.isString(e.retryTransaction)))return"retryTransaction: buffer expected";if(null!=e.concurrencyMode&&Object.hasOwnProperty.call(e,"concurrencyMode"))switch(e.concurrencyMode){default:return"concurrencyMode: enum value expected";case 0:case 1:case 2:}return null},bt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.TransactionOptions.ReadWrite)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.TransactionOptions.ReadWrite: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.TransactionOptions.ReadWrite;switch(null!=e.retryTransaction&&("string"==typeof e.retryTransaction?p.base64.decode(e.retryTransaction,r.retryTransaction=p.newBuffer(p.base64.length(e.retryTransaction)),0):0<=e.retryTransaction.length&&(r.retryTransaction=e.retryTransaction)),e.concurrencyMode){default:"number"==typeof e.concurrencyMode&&(r.concurrencyMode=e.concurrencyMode);break;case"CONCURRENCY_MODE_UNSPECIFIED":case 0:r.concurrencyMode=0;break;case"OPTIMISTIC":case 1:r.concurrencyMode=1;break;case"PESSIMISTIC":case 2:r.concurrencyMode=2}return r},bt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(t.bytes===String?r.retryTransaction="":(r.retryTransaction=[],t.bytes!==Array&&(r.retryTransaction=p.newBuffer(r.retryTransaction))),r.concurrencyMode=t.enums===String?"CONCURRENCY_MODE_UNSPECIFIED":0),null!=e.retryTransaction&&Object.hasOwnProperty.call(e,"retryTransaction")&&(r.retryTransaction=t.bytes===String?p.base64.encode(e.retryTransaction,0,e.retryTransaction.length):t.bytes===Array?Array.prototype.slice.call(e.retryTransaction):e.retryTransaction),null!=e.concurrencyMode&&Object.hasOwnProperty.call(e,"concurrencyMode")&&(r.concurrencyMode=t.enums!==String||void 0===f.google.firestore.v1.TransactionOptions.ConcurrencyMode[e.concurrencyMode]?e.concurrencyMode:f.google.firestore.v1.TransactionOptions.ConcurrencyMode[e.concurrencyMode]),r},bt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},bt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.TransactionOptions.ReadWrite"},bt),mt.ReadOnly=(yt.prototype.readTime=null,Object.defineProperty(yt.prototype,"consistencySelector",{get:p.oneOfGetter(e=["readTime"]),set:p.oneOfSetter(e)}),yt.create=function(e){return new yt(e)},yt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(18).fork(),r+1).ldelim(),t},yt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},yt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.TransactionOptions.ReadOnly;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==2?i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1):e.skipType(7&a,o)}return i},yt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},yt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){e=f.google.protobuf.Timestamp.verify(e.readTime,t+1);if(e)return"readTime."+e}return null},yt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.TransactionOptions.ReadOnly)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.TransactionOptions.ReadOnly: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.TransactionOptions.ReadOnly;if(null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.TransactionOptions.ReadOnly.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},yt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.consistencySelector="readTime"),o},yt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},yt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.TransactionOptions.ReadOnly"},yt),mt),i.ExplainStats=(ht.prototype.data=null,ht.create=function(e){return new ht(e)},ht.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.data&&Object.hasOwnProperty.call(e,"data")&&f.google.protobuf.Any.encode(e.data,t.uint32(10).fork(),r+1).ldelim(),t},ht.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ht.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.ExplainStats;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.data=f.google.protobuf.Any.decode(e,e.uint32(),void 0,o+1):e.skipType(7&a,o)}return i},ht.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ht.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.data&&Object.hasOwnProperty.call(e,"data")){e=f.google.protobuf.Any.verify(e.data,t+1);if(e)return"data."+e}return null},ht.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.ExplainStats)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.ExplainStats: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.ExplainStats;if(null!=e.data){if(!p.isObject(e.data))throw TypeError(".google.firestore.v1.ExplainStats.data: object expected");r.data=f.google.protobuf.Any.fromObject(e.data,t+1)}return r},ht.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.data=null),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&(o.data=f.google.protobuf.Any.toObject(e.data,t,r+1)),o},ht.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ht.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ExplainStats"},ht),i.Firestore=(((Ot.prototype=Object.create(o.rpc.Service.prototype)).constructor=Ot).create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(Ot.prototype.getDocument=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.GetDocumentRequest,f.google.firestore.v1.Document,t,r)},"name",{value:"GetDocument"}),Object.defineProperty(Ot.prototype.listDocuments=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.ListDocumentsRequest,f.google.firestore.v1.ListDocumentsResponse,t,r)},"name",{value:"ListDocuments"}),Object.defineProperty(Ot.prototype.updateDocument=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.UpdateDocumentRequest,f.google.firestore.v1.Document,t,r)},"name",{value:"UpdateDocument"}),Object.defineProperty(Ot.prototype.deleteDocument=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.DeleteDocumentRequest,f.google.protobuf.Empty,t,r)},"name",{value:"DeleteDocument"}),Object.defineProperty(Ot.prototype.batchGetDocuments=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.BatchGetDocumentsRequest,f.google.firestore.v1.BatchGetDocumentsResponse,t,r)},"name",{value:"BatchGetDocuments"}),Object.defineProperty(Ot.prototype.beginTransaction=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.BeginTransactionRequest,f.google.firestore.v1.BeginTransactionResponse,t,r)},"name",{value:"BeginTransaction"}),Object.defineProperty(Ot.prototype.commit=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.CommitRequest,f.google.firestore.v1.CommitResponse,t,r)},"name",{value:"Commit"}),Object.defineProperty(Ot.prototype.rollback=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.RollbackRequest,f.google.protobuf.Empty,t,r)},"name",{value:"Rollback"}),Object.defineProperty(Ot.prototype.runQuery=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.RunQueryRequest,f.google.firestore.v1.RunQueryResponse,t,r)},"name",{value:"RunQuery"}),Object.defineProperty(Ot.prototype.executePipeline=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.ExecutePipelineRequest,f.google.firestore.v1.ExecutePipelineResponse,t,r)},"name",{value:"ExecutePipeline"}),Object.defineProperty(Ot.prototype.runAggregationQuery=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.RunAggregationQueryRequest,f.google.firestore.v1.RunAggregationQueryResponse,t,r)},"name",{value:"RunAggregationQuery"}),Object.defineProperty(Ot.prototype.partitionQuery=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.PartitionQueryRequest,f.google.firestore.v1.PartitionQueryResponse,t,r)},"name",{value:"PartitionQuery"}),Object.defineProperty(Ot.prototype.write=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.WriteRequest,f.google.firestore.v1.WriteResponse,t,r)},"name",{value:"Write"}),Object.defineProperty(Ot.prototype.listen=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.ListenRequest,f.google.firestore.v1.ListenResponse,t,r)},"name",{value:"Listen"}),Object.defineProperty(Ot.prototype.listCollectionIds=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.ListCollectionIdsRequest,f.google.firestore.v1.ListCollectionIdsResponse,t,r)},"name",{value:"ListCollectionIds"}),Object.defineProperty(Ot.prototype.batchWrite=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.BatchWriteRequest,f.google.firestore.v1.BatchWriteResponse,t,r)},"name",{value:"BatchWrite"}),Object.defineProperty(Ot.prototype.createDocument=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1.CreateDocumentRequest,f.google.firestore.v1.Document,t,r)},"name",{value:"CreateDocument"}),Ot),i.GetDocumentRequest=(vt.prototype.name="",vt.prototype.mask=null,vt.prototype.transaction=null,vt.prototype.readTime=null,Object.defineProperty(vt.prototype,"consistencySelector",{get:p.oneOfGetter(t=["transaction","readTime"]),set:p.oneOfSetter(t)}),vt.create=function(e){return new vt(e)},vt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&f.google.firestore.v1.DocumentMask.encode(e.mask,t.uint32(18).fork(),r+1).ldelim(),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(26).bytes(e.transaction),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(42).fork(),r+1).ldelim(),t},vt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},vt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.GetDocumentRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.mask=f.google.firestore.v1.DocumentMask.decode(e,e.uint32(),void 0,o+1);break;case 3:i.transaction=e.bytes();break;case 5:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},vt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},vt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(r=f.google.firestore.v1.DocumentMask.verify(e.mask,t+1)))return"mask."+r;if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.consistencySelector=1,!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))))return"transaction: buffer expected";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.protobuf.Timestamp.verify(e.readTime,t+(o.consistencySelector=1)))return"readTime."+r}return null},vt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.GetDocumentRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.GetDocumentRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.GetDocumentRequest;if(null!=e.name&&(r.name=String(e.name)),null!=e.mask){if(!p.isObject(e.mask))throw TypeError(".google.firestore.v1.GetDocumentRequest.mask: object expected");r.mask=f.google.firestore.v1.DocumentMask.fromObject(e.mask,t+1)}if(null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.GetDocumentRequest.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},vt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.name="",o.mask=null),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(o.mask=f.google.firestore.v1.DocumentMask.toObject(e.mask,t,r+1)),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction,t.oneofs)&&(o.consistencySelector="transaction"),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.consistencySelector="readTime"),o},vt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},vt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.GetDocumentRequest"},vt),i.ListDocumentsRequest=(O.prototype.parent="",O.prototype.collectionId="",O.prototype.pageSize=0,O.prototype.pageToken="",O.prototype.orderBy="",O.prototype.mask=null,O.prototype.transaction=null,O.prototype.readTime=null,O.prototype.showMissing=!1,Object.defineProperty(O.prototype,"consistencySelector",{get:p.oneOfGetter(e=["transaction","readTime"]),set:p.oneOfSetter(e)}),O.create=function(e){return new O(e)},O.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&t.uint32(18).string(e.collectionId),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&t.uint32(24).int32(e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&t.uint32(34).string(e.pageToken),null!=e.orderBy&&Object.hasOwnProperty.call(e,"orderBy")&&t.uint32(50).string(e.orderBy),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&f.google.firestore.v1.DocumentMask.encode(e.mask,t.uint32(58).fork(),r+1).ldelim(),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(66).bytes(e.transaction),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(82).fork(),r+1).ldelim(),null!=e.showMissing&&Object.hasOwnProperty.call(e,"showMissing")&&t.uint32(96).bool(e.showMissing),t},O.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},O.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.ListDocumentsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.collectionId=e.string();break;case 3:i.pageSize=e.int32();break;case 4:i.pageToken=e.string();break;case 6:i.orderBy=e.string();break;case 7:i.mask=f.google.firestore.v1.DocumentMask.decode(e,e.uint32(),void 0,o+1);break;case 8:i.transaction=e.bytes();break;case 10:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 12:i.showMissing=e.bool();break;default:e.skipType(7&a,o)}}return i},O.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},O.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&!p.isString(e.collectionId))return"collectionId: string expected";if(null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&!p.isInteger(e.pageSize))return"pageSize: integer expected";if(null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&!p.isString(e.pageToken))return"pageToken: string expected";if(null!=e.orderBy&&Object.hasOwnProperty.call(e,"orderBy")&&!p.isString(e.orderBy))return"orderBy: string expected";if(null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(r=f.google.firestore.v1.DocumentMask.verify(e.mask,t+1)))return"mask."+r;if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.consistencySelector=1,!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))))return"transaction: buffer expected";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.protobuf.Timestamp.verify(e.readTime,t+(o.consistencySelector=1)))return"readTime."+r}return null!=e.showMissing&&Object.hasOwnProperty.call(e,"showMissing")&&"boolean"!=typeof e.showMissing?"showMissing: boolean expected":null},O.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.ListDocumentsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.ListDocumentsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.ListDocumentsRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.collectionId&&(r.collectionId=String(e.collectionId)),null!=e.pageSize&&(r.pageSize=0|e.pageSize),null!=e.pageToken&&(r.pageToken=String(e.pageToken)),null!=e.orderBy&&(r.orderBy=String(e.orderBy)),null!=e.mask){if(!p.isObject(e.mask))throw TypeError(".google.firestore.v1.ListDocumentsRequest.mask: object expected");r.mask=f.google.firestore.v1.DocumentMask.fromObject(e.mask,t+1)}if(null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.ListDocumentsRequest.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return null!=e.showMissing&&(r.showMissing=Boolean(e.showMissing)),r},O.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.parent="",o.collectionId="",o.pageSize=0,o.pageToken="",o.orderBy="",o.mask=null,o.showMissing=!1),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(o.parent=e.parent),null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&(o.collectionId=e.collectionId),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&(o.pageSize=e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&(o.pageToken=e.pageToken),null!=e.orderBy&&Object.hasOwnProperty.call(e,"orderBy")&&(o.orderBy=e.orderBy),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(o.mask=f.google.firestore.v1.DocumentMask.toObject(e.mask,t,r+1)),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction,t.oneofs)&&(o.consistencySelector="transaction"),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.consistencySelector="readTime"),null!=e.showMissing&&Object.hasOwnProperty.call(e,"showMissing")&&(o.showMissing=e.showMissing),o},O.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},O.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ListDocumentsRequest"},O),i.ListDocumentsResponse=(jt.prototype.documents=p.emptyArray,jt.prototype.nextPageToken="",jt.create=function(e){return new jt(e)},jt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.documents&&e.documents.length)for(var o=0;o<e.documents.length;++o)f.google.firestore.v1.Document.encode(e.documents[o],t.uint32(10).fork(),r+1).ldelim();return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(18).string(e.nextPageToken),t},jt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},jt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.ListDocumentsResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.documents&&i.documents.length||(i.documents=[]),i.documents.push(f.google.firestore.v1.Document.decode(e,e.uint32(),void 0,o+1));break;case 2:i.nextPageToken=e.string();break;default:e.skipType(7&a,o)}}return i},jt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},jt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.documents&&Object.hasOwnProperty.call(e,"documents")){if(!Array.isArray(e.documents))return"documents: array expected";for(var r=0;r<e.documents.length;++r){var o=f.google.firestore.v1.Document.verify(e.documents[r],t+1);if(o)return"documents."+o}}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&!p.isString(e.nextPageToken)?"nextPageToken: string expected":null},jt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.ListDocumentsResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.ListDocumentsResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.ListDocumentsResponse;if(e.documents){if(!Array.isArray(e.documents))throw TypeError(".google.firestore.v1.ListDocumentsResponse.documents: array expected");r.documents=[];for(var o=0;o<e.documents.length;++o){if(!p.isObject(e.documents[o]))throw TypeError(".google.firestore.v1.ListDocumentsResponse.documents: object expected");r.documents[o]=f.google.firestore.v1.Document.fromObject(e.documents[o],t+1)}}return null!=e.nextPageToken&&(r.nextPageToken=String(e.nextPageToken)),r},jt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.documents=[]),t.defaults&&(o.nextPageToken=""),e.documents&&e.documents.length){o.documents=[];for(var n=0;n<e.documents.length;++n)o.documents[n]=f.google.firestore.v1.Document.toObject(e.documents[n],t,r+1)}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&(o.nextPageToken=e.nextPageToken),o},jt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},jt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ListDocumentsResponse"},jt),i.CreateDocumentRequest=(wt.prototype.parent="",wt.prototype.collectionId="",wt.prototype.documentId="",wt.prototype.document=null,wt.prototype.mask=null,wt.create=function(e){return new wt(e)},wt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&t.uint32(18).string(e.collectionId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(26).string(e.documentId),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&f.google.firestore.v1.Document.encode(e.document,t.uint32(34).fork(),r+1).ldelim(),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&f.google.firestore.v1.DocumentMask.encode(e.mask,t.uint32(42).fork(),r+1).ldelim(),t},wt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},wt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.CreateDocumentRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.collectionId=e.string();break;case 3:i.documentId=e.string();break;case 4:i.document=f.google.firestore.v1.Document.decode(e,e.uint32(),void 0,o+1);break;case 5:i.mask=f.google.firestore.v1.DocumentMask.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},wt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},wt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&!p.isString(e.collectionId))return"collectionId: string expected";if(null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&!p.isString(e.documentId))return"documentId: string expected";var r;if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(r=f.google.firestore.v1.Document.verify(e.document,t+1)))return"document."+r;if(null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(r=f.google.firestore.v1.DocumentMask.verify(e.mask,t+1)))return"mask."+r;return null},wt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.CreateDocumentRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.CreateDocumentRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.CreateDocumentRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.collectionId&&(r.collectionId=String(e.collectionId)),null!=e.documentId&&(r.documentId=String(e.documentId)),null!=e.document){if(!p.isObject(e.document))throw TypeError(".google.firestore.v1.CreateDocumentRequest.document: object expected");r.document=f.google.firestore.v1.Document.fromObject(e.document,t+1)}if(null!=e.mask){if(!p.isObject(e.mask))throw TypeError(".google.firestore.v1.CreateDocumentRequest.mask: object expected");r.mask=f.google.firestore.v1.DocumentMask.fromObject(e.mask,t+1)}return r},wt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.parent="",o.collectionId="",o.documentId="",o.document=null,o.mask=null),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(o.parent=e.parent),null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&(o.collectionId=e.collectionId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&(o.documentId=e.documentId),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(o.document=f.google.firestore.v1.Document.toObject(e.document,t,r+1)),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(o.mask=f.google.firestore.v1.DocumentMask.toObject(e.mask,t,r+1)),o},wt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},wt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.CreateDocumentRequest"},wt),i.UpdateDocumentRequest=(xt.prototype.document=null,xt.prototype.updateMask=null,xt.prototype.mask=null,xt.prototype.currentDocument=null,xt.create=function(e){return new xt(e)},xt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.document&&Object.hasOwnProperty.call(e,"document")&&f.google.firestore.v1.Document.encode(e.document,t.uint32(10).fork(),r+1).ldelim(),null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&f.google.firestore.v1.DocumentMask.encode(e.updateMask,t.uint32(18).fork(),r+1).ldelim(),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&f.google.firestore.v1.DocumentMask.encode(e.mask,t.uint32(26).fork(),r+1).ldelim(),null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&f.google.firestore.v1.Precondition.encode(e.currentDocument,t.uint32(34).fork(),r+1).ldelim(),t},xt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},xt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.UpdateDocumentRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.document=f.google.firestore.v1.Document.decode(e,e.uint32(),void 0,o+1);break;case 2:i.updateMask=f.google.firestore.v1.DocumentMask.decode(e,e.uint32(),void 0,o+1);break;case 3:i.mask=f.google.firestore.v1.DocumentMask.decode(e,e.uint32(),void 0,o+1);break;case 4:i.currentDocument=f.google.firestore.v1.Precondition.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},xt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},xt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(r=f.google.firestore.v1.Document.verify(e.document,t+1)))return"document."+r;if(null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&(r=f.google.firestore.v1.DocumentMask.verify(e.updateMask,t+1)))return"updateMask."+r;if(null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(r=f.google.firestore.v1.DocumentMask.verify(e.mask,t+1)))return"mask."+r;if(null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&(r=f.google.firestore.v1.Precondition.verify(e.currentDocument,t+1)))return"currentDocument."+r;return null},xt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.UpdateDocumentRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.UpdateDocumentRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.UpdateDocumentRequest;if(null!=e.document){if(!p.isObject(e.document))throw TypeError(".google.firestore.v1.UpdateDocumentRequest.document: object expected");r.document=f.google.firestore.v1.Document.fromObject(e.document,t+1)}if(null!=e.updateMask){if(!p.isObject(e.updateMask))throw TypeError(".google.firestore.v1.UpdateDocumentRequest.updateMask: object expected");r.updateMask=f.google.firestore.v1.DocumentMask.fromObject(e.updateMask,t+1)}if(null!=e.mask){if(!p.isObject(e.mask))throw TypeError(".google.firestore.v1.UpdateDocumentRequest.mask: object expected");r.mask=f.google.firestore.v1.DocumentMask.fromObject(e.mask,t+1)}if(null!=e.currentDocument){if(!p.isObject(e.currentDocument))throw TypeError(".google.firestore.v1.UpdateDocumentRequest.currentDocument: object expected");r.currentDocument=f.google.firestore.v1.Precondition.fromObject(e.currentDocument,t+1)}return r},xt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.document=null,o.updateMask=null,o.mask=null,o.currentDocument=null),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(o.document=f.google.firestore.v1.Document.toObject(e.document,t,r+1)),null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&(o.updateMask=f.google.firestore.v1.DocumentMask.toObject(e.updateMask,t,r+1)),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(o.mask=f.google.firestore.v1.DocumentMask.toObject(e.mask,t,r+1)),null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&(o.currentDocument=f.google.firestore.v1.Precondition.toObject(e.currentDocument,t,r+1)),o},xt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},xt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.UpdateDocumentRequest"},xt),i.DeleteDocumentRequest=(Tt.prototype.name="",Tt.prototype.currentDocument=null,Tt.create=function(e){return new Tt(e)},Tt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&f.google.firestore.v1.Precondition.encode(e.currentDocument,t.uint32(18).fork(),r+1).ldelim(),t},Tt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Tt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.DeleteDocumentRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.currentDocument=f.google.firestore.v1.Precondition.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Tt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Tt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")){e=f.google.firestore.v1.Precondition.verify(e.currentDocument,t+1);if(e)return"currentDocument."+e}return null},Tt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.DeleteDocumentRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.DeleteDocumentRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.DeleteDocumentRequest;if(null!=e.name&&(r.name=String(e.name)),null!=e.currentDocument){if(!p.isObject(e.currentDocument))throw TypeError(".google.firestore.v1.DeleteDocumentRequest.currentDocument: object expected");r.currentDocument=f.google.firestore.v1.Precondition.fromObject(e.currentDocument,t+1)}return r},Tt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.name="",o.currentDocument=null),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&(o.currentDocument=f.google.firestore.v1.Precondition.toObject(e.currentDocument,t,r+1)),o},Tt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Tt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.DeleteDocumentRequest"},Tt),i.BatchGetDocumentsRequest=(kt.prototype.database="",kt.prototype.documents=p.emptyArray,kt.prototype.mask=null,kt.prototype.transaction=null,kt.prototype.newTransaction=null,kt.prototype.readTime=null,Object.defineProperty(kt.prototype,"consistencySelector",{get:p.oneOfGetter(t=["transaction","newTransaction","readTime"]),set:p.oneOfSetter(t)}),kt.create=function(e){return new kt(e)},kt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.documents&&e.documents.length)for(var o=0;o<e.documents.length;++o)t.uint32(18).string(e.documents[o]);return null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&f.google.firestore.v1.DocumentMask.encode(e.mask,t.uint32(26).fork(),r+1).ldelim(),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(34).bytes(e.transaction),null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")&&f.google.firestore.v1.TransactionOptions.encode(e.newTransaction,t.uint32(42).fork(),r+1).ldelim(),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(58).fork(),r+1).ldelim(),t},kt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},kt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.BatchGetDocumentsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.documents&&i.documents.length||(i.documents=[]),i.documents.push(e.string());break;case 3:i.mask=f.google.firestore.v1.DocumentMask.decode(e,e.uint32(),void 0,o+1);break;case 4:i.transaction=e.bytes();break;case 5:i.newTransaction=f.google.firestore.v1.TransactionOptions.decode(e,e.uint32(),void 0,o+1);break;case 7:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},kt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},kt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.documents&&Object.hasOwnProperty.call(e,"documents")){if(!Array.isArray(e.documents))return"documents: array expected";for(var n=0;n<e.documents.length;++n)if(!p.isString(e.documents[n]))return"documents: string[] expected"}if(null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(r=f.google.firestore.v1.DocumentMask.verify(e.mask,t+1)))return"mask."+r;if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.consistencySelector=1,!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))))return"transaction: buffer expected";if(null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.firestore.v1.TransactionOptions.verify(e.newTransaction,t+(o.consistencySelector=1)))return"newTransaction."+r}if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.protobuf.Timestamp.verify(e.readTime,t+(o.consistencySelector=1)))return"readTime."+r}return null},kt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.BatchGetDocumentsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.BatchGetDocumentsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.BatchGetDocumentsRequest;if(null!=e.database&&(r.database=String(e.database)),e.documents){if(!Array.isArray(e.documents))throw TypeError(".google.firestore.v1.BatchGetDocumentsRequest.documents: array expected");r.documents=[];for(var o=0;o<e.documents.length;++o)r.documents[o]=String(e.documents[o])}if(null!=e.mask){if(!p.isObject(e.mask))throw TypeError(".google.firestore.v1.BatchGetDocumentsRequest.mask: object expected");r.mask=f.google.firestore.v1.DocumentMask.fromObject(e.mask,t+1)}if(null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.newTransaction){if(!p.isObject(e.newTransaction))throw TypeError(".google.firestore.v1.BatchGetDocumentsRequest.newTransaction: object expected");r.newTransaction=f.google.firestore.v1.TransactionOptions.fromObject(e.newTransaction,t+1)}if(null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.BatchGetDocumentsRequest.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},kt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.documents=[]),t.defaults&&(o.database="",o.mask=null),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(o.database=e.database),e.documents&&e.documents.length){o.documents=[];for(var n=0;n<e.documents.length;++n)o.documents[n]=e.documents[n]}return null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(o.mask=f.google.firestore.v1.DocumentMask.toObject(e.mask,t,r+1)),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction,t.oneofs)&&(o.consistencySelector="transaction"),null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")&&(o.newTransaction=f.google.firestore.v1.TransactionOptions.toObject(e.newTransaction,t,r+1),t.oneofs)&&(o.consistencySelector="newTransaction"),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.consistencySelector="readTime"),o},kt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},kt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.BatchGetDocumentsRequest"},kt),i.BatchGetDocumentsResponse=(St.prototype.found=null,St.prototype.missing=null,St.prototype.transaction=p.newBuffer([]),St.prototype.readTime=null,Object.defineProperty(St.prototype,"result",{get:p.oneOfGetter(e=["found","missing"]),set:p.oneOfSetter(e)}),St.create=function(e){return new St(e)},St.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.found&&Object.hasOwnProperty.call(e,"found")&&f.google.firestore.v1.Document.encode(e.found,t.uint32(10).fork(),r+1).ldelim(),null!=e.missing&&Object.hasOwnProperty.call(e,"missing")&&t.uint32(18).string(e.missing),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(26).bytes(e.transaction),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(34).fork(),r+1).ldelim(),t},St.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},St.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.BatchGetDocumentsResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.found=f.google.firestore.v1.Document.decode(e,e.uint32(),void 0,o+1);break;case 2:i.missing=e.string();break;case 3:i.transaction=e.bytes();break;case 4:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},St.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},St.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.found&&Object.hasOwnProperty.call(e,"found")&&(r=f.google.firestore.v1.Document.verify(e.found,t+(o.result=1))))return"found."+r;if(null!=e.missing&&Object.hasOwnProperty.call(e,"missing")){if(1===o.result)return"result: multiple values";if(o.result=1,!p.isString(e.missing))return"missing: string expected"}if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction)))return"transaction: buffer expected";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(r=f.google.protobuf.Timestamp.verify(e.readTime,t+1)))return"readTime."+r;return null},St.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.BatchGetDocumentsResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.BatchGetDocumentsResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.BatchGetDocumentsResponse;if(null!=e.found){if(!p.isObject(e.found))throw TypeError(".google.firestore.v1.BatchGetDocumentsResponse.found: object expected");r.found=f.google.firestore.v1.Document.fromObject(e.found,t+1)}if(null!=e.missing&&(r.missing=String(e.missing)),null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.BatchGetDocumentsResponse.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},St.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(t.bytes===String?o.transaction="":(o.transaction=[],t.bytes!==Array&&(o.transaction=p.newBuffer(o.transaction))),o.readTime=null),null!=e.found&&Object.hasOwnProperty.call(e,"found")&&(o.found=f.google.firestore.v1.Document.toObject(e.found,t,r+1),t.oneofs)&&(o.result="found"),null!=e.missing&&Object.hasOwnProperty.call(e,"missing")&&(o.missing=e.missing,t.oneofs)&&(o.result="missing"),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1)),o},St.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},St.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.BatchGetDocumentsResponse"},St),i.BeginTransactionRequest=(Pt.prototype.database="",Pt.prototype.options=null,Pt.create=function(e){return new Pt(e)},Pt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&f.google.firestore.v1.TransactionOptions.encode(e.options,t.uint32(18).fork(),r+1).ldelim(),t},Pt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Pt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.BeginTransactionRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.options=f.google.firestore.v1.TransactionOptions.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Pt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Pt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.options&&Object.hasOwnProperty.call(e,"options")){e=f.google.firestore.v1.TransactionOptions.verify(e.options,t+1);if(e)return"options."+e}return null},Pt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.BeginTransactionRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.BeginTransactionRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.BeginTransactionRequest;if(null!=e.database&&(r.database=String(e.database)),null!=e.options){if(!p.isObject(e.options))throw TypeError(".google.firestore.v1.BeginTransactionRequest.options: object expected");r.options=f.google.firestore.v1.TransactionOptions.fromObject(e.options,t+1)}return r},Pt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.database="",o.options=null),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(o.database=e.database),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o.options=f.google.firestore.v1.TransactionOptions.toObject(e.options,t,r+1)),o},Pt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Pt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.BeginTransactionRequest"},Pt),i.BeginTransactionResponse=(Et.prototype.transaction=p.newBuffer([]),Et.create=function(e){return new Et(e)},Et.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(10).bytes(e.transaction),t},Et.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Et.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.BeginTransactionResponse;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.transaction=e.bytes():e.skipType(7&a,o)}return i},Et.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Et.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))?"transaction: buffer expected":null},Et.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.BeginTransactionResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.BeginTransactionResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.v1.BeginTransactionResponse;return null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,t.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(t.transaction=e.transaction)),t},Et.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(t.bytes===String?r.transaction="":(r.transaction=[],t.bytes!==Array&&(r.transaction=p.newBuffer(r.transaction)))),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(r.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction),r},Et.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Et.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.BeginTransactionResponse"},Et),i.CommitRequest=(Dt.prototype.database="",Dt.prototype.writes=p.emptyArray,Dt.prototype.transaction=p.newBuffer([]),Dt.create=function(e){return new Dt(e)},Dt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.writes&&e.writes.length)for(var o=0;o<e.writes.length;++o)f.google.firestore.v1.Write.encode(e.writes[o],t.uint32(18).fork(),r+1).ldelim();return null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(26).bytes(e.transaction),t},Dt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Dt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.CommitRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.writes&&i.writes.length||(i.writes=[]),i.writes.push(f.google.firestore.v1.Write.decode(e,e.uint32(),void 0,o+1));break;case 3:i.transaction=e.bytes();break;default:e.skipType(7&a,o)}}return i},Dt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Dt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.writes&&Object.hasOwnProperty.call(e,"writes")){if(!Array.isArray(e.writes))return"writes: array expected";for(var r=0;r<e.writes.length;++r){var o=f.google.firestore.v1.Write.verify(e.writes[r],t+1);if(o)return"writes."+o}}return null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))?"transaction: buffer expected":null},Dt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.CommitRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.CommitRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.CommitRequest;if(null!=e.database&&(r.database=String(e.database)),e.writes){if(!Array.isArray(e.writes))throw TypeError(".google.firestore.v1.CommitRequest.writes: array expected");r.writes=[];for(var o=0;o<e.writes.length;++o){if(!p.isObject(e.writes[o]))throw TypeError(".google.firestore.v1.CommitRequest.writes: object expected");r.writes[o]=f.google.firestore.v1.Write.fromObject(e.writes[o],t+1)}}return null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),r},Dt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.writes=[]),t.defaults&&(o.database="",t.bytes===String?o.transaction="":(o.transaction=[],t.bytes!==Array&&(o.transaction=p.newBuffer(o.transaction)))),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(o.database=e.database),e.writes&&e.writes.length){o.writes=[];for(var n=0;n<e.writes.length;++n)o.writes[n]=f.google.firestore.v1.Write.toObject(e.writes[n],t,r+1)}return null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction),o},Dt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Dt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.CommitRequest"},Dt),i.CommitResponse=(It.prototype.writeResults=p.emptyArray,It.prototype.commitTime=null,It.create=function(e){return new It(e)},It.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.writeResults&&e.writeResults.length)for(var o=0;o<e.writeResults.length;++o)f.google.firestore.v1.WriteResult.encode(e.writeResults[o],t.uint32(10).fork(),r+1).ldelim();return null!=e.commitTime&&Object.hasOwnProperty.call(e,"commitTime")&&f.google.protobuf.Timestamp.encode(e.commitTime,t.uint32(18).fork(),r+1).ldelim(),t},It.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},It.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.CommitResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.writeResults&&i.writeResults.length||(i.writeResults=[]),i.writeResults.push(f.google.firestore.v1.WriteResult.decode(e,e.uint32(),void 0,o+1));break;case 2:i.commitTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},It.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},It.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.writeResults&&Object.hasOwnProperty.call(e,"writeResults")){if(!Array.isArray(e.writeResults))return"writeResults: array expected";for(var r=0;r<e.writeResults.length;++r)if(o=f.google.firestore.v1.WriteResult.verify(e.writeResults[r],t+1))return"writeResults."+o}var o;if(null!=e.commitTime&&Object.hasOwnProperty.call(e,"commitTime")&&(o=f.google.protobuf.Timestamp.verify(e.commitTime,t+1)))return"commitTime."+o;return null},It.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.CommitResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.CommitResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.CommitResponse;if(e.writeResults){if(!Array.isArray(e.writeResults))throw TypeError(".google.firestore.v1.CommitResponse.writeResults: array expected");r.writeResults=[];for(var o=0;o<e.writeResults.length;++o){if(!p.isObject(e.writeResults[o]))throw TypeError(".google.firestore.v1.CommitResponse.writeResults: object expected");r.writeResults[o]=f.google.firestore.v1.WriteResult.fromObject(e.writeResults[o],t+1)}}if(null!=e.commitTime){if(!p.isObject(e.commitTime))throw TypeError(".google.firestore.v1.CommitResponse.commitTime: object expected");r.commitTime=f.google.protobuf.Timestamp.fromObject(e.commitTime,t+1)}return r},It.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.writeResults=[]),t.defaults&&(o.commitTime=null),e.writeResults&&e.writeResults.length){o.writeResults=[];for(var n=0;n<e.writeResults.length;++n)o.writeResults[n]=f.google.firestore.v1.WriteResult.toObject(e.writeResults[n],t,r+1)}return null!=e.commitTime&&Object.hasOwnProperty.call(e,"commitTime")&&(o.commitTime=f.google.protobuf.Timestamp.toObject(e.commitTime,t,r+1)),o},It.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},It.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.CommitResponse"},It),i.RollbackRequest=(Rt.prototype.database="",Rt.prototype.transaction=p.newBuffer([]),Rt.create=function(e){return new Rt(e)},Rt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(18).bytes(e.transaction),t},Rt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Rt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.RollbackRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.transaction=e.bytes();break;default:e.skipType(7&a,o)}}return i},Rt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Rt.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database)?"database: string expected":null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))?"transaction: buffer expected":null},Rt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.RollbackRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.RollbackRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.v1.RollbackRequest;return null!=e.database&&(t.database=String(e.database)),null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,t.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(t.transaction=e.transaction)),t},Rt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.database="",t.bytes===String?r.transaction="":(r.transaction=[],t.bytes!==Array&&(r.transaction=p.newBuffer(r.transaction)))),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(r.database=e.database),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(r.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction),r},Rt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Rt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.RollbackRequest"},Rt),i.RunQueryRequest=(Lt.prototype.parent="",Lt.prototype.structuredQuery=null,Lt.prototype.transaction=null,Lt.prototype.newTransaction=null,Lt.prototype.readTime=null,Lt.prototype.explainOptions=null,Object.defineProperty(Lt.prototype,"queryType",{get:p.oneOfGetter(t=["structuredQuery"]),set:p.oneOfSetter(t)}),Object.defineProperty(Lt.prototype,"consistencySelector",{get:p.oneOfGetter(t=["transaction","newTransaction","readTime"]),set:p.oneOfSetter(t)}),Lt.create=function(e){return new Lt(e)},Lt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&f.google.firestore.v1.StructuredQuery.encode(e.structuredQuery,t.uint32(18).fork(),r+1).ldelim(),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(42).bytes(e.transaction),null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")&&f.google.firestore.v1.TransactionOptions.encode(e.newTransaction,t.uint32(50).fork(),r+1).ldelim(),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(58).fork(),r+1).ldelim(),null!=e.explainOptions&&Object.hasOwnProperty.call(e,"explainOptions")&&f.google.firestore.v1.ExplainOptions.encode(e.explainOptions,t.uint32(82).fork(),r+1).ldelim(),t},Lt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Lt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.RunQueryRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.structuredQuery=f.google.firestore.v1.StructuredQuery.decode(e,e.uint32(),void 0,o+1);break;case 5:i.transaction=e.bytes();break;case 6:i.newTransaction=f.google.firestore.v1.TransactionOptions.decode(e,e.uint32(),void 0,o+1);break;case 7:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 10:i.explainOptions=f.google.firestore.v1.ExplainOptions.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Lt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Lt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&(r=f.google.firestore.v1.StructuredQuery.verify(e.structuredQuery,t+(o.queryType=1))))return"structuredQuery."+r;if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.consistencySelector=1,!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))))return"transaction: buffer expected";if(null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.firestore.v1.TransactionOptions.verify(e.newTransaction,t+(o.consistencySelector=1)))return"newTransaction."+r}if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.protobuf.Timestamp.verify(e.readTime,t+(o.consistencySelector=1)))return"readTime."+r}if(null!=e.explainOptions&&Object.hasOwnProperty.call(e,"explainOptions")&&(r=f.google.firestore.v1.ExplainOptions.verify(e.explainOptions,t+1)))return"explainOptions."+r;return null},Lt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.RunQueryRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.RunQueryRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.RunQueryRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.structuredQuery){if(!p.isObject(e.structuredQuery))throw TypeError(".google.firestore.v1.RunQueryRequest.structuredQuery: object expected");r.structuredQuery=f.google.firestore.v1.StructuredQuery.fromObject(e.structuredQuery,t+1)}if(null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.newTransaction){if(!p.isObject(e.newTransaction))throw TypeError(".google.firestore.v1.RunQueryRequest.newTransaction: object expected");r.newTransaction=f.google.firestore.v1.TransactionOptions.fromObject(e.newTransaction,t+1)}if(null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.RunQueryRequest.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}if(null!=e.explainOptions){if(!p.isObject(e.explainOptions))throw TypeError(".google.firestore.v1.RunQueryRequest.explainOptions: object expected");r.explainOptions=f.google.firestore.v1.ExplainOptions.fromObject(e.explainOptions,t+1)}return r},Lt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.parent="",o.explainOptions=null),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(o.parent=e.parent),null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&(o.structuredQuery=f.google.firestore.v1.StructuredQuery.toObject(e.structuredQuery,t,r+1),t.oneofs)&&(o.queryType="structuredQuery"),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction,t.oneofs)&&(o.consistencySelector="transaction"),null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")&&(o.newTransaction=f.google.firestore.v1.TransactionOptions.toObject(e.newTransaction,t,r+1),t.oneofs)&&(o.consistencySelector="newTransaction"),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.consistencySelector="readTime"),null!=e.explainOptions&&Object.hasOwnProperty.call(e,"explainOptions")&&(o.explainOptions=f.google.firestore.v1.ExplainOptions.toObject(e.explainOptions,t,r+1)),o},Lt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Lt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.RunQueryRequest"},Lt),i.RunQueryResponse=(_t.prototype.transaction=p.newBuffer([]),_t.prototype.document=null,_t.prototype.readTime=null,_t.prototype.skippedResults=0,_t.prototype.done=null,_t.prototype.explainMetrics=null,Object.defineProperty(_t.prototype,"continuationSelector",{get:p.oneOfGetter(e=["done"]),set:p.oneOfSetter(e)}),_t.create=function(e){return new _t(e)},_t.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.document&&Object.hasOwnProperty.call(e,"document")&&f.google.firestore.v1.Document.encode(e.document,t.uint32(10).fork(),r+1).ldelim(),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(18).bytes(e.transaction),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(26).fork(),r+1).ldelim(),null!=e.skippedResults&&Object.hasOwnProperty.call(e,"skippedResults")&&t.uint32(32).int32(e.skippedResults),null!=e.done&&Object.hasOwnProperty.call(e,"done")&&t.uint32(48).bool(e.done),null!=e.explainMetrics&&Object.hasOwnProperty.call(e,"explainMetrics")&&f.google.firestore.v1.ExplainMetrics.encode(e.explainMetrics,t.uint32(90).fork(),r+1).ldelim(),t},_t.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},_t.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.RunQueryResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 2:i.transaction=e.bytes();break;case 1:i.document=f.google.firestore.v1.Document.decode(e,e.uint32(),void 0,o+1);break;case 3:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 4:i.skippedResults=e.int32();break;case 6:i.done=e.bool();break;case 11:i.explainMetrics=f.google.firestore.v1.ExplainMetrics.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},_t.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},_t.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction)))return"transaction: buffer expected";if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(r=f.google.firestore.v1.Document.verify(e.document,t+1)))return"document."+r;if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(r=f.google.protobuf.Timestamp.verify(e.readTime,t+1)))return"readTime."+r;if(null!=e.skippedResults&&Object.hasOwnProperty.call(e,"skippedResults")&&!p.isInteger(e.skippedResults))return"skippedResults: integer expected";if(null!=e.done&&Object.hasOwnProperty.call(e,"done")&&"boolean"!=typeof e.done)return"done: boolean expected";if(null!=e.explainMetrics&&Object.hasOwnProperty.call(e,"explainMetrics")&&(r=f.google.firestore.v1.ExplainMetrics.verify(e.explainMetrics,t+1)))return"explainMetrics."+r;return null},_t.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.RunQueryResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.RunQueryResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.RunQueryResponse;if(null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.document){if(!p.isObject(e.document))throw TypeError(".google.firestore.v1.RunQueryResponse.document: object expected");r.document=f.google.firestore.v1.Document.fromObject(e.document,t+1)}if(null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.RunQueryResponse.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}if(null!=e.skippedResults&&(r.skippedResults=0|e.skippedResults),null!=e.done&&(r.done=Boolean(e.done)),null!=e.explainMetrics){if(!p.isObject(e.explainMetrics))throw TypeError(".google.firestore.v1.RunQueryResponse.explainMetrics: object expected");r.explainMetrics=f.google.firestore.v1.ExplainMetrics.fromObject(e.explainMetrics,t+1)}return r},_t.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.document=null,t.bytes===String?o.transaction="":(o.transaction=[],t.bytes!==Array&&(o.transaction=p.newBuffer(o.transaction))),o.readTime=null,o.skippedResults=0,o.explainMetrics=null),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(o.document=f.google.firestore.v1.Document.toObject(e.document,t,r+1)),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1)),null!=e.skippedResults&&Object.hasOwnProperty.call(e,"skippedResults")&&(o.skippedResults=e.skippedResults),null!=e.done&&Object.hasOwnProperty.call(e,"done")&&(o.done=e.done,t.oneofs)&&(o.continuationSelector="done"),null!=e.explainMetrics&&Object.hasOwnProperty.call(e,"explainMetrics")&&(o.explainMetrics=f.google.firestore.v1.ExplainMetrics.toObject(e.explainMetrics,t,r+1)),o},_t.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},_t.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.RunQueryResponse"},_t),i.ExecutePipelineRequest=(Ct.prototype.database="",Ct.prototype.structuredPipeline=null,Ct.prototype.transaction=null,Ct.prototype.newTransaction=null,Ct.prototype.readTime=null,Ct.prototype.autoCommitTransaction=!1,Object.defineProperty(Ct.prototype,"pipelineType",{get:p.oneOfGetter(t=["structuredPipeline"]),set:p.oneOfSetter(t)}),Object.defineProperty(Ct.prototype,"consistencySelector",{get:p.oneOfGetter(t=["transaction","newTransaction","readTime"]),set:p.oneOfSetter(t)}),Ct.create=function(e){return new Ct(e)},Ct.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.structuredPipeline&&Object.hasOwnProperty.call(e,"structuredPipeline")&&f.google.firestore.v1.StructuredPipeline.encode(e.structuredPipeline,t.uint32(18).fork(),r+1).ldelim(),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(42).bytes(e.transaction),null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")&&f.google.firestore.v1.TransactionOptions.encode(e.newTransaction,t.uint32(50).fork(),r+1).ldelim(),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(58).fork(),r+1).ldelim(),null!=e.autoCommitTransaction&&Object.hasOwnProperty.call(e,"autoCommitTransaction")&&t.uint32(72).bool(e.autoCommitTransaction),t},Ct.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ct.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.ExecutePipelineRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.structuredPipeline=f.google.firestore.v1.StructuredPipeline.decode(e,e.uint32(),void 0,o+1);break;case 5:i.transaction=e.bytes();break;case 6:i.newTransaction=f.google.firestore.v1.TransactionOptions.decode(e,e.uint32(),void 0,o+1);break;case 7:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 9:i.autoCommitTransaction=e.bool();break;default:e.skipType(7&a,o)}}return i},Ct.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ct.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.structuredPipeline&&Object.hasOwnProperty.call(e,"structuredPipeline")&&(r=f.google.firestore.v1.StructuredPipeline.verify(e.structuredPipeline,t+(o.pipelineType=1))))return"structuredPipeline."+r;if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.consistencySelector=1,!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))))return"transaction: buffer expected";if(null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.firestore.v1.TransactionOptions.verify(e.newTransaction,t+(o.consistencySelector=1)))return"newTransaction."+r}if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.protobuf.Timestamp.verify(e.readTime,t+(o.consistencySelector=1)))return"readTime."+r}return null!=e.autoCommitTransaction&&Object.hasOwnProperty.call(e,"autoCommitTransaction")&&"boolean"!=typeof e.autoCommitTransaction?"autoCommitTransaction: boolean expected":null},Ct.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.ExecutePipelineRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.ExecutePipelineRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.ExecutePipelineRequest;if(null!=e.database&&(r.database=String(e.database)),null!=e.structuredPipeline){if(!p.isObject(e.structuredPipeline))throw TypeError(".google.firestore.v1.ExecutePipelineRequest.structuredPipeline: object expected");r.structuredPipeline=f.google.firestore.v1.StructuredPipeline.fromObject(e.structuredPipeline,t+1)}if(null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.newTransaction){if(!p.isObject(e.newTransaction))throw TypeError(".google.firestore.v1.ExecutePipelineRequest.newTransaction: object expected");r.newTransaction=f.google.firestore.v1.TransactionOptions.fromObject(e.newTransaction,t+1)}if(null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.ExecutePipelineRequest.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return null!=e.autoCommitTransaction&&(r.autoCommitTransaction=Boolean(e.autoCommitTransaction)),r},Ct.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.database="",o.autoCommitTransaction=!1),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(o.database=e.database),null!=e.structuredPipeline&&Object.hasOwnProperty.call(e,"structuredPipeline")&&(o.structuredPipeline=f.google.firestore.v1.StructuredPipeline.toObject(e.structuredPipeline,t,r+1),t.oneofs)&&(o.pipelineType="structuredPipeline"),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction,t.oneofs)&&(o.consistencySelector="transaction"),null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")&&(o.newTransaction=f.google.firestore.v1.TransactionOptions.toObject(e.newTransaction,t,r+1),t.oneofs)&&(o.consistencySelector="newTransaction"),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.consistencySelector="readTime"),null!=e.autoCommitTransaction&&Object.hasOwnProperty.call(e,"autoCommitTransaction")&&(o.autoCommitTransaction=e.autoCommitTransaction),o},Ct.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ct.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ExecutePipelineRequest"},Ct),i.ExecutePipelineResponse=(Nt.prototype.transaction=p.newBuffer([]),Nt.prototype.results=p.emptyArray,Nt.prototype.executionTime=null,Nt.prototype.explainStats=null,Nt.create=function(e){return new Nt(e)},Nt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(10).bytes(e.transaction),null!=e.results&&e.results.length)for(var o=0;o<e.results.length;++o)f.google.firestore.v1.Document.encode(e.results[o],t.uint32(18).fork(),r+1).ldelim();return null!=e.executionTime&&Object.hasOwnProperty.call(e,"executionTime")&&f.google.protobuf.Timestamp.encode(e.executionTime,t.uint32(26).fork(),r+1).ldelim(),null!=e.explainStats&&Object.hasOwnProperty.call(e,"explainStats")&&f.google.firestore.v1.ExplainStats.encode(e.explainStats,t.uint32(34).fork(),r+1).ldelim(),t},Nt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Nt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.ExecutePipelineResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.transaction=e.bytes();break;case 2:i.results&&i.results.length||(i.results=[]),i.results.push(f.google.firestore.v1.Document.decode(e,e.uint32(),void 0,o+1));break;case 3:i.executionTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 4:i.explainStats=f.google.firestore.v1.ExplainStats.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Nt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Nt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction)))return"transaction: buffer expected";if(null!=e.results&&Object.hasOwnProperty.call(e,"results")){if(!Array.isArray(e.results))return"results: array expected";for(var r=0;r<e.results.length;++r)if(o=f.google.firestore.v1.Document.verify(e.results[r],t+1))return"results."+o}var o;if(null!=e.executionTime&&Object.hasOwnProperty.call(e,"executionTime")&&(o=f.google.protobuf.Timestamp.verify(e.executionTime,t+1)))return"executionTime."+o;if(null!=e.explainStats&&Object.hasOwnProperty.call(e,"explainStats")&&(o=f.google.firestore.v1.ExplainStats.verify(e.explainStats,t+1)))return"explainStats."+o;return null},Nt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.ExecutePipelineResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.ExecutePipelineResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.ExecutePipelineResponse;if(null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),e.results){if(!Array.isArray(e.results))throw TypeError(".google.firestore.v1.ExecutePipelineResponse.results: array expected");r.results=[];for(var o=0;o<e.results.length;++o){if(!p.isObject(e.results[o]))throw TypeError(".google.firestore.v1.ExecutePipelineResponse.results: object expected");r.results[o]=f.google.firestore.v1.Document.fromObject(e.results[o],t+1)}}if(null!=e.executionTime){if(!p.isObject(e.executionTime))throw TypeError(".google.firestore.v1.ExecutePipelineResponse.executionTime: object expected");r.executionTime=f.google.protobuf.Timestamp.fromObject(e.executionTime,t+1)}if(null!=e.explainStats){if(!p.isObject(e.explainStats))throw TypeError(".google.firestore.v1.ExecutePipelineResponse.explainStats: object expected");r.explainStats=f.google.firestore.v1.ExplainStats.fromObject(e.explainStats,t+1)}return r},Nt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.results=[]),t.defaults&&(t.bytes===String?o.transaction="":(o.transaction=[],t.bytes!==Array&&(o.transaction=p.newBuffer(o.transaction))),o.executionTime=null,o.explainStats=null),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction),e.results&&e.results.length){o.results=[];for(var n=0;n<e.results.length;++n)o.results[n]=f.google.firestore.v1.Document.toObject(e.results[n],t,r+1)}return null!=e.executionTime&&Object.hasOwnProperty.call(e,"executionTime")&&(o.executionTime=f.google.protobuf.Timestamp.toObject(e.executionTime,t,r+1)),null!=e.explainStats&&Object.hasOwnProperty.call(e,"explainStats")&&(o.explainStats=f.google.firestore.v1.ExplainStats.toObject(e.explainStats,t,r+1)),o},Nt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Nt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ExecutePipelineResponse"},Nt),i.RunAggregationQueryRequest=(At.prototype.parent="",At.prototype.structuredAggregationQuery=null,At.prototype.transaction=null,At.prototype.newTransaction=null,At.prototype.readTime=null,At.prototype.explainOptions=null,Object.defineProperty(At.prototype,"queryType",{get:p.oneOfGetter(e=["structuredAggregationQuery"]),set:p.oneOfSetter(e)}),Object.defineProperty(At.prototype,"consistencySelector",{get:p.oneOfGetter(e=["transaction","newTransaction","readTime"]),set:p.oneOfSetter(e)}),At.create=function(e){return new At(e)},At.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.structuredAggregationQuery&&Object.hasOwnProperty.call(e,"structuredAggregationQuery")&&f.google.firestore.v1.StructuredAggregationQuery.encode(e.structuredAggregationQuery,t.uint32(18).fork(),r+1).ldelim(),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(34).bytes(e.transaction),null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")&&f.google.firestore.v1.TransactionOptions.encode(e.newTransaction,t.uint32(42).fork(),r+1).ldelim(),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(50).fork(),r+1).ldelim(),null!=e.explainOptions&&Object.hasOwnProperty.call(e,"explainOptions")&&f.google.firestore.v1.ExplainOptions.encode(e.explainOptions,t.uint32(66).fork(),r+1).ldelim(),t},At.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},At.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.RunAggregationQueryRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.structuredAggregationQuery=f.google.firestore.v1.StructuredAggregationQuery.decode(e,e.uint32(),void 0,o+1);break;case 4:i.transaction=e.bytes();break;case 5:i.newTransaction=f.google.firestore.v1.TransactionOptions.decode(e,e.uint32(),void 0,o+1);break;case 6:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 8:i.explainOptions=f.google.firestore.v1.ExplainOptions.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},At.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},At.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.structuredAggregationQuery&&Object.hasOwnProperty.call(e,"structuredAggregationQuery")&&(r=f.google.firestore.v1.StructuredAggregationQuery.verify(e.structuredAggregationQuery,t+(o.queryType=1))))return"structuredAggregationQuery."+r;if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.consistencySelector=1,!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))))return"transaction: buffer expected";if(null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.firestore.v1.TransactionOptions.verify(e.newTransaction,t+(o.consistencySelector=1)))return"newTransaction."+r}if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.protobuf.Timestamp.verify(e.readTime,t+(o.consistencySelector=1)))return"readTime."+r}if(null!=e.explainOptions&&Object.hasOwnProperty.call(e,"explainOptions")&&(r=f.google.firestore.v1.ExplainOptions.verify(e.explainOptions,t+1)))return"explainOptions."+r;return null},At.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.RunAggregationQueryRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.RunAggregationQueryRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.RunAggregationQueryRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.structuredAggregationQuery){if(!p.isObject(e.structuredAggregationQuery))throw TypeError(".google.firestore.v1.RunAggregationQueryRequest.structuredAggregationQuery: object expected");r.structuredAggregationQuery=f.google.firestore.v1.StructuredAggregationQuery.fromObject(e.structuredAggregationQuery,t+1)}if(null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.newTransaction){if(!p.isObject(e.newTransaction))throw TypeError(".google.firestore.v1.RunAggregationQueryRequest.newTransaction: object expected");r.newTransaction=f.google.firestore.v1.TransactionOptions.fromObject(e.newTransaction,t+1)}if(null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.RunAggregationQueryRequest.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}if(null!=e.explainOptions){if(!p.isObject(e.explainOptions))throw TypeError(".google.firestore.v1.RunAggregationQueryRequest.explainOptions: object expected");r.explainOptions=f.google.firestore.v1.ExplainOptions.fromObject(e.explainOptions,t+1)}return r},At.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.parent="",o.explainOptions=null),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(o.parent=e.parent),null!=e.structuredAggregationQuery&&Object.hasOwnProperty.call(e,"structuredAggregationQuery")&&(o.structuredAggregationQuery=f.google.firestore.v1.StructuredAggregationQuery.toObject(e.structuredAggregationQuery,t,r+1),t.oneofs)&&(o.queryType="structuredAggregationQuery"),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction,t.oneofs)&&(o.consistencySelector="transaction"),null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")&&(o.newTransaction=f.google.firestore.v1.TransactionOptions.toObject(e.newTransaction,t,r+1),t.oneofs)&&(o.consistencySelector="newTransaction"),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.consistencySelector="readTime"),null!=e.explainOptions&&Object.hasOwnProperty.call(e,"explainOptions")&&(o.explainOptions=f.google.firestore.v1.ExplainOptions.toObject(e.explainOptions,t,r+1)),o},At.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},At.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.RunAggregationQueryRequest"},At),i.RunAggregationQueryResponse=(Ft.prototype.result=null,Ft.prototype.transaction=p.newBuffer([]),Ft.prototype.readTime=null,Ft.prototype.explainMetrics=null,Ft.create=function(e){return new Ft(e)},Ft.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.result&&Object.hasOwnProperty.call(e,"result")&&f.google.firestore.v1.AggregationResult.encode(e.result,t.uint32(10).fork(),r+1).ldelim(),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(18).bytes(e.transaction),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(26).fork(),r+1).ldelim(),null!=e.explainMetrics&&Object.hasOwnProperty.call(e,"explainMetrics")&&f.google.firestore.v1.ExplainMetrics.encode(e.explainMetrics,t.uint32(82).fork(),r+1).ldelim(),t},Ft.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ft.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.RunAggregationQueryResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.result=f.google.firestore.v1.AggregationResult.decode(e,e.uint32(),void 0,o+1);break;case 2:i.transaction=e.bytes();break;case 3:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 10:i.explainMetrics=f.google.firestore.v1.ExplainMetrics.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Ft.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ft.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.result&&Object.hasOwnProperty.call(e,"result")&&(r=f.google.firestore.v1.AggregationResult.verify(e.result,t+1)))return"result."+r;if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction)))return"transaction: buffer expected";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(r=f.google.protobuf.Timestamp.verify(e.readTime,t+1)))return"readTime."+r;if(null!=e.explainMetrics&&Object.hasOwnProperty.call(e,"explainMetrics")&&(r=f.google.firestore.v1.ExplainMetrics.verify(e.explainMetrics,t+1)))return"explainMetrics."+r;return null},Ft.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.RunAggregationQueryResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.RunAggregationQueryResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.RunAggregationQueryResponse;if(null!=e.result){if(!p.isObject(e.result))throw TypeError(".google.firestore.v1.RunAggregationQueryResponse.result: object expected");r.result=f.google.firestore.v1.AggregationResult.fromObject(e.result,t+1)}if(null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.RunAggregationQueryResponse.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}if(null!=e.explainMetrics){if(!p.isObject(e.explainMetrics))throw TypeError(".google.firestore.v1.RunAggregationQueryResponse.explainMetrics: object expected");r.explainMetrics=f.google.firestore.v1.ExplainMetrics.fromObject(e.explainMetrics,t+1)}return r},Ft.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.result=null,t.bytes===String?o.transaction="":(o.transaction=[],t.bytes!==Array&&(o.transaction=p.newBuffer(o.transaction))),o.readTime=null,o.explainMetrics=null),null!=e.result&&Object.hasOwnProperty.call(e,"result")&&(o.result=f.google.firestore.v1.AggregationResult.toObject(e.result,t,r+1)),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1)),null!=e.explainMetrics&&Object.hasOwnProperty.call(e,"explainMetrics")&&(o.explainMetrics=f.google.firestore.v1.ExplainMetrics.toObject(e.explainMetrics,t,r+1)),o},Ft.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ft.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.RunAggregationQueryResponse"},Ft),i.PartitionQueryRequest=(Vt.prototype.parent="",Vt.prototype.structuredQuery=null,Vt.prototype.partitionCount=p.Long?p.Long.fromBits(0,0,!1):0,Vt.prototype.pageToken="",Vt.prototype.pageSize=0,Vt.prototype.readTime=null,Object.defineProperty(Vt.prototype,"queryType",{get:p.oneOfGetter(t=["structuredQuery"]),set:p.oneOfSetter(t)}),Object.defineProperty(Vt.prototype,"consistencySelector",{get:p.oneOfGetter(t=["readTime"]),set:p.oneOfSetter(t)}),Vt.create=function(e){return new Vt(e)},Vt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&f.google.firestore.v1.StructuredQuery.encode(e.structuredQuery,t.uint32(18).fork(),r+1).ldelim(),null!=e.partitionCount&&Object.hasOwnProperty.call(e,"partitionCount")&&t.uint32(24).int64(e.partitionCount),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&t.uint32(34).string(e.pageToken),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&t.uint32(40).int32(e.pageSize),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(50).fork(),r+1).ldelim(),t},Vt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Vt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.PartitionQueryRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.structuredQuery=f.google.firestore.v1.StructuredQuery.decode(e,e.uint32(),void 0,o+1);break;case 3:i.partitionCount=e.int64();break;case 4:i.pageToken=e.string();break;case 5:i.pageSize=e.int32();break;case 6:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Vt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Vt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&(r=f.google.firestore.v1.StructuredQuery.verify(e.structuredQuery,t+1)))return"structuredQuery."+r;if(null!=e.partitionCount&&Object.hasOwnProperty.call(e,"partitionCount")&&!(p.isInteger(e.partitionCount)||e.partitionCount&&p.isInteger(e.partitionCount.low)&&p.isInteger(e.partitionCount.high)))return"partitionCount: integer|Long expected";if(null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&!p.isString(e.pageToken))return"pageToken: string expected";if(null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&!p.isInteger(e.pageSize))return"pageSize: integer expected";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(r=f.google.protobuf.Timestamp.verify(e.readTime,t+1)))return"readTime."+r;return null},Vt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.PartitionQueryRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.PartitionQueryRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.PartitionQueryRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.structuredQuery){if(!p.isObject(e.structuredQuery))throw TypeError(".google.firestore.v1.PartitionQueryRequest.structuredQuery: object expected");r.structuredQuery=f.google.firestore.v1.StructuredQuery.fromObject(e.structuredQuery,t+1)}if(null!=e.partitionCount&&(p.Long?r.partitionCount=p.Long.fromValue(e.partitionCount,!1):"string"==typeof e.partitionCount?r.partitionCount=parseInt(e.partitionCount,10):"number"==typeof e.partitionCount?r.partitionCount=e.partitionCount:"object"==typeof e.partitionCount&&(r.partitionCount=new p.LongBits(e.partitionCount.low>>>0,e.partitionCount.high>>>0).toNumber())),null!=e.pageToken&&(r.pageToken=String(e.pageToken)),null!=e.pageSize&&(r.pageSize=0|e.pageSize),null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.PartitionQueryRequest.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},Vt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};return t.defaults&&(n.parent="",p.Long?(o=new p.Long(0,0,!1),n.partitionCount=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):n.partitionCount=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0,n.pageToken="",n.pageSize=0),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(n.parent=e.parent),null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&(n.structuredQuery=f.google.firestore.v1.StructuredQuery.toObject(e.structuredQuery,t,r+1),t.oneofs)&&(n.queryType="structuredQuery"),null!=e.partitionCount&&Object.hasOwnProperty.call(e,"partitionCount")&&("undefined"!=typeof BigInt&&t.longs===BigInt?n.partitionCount="number"==typeof e.partitionCount?BigInt(e.partitionCount):p.Long.fromBits(e.partitionCount.low>>>0,e.partitionCount.high>>>0,!1).toBigInt():"number"==typeof e.partitionCount?n.partitionCount=t.longs===String?String(e.partitionCount):e.partitionCount:n.partitionCount=t.longs===String?p.Long.prototype.toString.call(e.partitionCount):t.longs===Number?new p.LongBits(e.partitionCount.low>>>0,e.partitionCount.high>>>0).toNumber():e.partitionCount),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&(n.pageToken=e.pageToken),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&(n.pageSize=e.pageSize),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(n.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(n.consistencySelector="readTime"),n},Vt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Vt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.PartitionQueryRequest"},Vt),i.PartitionQueryResponse=(Ut.prototype.partitions=p.emptyArray,Ut.prototype.nextPageToken="",Ut.create=function(e){return new Ut(e)},Ut.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.partitions&&e.partitions.length)for(var o=0;o<e.partitions.length;++o)f.google.firestore.v1.Cursor.encode(e.partitions[o],t.uint32(10).fork(),r+1).ldelim();return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(18).string(e.nextPageToken),t},Ut.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ut.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.PartitionQueryResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.partitions&&i.partitions.length||(i.partitions=[]),i.partitions.push(f.google.firestore.v1.Cursor.decode(e,e.uint32(),void 0,o+1));break;case 2:i.nextPageToken=e.string();break;default:e.skipType(7&a,o)}}return i},Ut.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ut.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.partitions&&Object.hasOwnProperty.call(e,"partitions")){if(!Array.isArray(e.partitions))return"partitions: array expected";for(var r=0;r<e.partitions.length;++r){var o=f.google.firestore.v1.Cursor.verify(e.partitions[r],t+1);if(o)return"partitions."+o}}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&!p.isString(e.nextPageToken)?"nextPageToken: string expected":null},Ut.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.PartitionQueryResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.PartitionQueryResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.PartitionQueryResponse;if(e.partitions){if(!Array.isArray(e.partitions))throw TypeError(".google.firestore.v1.PartitionQueryResponse.partitions: array expected");r.partitions=[];for(var o=0;o<e.partitions.length;++o){if(!p.isObject(e.partitions[o]))throw TypeError(".google.firestore.v1.PartitionQueryResponse.partitions: object expected");r.partitions[o]=f.google.firestore.v1.Cursor.fromObject(e.partitions[o],t+1)}}return null!=e.nextPageToken&&(r.nextPageToken=String(e.nextPageToken)),r},Ut.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.partitions=[]),t.defaults&&(o.nextPageToken=""),e.partitions&&e.partitions.length){o.partitions=[];for(var n=0;n<e.partitions.length;++n)o.partitions[n]=f.google.firestore.v1.Cursor.toObject(e.partitions[n],t,r+1)}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&(o.nextPageToken=e.nextPageToken),o},Ut.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ut.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.PartitionQueryResponse"},Ut),i.WriteRequest=(Bt.prototype.database="",Bt.prototype.streamId="",Bt.prototype.writes=p.emptyArray,Bt.prototype.streamToken=p.newBuffer([]),Bt.prototype.labels=p.emptyObject,Bt.create=function(e){return new Bt(e)},Bt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.streamId&&Object.hasOwnProperty.call(e,"streamId")&&t.uint32(18).string(e.streamId),null!=e.writes&&e.writes.length)for(var o=0;o<e.writes.length;++o)f.google.firestore.v1.Write.encode(e.writes[o],t.uint32(26).fork(),r+1).ldelim();if(null!=e.streamToken&&Object.hasOwnProperty.call(e,"streamToken")&&t.uint32(34).bytes(e.streamToken),null!=e.labels&&Object.hasOwnProperty.call(e,"labels"))for(var n=Object.keys(e.labels),o=0;o<n.length;++o)t.uint32(42).fork().uint32(10).string(n[o]).uint32(18).string(e.labels[n[o]]).ldelim();return t},Bt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Bt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.WriteRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.streamId=e.string();break;case 3:i.writes&&i.writes.length||(i.writes=[]),i.writes.push(f.google.firestore.v1.Write.decode(e,e.uint32(),void 0,o+1));break;case 4:i.streamToken=e.bytes();break;case 5:i.labels===p.emptyObject&&(i.labels={});for(var s=e.uint32()+e.pos,l="",c="";e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=e.string();break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.labels,l),i.labels[l]=c;break;default:e.skipType(7&a,o)}}return i},Bt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Bt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.streamId&&Object.hasOwnProperty.call(e,"streamId")&&!p.isString(e.streamId))return"streamId: string expected";if(null!=e.writes&&Object.hasOwnProperty.call(e,"writes")){if(!Array.isArray(e.writes))return"writes: array expected";for(var r=0;r<e.writes.length;++r){var o=f.google.firestore.v1.Write.verify(e.writes[r],t+1);if(o)return"writes."+o}}if(null!=e.streamToken&&Object.hasOwnProperty.call(e,"streamToken")&&!(e.streamToken&&"number"==typeof e.streamToken.length||p.isString(e.streamToken)))return"streamToken: buffer expected";if(null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){if(!p.isObject(e.labels))return"labels: object expected";for(var n=Object.keys(e.labels),r=0;r<n.length;++r)if(!p.isString(e.labels[n[r]]))return"labels: string{k:string} expected"}return null},Bt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.WriteRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.WriteRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.WriteRequest;if(null!=e.database&&(r.database=String(e.database)),null!=e.streamId&&(r.streamId=String(e.streamId)),e.writes){if(!Array.isArray(e.writes))throw TypeError(".google.firestore.v1.WriteRequest.writes: array expected");r.writes=[];for(var o=0;o<e.writes.length;++o){if(!p.isObject(e.writes[o]))throw TypeError(".google.firestore.v1.WriteRequest.writes: object expected");r.writes[o]=f.google.firestore.v1.Write.fromObject(e.writes[o],t+1)}}if(null!=e.streamToken&&("string"==typeof e.streamToken?p.base64.decode(e.streamToken,r.streamToken=p.newBuffer(p.base64.length(e.streamToken)),0):0<=e.streamToken.length&&(r.streamToken=e.streamToken)),e.labels){if(!p.isObject(e.labels))throw TypeError(".google.firestore.v1.WriteRequest.labels: object expected");r.labels={};for(var n=Object.keys(e.labels),o=0;o<n.length;++o)"__proto__"===n[o]&&p.makeProp(r.labels,n[o]),r.labels[n[o]]=String(e.labels[n[o]])}return r},Bt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.arrays||t.defaults)&&(n.writes=[]),(t.objects||t.defaults)&&(n.labels={}),t.defaults&&(n.database="",n.streamId="",t.bytes===String?n.streamToken="":(n.streamToken=[],t.bytes!==Array&&(n.streamToken=p.newBuffer(n.streamToken)))),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(n.database=e.database),null!=e.streamId&&Object.hasOwnProperty.call(e,"streamId")&&(n.streamId=e.streamId),e.writes&&e.writes.length){n.writes=[];for(var i=0;i<e.writes.length;++i)n.writes[i]=f.google.firestore.v1.Write.toObject(e.writes[i],t,r+1)}if(null!=e.streamToken&&Object.hasOwnProperty.call(e,"streamToken")&&(n.streamToken=t.bytes===String?p.base64.encode(e.streamToken,0,e.streamToken.length):t.bytes===Array?Array.prototype.slice.call(e.streamToken):e.streamToken),e.labels&&(o=Object.keys(e.labels)).length){n.labels={};for(i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.labels,o[i]),n.labels[o[i]]=e.labels[o[i]]}return n},Bt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Bt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.WriteRequest"},Bt),i.WriteResponse=(Mt.prototype.streamId="",Mt.prototype.streamToken=p.newBuffer([]),Mt.prototype.writeResults=p.emptyArray,Mt.prototype.commitTime=null,Mt.create=function(e){return new Mt(e)},Mt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.streamId&&Object.hasOwnProperty.call(e,"streamId")&&t.uint32(10).string(e.streamId),null!=e.streamToken&&Object.hasOwnProperty.call(e,"streamToken")&&t.uint32(18).bytes(e.streamToken),null!=e.writeResults&&e.writeResults.length)for(var o=0;o<e.writeResults.length;++o)f.google.firestore.v1.WriteResult.encode(e.writeResults[o],t.uint32(26).fork(),r+1).ldelim();return null!=e.commitTime&&Object.hasOwnProperty.call(e,"commitTime")&&f.google.protobuf.Timestamp.encode(e.commitTime,t.uint32(34).fork(),r+1).ldelim(),t},Mt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Mt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.WriteResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.streamId=e.string();break;case 2:i.streamToken=e.bytes();break;case 3:i.writeResults&&i.writeResults.length||(i.writeResults=[]),i.writeResults.push(f.google.firestore.v1.WriteResult.decode(e,e.uint32(),void 0,o+1));break;case 4:i.commitTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Mt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Mt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.streamId&&Object.hasOwnProperty.call(e,"streamId")&&!p.isString(e.streamId))return"streamId: string expected";if(null!=e.streamToken&&Object.hasOwnProperty.call(e,"streamToken")&&!(e.streamToken&&"number"==typeof e.streamToken.length||p.isString(e.streamToken)))return"streamToken: buffer expected";if(null!=e.writeResults&&Object.hasOwnProperty.call(e,"writeResults")){if(!Array.isArray(e.writeResults))return"writeResults: array expected";for(var r=0;r<e.writeResults.length;++r)if(o=f.google.firestore.v1.WriteResult.verify(e.writeResults[r],t+1))return"writeResults."+o}var o;if(null!=e.commitTime&&Object.hasOwnProperty.call(e,"commitTime")&&(o=f.google.protobuf.Timestamp.verify(e.commitTime,t+1)))return"commitTime."+o;return null},Mt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.WriteResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.WriteResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.WriteResponse;if(null!=e.streamId&&(r.streamId=String(e.streamId)),null!=e.streamToken&&("string"==typeof e.streamToken?p.base64.decode(e.streamToken,r.streamToken=p.newBuffer(p.base64.length(e.streamToken)),0):0<=e.streamToken.length&&(r.streamToken=e.streamToken)),e.writeResults){if(!Array.isArray(e.writeResults))throw TypeError(".google.firestore.v1.WriteResponse.writeResults: array expected");r.writeResults=[];for(var o=0;o<e.writeResults.length;++o){if(!p.isObject(e.writeResults[o]))throw TypeError(".google.firestore.v1.WriteResponse.writeResults: object expected");r.writeResults[o]=f.google.firestore.v1.WriteResult.fromObject(e.writeResults[o],t+1)}}if(null!=e.commitTime){if(!p.isObject(e.commitTime))throw TypeError(".google.firestore.v1.WriteResponse.commitTime: object expected");r.commitTime=f.google.protobuf.Timestamp.fromObject(e.commitTime,t+1)}return r},Mt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.writeResults=[]),t.defaults&&(o.streamId="",t.bytes===String?o.streamToken="":(o.streamToken=[],t.bytes!==Array&&(o.streamToken=p.newBuffer(o.streamToken))),o.commitTime=null),null!=e.streamId&&Object.hasOwnProperty.call(e,"streamId")&&(o.streamId=e.streamId),null!=e.streamToken&&Object.hasOwnProperty.call(e,"streamToken")&&(o.streamToken=t.bytes===String?p.base64.encode(e.streamToken,0,e.streamToken.length):t.bytes===Array?Array.prototype.slice.call(e.streamToken):e.streamToken),e.writeResults&&e.writeResults.length){o.writeResults=[];for(var n=0;n<e.writeResults.length;++n)o.writeResults[n]=f.google.firestore.v1.WriteResult.toObject(e.writeResults[n],t,r+1)}return null!=e.commitTime&&Object.hasOwnProperty.call(e,"commitTime")&&(o.commitTime=f.google.protobuf.Timestamp.toObject(e.commitTime,t,r+1)),o},Mt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Mt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.WriteResponse"},Mt),i.ListenRequest=(qt.prototype.database="",qt.prototype.addTarget=null,qt.prototype.removeTarget=null,qt.prototype.labels=p.emptyObject,Object.defineProperty(qt.prototype,"targetChange",{get:p.oneOfGetter(e=["addTarget","removeTarget"]),set:p.oneOfSetter(e)}),qt.create=function(e){return new qt(e)},qt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.addTarget&&Object.hasOwnProperty.call(e,"addTarget")&&f.google.firestore.v1.Target.encode(e.addTarget,t.uint32(18).fork(),r+1).ldelim(),null!=e.removeTarget&&Object.hasOwnProperty.call(e,"removeTarget")&&t.uint32(24).int32(e.removeTarget),null!=e.labels&&Object.hasOwnProperty.call(e,"labels"))for(var o=Object.keys(e.labels),n=0;n<o.length;++n)t.uint32(34).fork().uint32(10).string(o[n]).uint32(18).string(e.labels[o[n]]).ldelim();return t},qt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},qt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.ListenRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.addTarget=f.google.firestore.v1.Target.decode(e,e.uint32(),void 0,o+1);break;case 3:i.removeTarget=e.int32();break;case 4:i.labels===p.emptyObject&&(i.labels={});for(var s=e.uint32()+e.pos,l="",c="";e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=e.string();break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.labels,l),i.labels[l]=c;break;default:e.skipType(7&a,o)}}return i},qt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},qt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r={};if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.addTarget&&Object.hasOwnProperty.call(e,"addTarget")){t=f.google.firestore.v1.Target.verify(e.addTarget,t+(r.targetChange=1));if(t)return"addTarget."+t}if(null!=e.removeTarget&&Object.hasOwnProperty.call(e,"removeTarget")){if(1===r.targetChange)return"targetChange: multiple values";if(r.targetChange=1,!p.isInteger(e.removeTarget))return"removeTarget: integer expected"}if(null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){if(!p.isObject(e.labels))return"labels: object expected";for(var o=Object.keys(e.labels),n=0;n<o.length;++n)if(!p.isString(e.labels[o[n]]))return"labels: string{k:string} expected"}return null},qt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.ListenRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.ListenRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.ListenRequest;if(null!=e.database&&(r.database=String(e.database)),null!=e.addTarget){if(!p.isObject(e.addTarget))throw TypeError(".google.firestore.v1.ListenRequest.addTarget: object expected");r.addTarget=f.google.firestore.v1.Target.fromObject(e.addTarget,t+1)}if(null!=e.removeTarget&&(r.removeTarget=0|e.removeTarget),e.labels){if(!p.isObject(e.labels))throw TypeError(".google.firestore.v1.ListenRequest.labels: object expected");r.labels={};for(var o=Object.keys(e.labels),n=0;n<o.length;++n)"__proto__"===o[n]&&p.makeProp(r.labels,o[n]),r.labels[o[n]]=String(e.labels[o[n]])}return r},qt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.objects||t.defaults)&&(n.labels={}),t.defaults&&(n.database=""),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(n.database=e.database),null!=e.addTarget&&Object.hasOwnProperty.call(e,"addTarget")&&(n.addTarget=f.google.firestore.v1.Target.toObject(e.addTarget,t,r+1),t.oneofs)&&(n.targetChange="addTarget"),null!=e.removeTarget&&Object.hasOwnProperty.call(e,"removeTarget")&&(n.removeTarget=e.removeTarget,t.oneofs)&&(n.targetChange="removeTarget"),e.labels&&(o=Object.keys(e.labels)).length){n.labels={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.labels,o[i]),n.labels[o[i]]=e.labels[o[i]]}return n},qt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},qt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ListenRequest"},qt),i.ListenResponse=(Qt.prototype.targetChange=null,Qt.prototype.documentChange=null,Qt.prototype.documentDelete=null,Qt.prototype.documentRemove=null,Qt.prototype.filter=null,Object.defineProperty(Qt.prototype,"responseType",{get:p.oneOfGetter(t=["targetChange","documentChange","documentDelete","documentRemove","filter"]),set:p.oneOfSetter(t)}),Qt.create=function(e){return new Qt(e)},Qt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.targetChange&&Object.hasOwnProperty.call(e,"targetChange")&&f.google.firestore.v1.TargetChange.encode(e.targetChange,t.uint32(18).fork(),r+1).ldelim(),null!=e.documentChange&&Object.hasOwnProperty.call(e,"documentChange")&&f.google.firestore.v1.DocumentChange.encode(e.documentChange,t.uint32(26).fork(),r+1).ldelim(),null!=e.documentDelete&&Object.hasOwnProperty.call(e,"documentDelete")&&f.google.firestore.v1.DocumentDelete.encode(e.documentDelete,t.uint32(34).fork(),r+1).ldelim(),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&f.google.firestore.v1.ExistenceFilter.encode(e.filter,t.uint32(42).fork(),r+1).ldelim(),null!=e.documentRemove&&Object.hasOwnProperty.call(e,"documentRemove")&&f.google.firestore.v1.DocumentRemove.encode(e.documentRemove,t.uint32(50).fork(),r+1).ldelim(),t},Qt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Qt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.ListenResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 2:i.targetChange=f.google.firestore.v1.TargetChange.decode(e,e.uint32(),void 0,o+1);break;case 3:i.documentChange=f.google.firestore.v1.DocumentChange.decode(e,e.uint32(),void 0,o+1);break;case 4:i.documentDelete=f.google.firestore.v1.DocumentDelete.decode(e,e.uint32(),void 0,o+1);break;case 6:i.documentRemove=f.google.firestore.v1.DocumentRemove.decode(e,e.uint32(),void 0,o+1);break;case 5:i.filter=f.google.firestore.v1.ExistenceFilter.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Qt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Qt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.targetChange&&Object.hasOwnProperty.call(e,"targetChange")&&(r=f.google.firestore.v1.TargetChange.verify(e.targetChange,t+(o.responseType=1))))return"targetChange."+r;if(null!=e.documentChange&&Object.hasOwnProperty.call(e,"documentChange")){if(1===o.responseType)return"responseType: multiple values";if(r=f.google.firestore.v1.DocumentChange.verify(e.documentChange,t+(o.responseType=1)))return"documentChange."+r}if(null!=e.documentDelete&&Object.hasOwnProperty.call(e,"documentDelete")){if(1===o.responseType)return"responseType: multiple values";if(r=f.google.firestore.v1.DocumentDelete.verify(e.documentDelete,t+(o.responseType=1)))return"documentDelete."+r}if(null!=e.documentRemove&&Object.hasOwnProperty.call(e,"documentRemove")){if(1===o.responseType)return"responseType: multiple values";if(r=f.google.firestore.v1.DocumentRemove.verify(e.documentRemove,t+(o.responseType=1)))return"documentRemove."+r}if(null!=e.filter&&Object.hasOwnProperty.call(e,"filter")){if(1===o.responseType)return"responseType: multiple values";if(r=f.google.firestore.v1.ExistenceFilter.verify(e.filter,t+(o.responseType=1)))return"filter."+r}return null},Qt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.ListenResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.ListenResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.ListenResponse;if(null!=e.targetChange){if(!p.isObject(e.targetChange))throw TypeError(".google.firestore.v1.ListenResponse.targetChange: object expected");r.targetChange=f.google.firestore.v1.TargetChange.fromObject(e.targetChange,t+1)}if(null!=e.documentChange){if(!p.isObject(e.documentChange))throw TypeError(".google.firestore.v1.ListenResponse.documentChange: object expected");r.documentChange=f.google.firestore.v1.DocumentChange.fromObject(e.documentChange,t+1)}if(null!=e.documentDelete){if(!p.isObject(e.documentDelete))throw TypeError(".google.firestore.v1.ListenResponse.documentDelete: object expected");r.documentDelete=f.google.firestore.v1.DocumentDelete.fromObject(e.documentDelete,t+1)}if(null!=e.documentRemove){if(!p.isObject(e.documentRemove))throw TypeError(".google.firestore.v1.ListenResponse.documentRemove: object expected");r.documentRemove=f.google.firestore.v1.DocumentRemove.fromObject(e.documentRemove,t+1)}if(null!=e.filter){if(!p.isObject(e.filter))throw TypeError(".google.firestore.v1.ListenResponse.filter: object expected");r.filter=f.google.firestore.v1.ExistenceFilter.fromObject(e.filter,t+1)}return r},Qt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return null!=e.targetChange&&Object.hasOwnProperty.call(e,"targetChange")&&(o.targetChange=f.google.firestore.v1.TargetChange.toObject(e.targetChange,t,r+1),t.oneofs)&&(o.responseType="targetChange"),null!=e.documentChange&&Object.hasOwnProperty.call(e,"documentChange")&&(o.documentChange=f.google.firestore.v1.DocumentChange.toObject(e.documentChange,t,r+1),t.oneofs)&&(o.responseType="documentChange"),null!=e.documentDelete&&Object.hasOwnProperty.call(e,"documentDelete")&&(o.documentDelete=f.google.firestore.v1.DocumentDelete.toObject(e.documentDelete,t,r+1),t.oneofs)&&(o.responseType="documentDelete"),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&(o.filter=f.google.firestore.v1.ExistenceFilter.toObject(e.filter,t,r+1),t.oneofs)&&(o.responseType="filter"),null!=e.documentRemove&&Object.hasOwnProperty.call(e,"documentRemove")&&(o.documentRemove=f.google.firestore.v1.DocumentRemove.toObject(e.documentRemove,t,r+1),t.oneofs)&&(o.responseType="documentRemove"),o},Qt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Qt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ListenResponse"},Qt),i.Target=(v.prototype.query=null,v.prototype.documents=null,v.prototype.resumeToken=null,v.prototype.readTime=null,v.prototype.targetId=0,v.prototype.once=!1,v.prototype.expectedCount=null,Object.defineProperty(v.prototype,"targetType",{get:p.oneOfGetter(e=["query","documents"]),set:p.oneOfSetter(e)}),Object.defineProperty(v.prototype,"resumeType",{get:p.oneOfGetter(e=["resumeToken","readTime"]),set:p.oneOfSetter(e)}),v.create=function(e){return new v(e)},v.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.query&&Object.hasOwnProperty.call(e,"query")&&f.google.firestore.v1.Target.QueryTarget.encode(e.query,t.uint32(18).fork(),r+1).ldelim(),null!=e.documents&&Object.hasOwnProperty.call(e,"documents")&&f.google.firestore.v1.Target.DocumentsTarget.encode(e.documents,t.uint32(26).fork(),r+1).ldelim(),null!=e.resumeToken&&Object.hasOwnProperty.call(e,"resumeToken")&&t.uint32(34).bytes(e.resumeToken),null!=e.targetId&&Object.hasOwnProperty.call(e,"targetId")&&t.uint32(40).int32(e.targetId),null!=e.once&&Object.hasOwnProperty.call(e,"once")&&t.uint32(48).bool(e.once),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(90).fork(),r+1).ldelim(),null!=e.expectedCount&&Object.hasOwnProperty.call(e,"expectedCount")&&f.google.protobuf.Int32Value.encode(e.expectedCount,t.uint32(98).fork(),r+1).ldelim(),t},v.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},v.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.Target;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 2:i.query=f.google.firestore.v1.Target.QueryTarget.decode(e,e.uint32(),void 0,o+1);break;case 3:i.documents=f.google.firestore.v1.Target.DocumentsTarget.decode(e,e.uint32(),void 0,o+1);break;case 4:i.resumeToken=e.bytes();break;case 11:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 5:i.targetId=e.int32();break;case 6:i.once=e.bool();break;case 12:i.expectedCount=f.google.protobuf.Int32Value.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},v.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},v.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.query&&Object.hasOwnProperty.call(e,"query")&&(r=f.google.firestore.v1.Target.QueryTarget.verify(e.query,t+(o.targetType=1))))return"query."+r;if(null!=e.documents&&Object.hasOwnProperty.call(e,"documents")){if(1===o.targetType)return"targetType: multiple values";if(r=f.google.firestore.v1.Target.DocumentsTarget.verify(e.documents,t+(o.targetType=1)))return"documents."+r}if(null!=e.resumeToken&&Object.hasOwnProperty.call(e,"resumeToken")&&(o.resumeType=1,!(e.resumeToken&&"number"==typeof e.resumeToken.length||p.isString(e.resumeToken))))return"resumeToken: buffer expected";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){if(1===o.resumeType)return"resumeType: multiple values";if(r=f.google.protobuf.Timestamp.verify(e.readTime,t+(o.resumeType=1)))return"readTime."+r}if(null!=e.targetId&&Object.hasOwnProperty.call(e,"targetId")&&!p.isInteger(e.targetId))return"targetId: integer expected";if(null!=e.once&&Object.hasOwnProperty.call(e,"once")&&"boolean"!=typeof e.once)return"once: boolean expected";if(null!=e.expectedCount&&Object.hasOwnProperty.call(e,"expectedCount")&&(r=f.google.protobuf.Int32Value.verify(e.expectedCount,t+1)))return"expectedCount."+r;return null},v.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.Target)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.Target: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.Target;if(null!=e.query){if(!p.isObject(e.query))throw TypeError(".google.firestore.v1.Target.query: object expected");r.query=f.google.firestore.v1.Target.QueryTarget.fromObject(e.query,t+1)}if(null!=e.documents){if(!p.isObject(e.documents))throw TypeError(".google.firestore.v1.Target.documents: object expected");r.documents=f.google.firestore.v1.Target.DocumentsTarget.fromObject(e.documents,t+1)}if(null!=e.resumeToken&&("string"==typeof e.resumeToken?p.base64.decode(e.resumeToken,r.resumeToken=p.newBuffer(p.base64.length(e.resumeToken)),0):0<=e.resumeToken.length&&(r.resumeToken=e.resumeToken)),null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.Target.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}if(null!=e.targetId&&(r.targetId=0|e.targetId),null!=e.once&&(r.once=Boolean(e.once)),null!=e.expectedCount){if(!p.isObject(e.expectedCount))throw TypeError(".google.firestore.v1.Target.expectedCount: object expected");r.expectedCount=f.google.protobuf.Int32Value.fromObject(e.expectedCount,t+1)}return r},v.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.targetId=0,o.once=!1,o.expectedCount=null),null!=e.query&&Object.hasOwnProperty.call(e,"query")&&(o.query=f.google.firestore.v1.Target.QueryTarget.toObject(e.query,t,r+1),t.oneofs)&&(o.targetType="query"),null!=e.documents&&Object.hasOwnProperty.call(e,"documents")&&(o.documents=f.google.firestore.v1.Target.DocumentsTarget.toObject(e.documents,t,r+1),t.oneofs)&&(o.targetType="documents"),null!=e.resumeToken&&Object.hasOwnProperty.call(e,"resumeToken")&&(o.resumeToken=t.bytes===String?p.base64.encode(e.resumeToken,0,e.resumeToken.length):t.bytes===Array?Array.prototype.slice.call(e.resumeToken):e.resumeToken,t.oneofs)&&(o.resumeType="resumeToken"),null!=e.targetId&&Object.hasOwnProperty.call(e,"targetId")&&(o.targetId=e.targetId),null!=e.once&&Object.hasOwnProperty.call(e,"once")&&(o.once=e.once),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.resumeType="readTime"),null!=e.expectedCount&&Object.hasOwnProperty.call(e,"expectedCount")&&(o.expectedCount=f.google.protobuf.Int32Value.toObject(e.expectedCount,t,r+1)),o},v.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},v.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.Target"},v.DocumentsTarget=(Jt.prototype.documents=p.emptyArray,Jt.create=function(e){return new Jt(e)},Jt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.documents&&e.documents.length)for(var o=0;o<e.documents.length;++o)t.uint32(18).string(e.documents[o]);return t},Jt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Jt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.Target.DocumentsTarget;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==2?(i.documents&&i.documents.length||(i.documents=[]),i.documents.push(e.string())):e.skipType(7&a,o)}return i},Jt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Jt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.documents&&Object.hasOwnProperty.call(e,"documents")){if(!Array.isArray(e.documents))return"documents: array expected";for(var r=0;r<e.documents.length;++r)if(!p.isString(e.documents[r]))return"documents: string[] expected"}return null},Jt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.Target.DocumentsTarget)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.Target.DocumentsTarget: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.Target.DocumentsTarget;if(e.documents){if(!Array.isArray(e.documents))throw TypeError(".google.firestore.v1.Target.DocumentsTarget.documents: array expected");r.documents=[];for(var o=0;o<e.documents.length;++o)r.documents[o]=String(e.documents[o])}return r},Jt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.documents=[]),e.documents&&e.documents.length){o.documents=[];for(var n=0;n<e.documents.length;++n)o.documents[n]=e.documents[n]}return o},Jt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Jt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.Target.DocumentsTarget"},Jt),v.QueryTarget=(Gt.prototype.parent="",Gt.prototype.structuredQuery=null,Object.defineProperty(Gt.prototype,"queryType",{get:p.oneOfGetter(e=["structuredQuery"]),set:p.oneOfSetter(e)}),Gt.create=function(e){return new Gt(e)},Gt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&f.google.firestore.v1.StructuredQuery.encode(e.structuredQuery,t.uint32(18).fork(),r+1).ldelim(),t},Gt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Gt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.Target.QueryTarget;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.structuredQuery=f.google.firestore.v1.StructuredQuery.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Gt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Gt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")){e=f.google.firestore.v1.StructuredQuery.verify(e.structuredQuery,t+1);if(e)return"structuredQuery."+e}return null},Gt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.Target.QueryTarget)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.Target.QueryTarget: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.Target.QueryTarget;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.structuredQuery){if(!p.isObject(e.structuredQuery))throw TypeError(".google.firestore.v1.Target.QueryTarget.structuredQuery: object expected");r.structuredQuery=f.google.firestore.v1.StructuredQuery.fromObject(e.structuredQuery,t+1)}return r},Gt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.parent=""),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(o.parent=e.parent),null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&(o.structuredQuery=f.google.firestore.v1.StructuredQuery.toObject(e.structuredQuery,t,r+1),t.oneofs)&&(o.queryType="structuredQuery"),o},Gt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Gt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.Target.QueryTarget"},Gt),v),i.TargetChange=(Wt.prototype.targetChangeType=0,Wt.prototype.targetIds=p.emptyArray,Wt.prototype.cause=null,Wt.prototype.resumeToken=p.newBuffer([]),Wt.prototype.readTime=null,Wt.create=function(e){return new Wt(e)},Wt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.targetChangeType&&Object.hasOwnProperty.call(e,"targetChangeType")&&t.uint32(8).int32(e.targetChangeType),null!=e.targetIds&&e.targetIds.length){t.uint32(18).fork();for(var o=0;o<e.targetIds.length;++o)t.int32(e.targetIds[o]);t.ldelim()}return null!=e.cause&&Object.hasOwnProperty.call(e,"cause")&&f.google.rpc.Status.encode(e.cause,t.uint32(26).fork(),r+1).ldelim(),null!=e.resumeToken&&Object.hasOwnProperty.call(e,"resumeToken")&&t.uint32(34).bytes(e.resumeToken),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(50).fork(),r+1).ldelim(),t},Wt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Wt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.TargetChange;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.targetChangeType=e.int32();break;case 2:if(i.targetIds&&i.targetIds.length||(i.targetIds=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.targetIds.push(e.int32());else i.targetIds.push(e.int32());break;case 3:i.cause=f.google.rpc.Status.decode(e,e.uint32(),void 0,o+1);break;case 4:i.resumeToken=e.bytes();break;case 6:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Wt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Wt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.targetChangeType&&Object.hasOwnProperty.call(e,"targetChangeType"))switch(e.targetChangeType){default:return"targetChangeType: enum value expected";case 0:case 1:case 2:case 3:case 4:}if(null!=e.targetIds&&Object.hasOwnProperty.call(e,"targetIds")){if(!Array.isArray(e.targetIds))return"targetIds: array expected";for(var r=0;r<e.targetIds.length;++r)if(!p.isInteger(e.targetIds[r]))return"targetIds: integer[] expected"}var o;if(null!=e.cause&&Object.hasOwnProperty.call(e,"cause")&&(o=f.google.rpc.Status.verify(e.cause,t+1)))return"cause."+o;if(null!=e.resumeToken&&Object.hasOwnProperty.call(e,"resumeToken")&&!(e.resumeToken&&"number"==typeof e.resumeToken.length||p.isString(e.resumeToken)))return"resumeToken: buffer expected";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o=f.google.protobuf.Timestamp.verify(e.readTime,t+1)))return"readTime."+o;return null},Wt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.TargetChange)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.TargetChange: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.TargetChange;switch(e.targetChangeType){default:"number"==typeof e.targetChangeType&&(r.targetChangeType=e.targetChangeType);break;case"NO_CHANGE":case 0:r.targetChangeType=0;break;case"ADD":case 1:r.targetChangeType=1;break;case"REMOVE":case 2:r.targetChangeType=2;break;case"CURRENT":case 3:r.targetChangeType=3;break;case"RESET":case 4:r.targetChangeType=4}if(e.targetIds){if(!Array.isArray(e.targetIds))throw TypeError(".google.firestore.v1.TargetChange.targetIds: array expected");r.targetIds=[];for(var o=0;o<e.targetIds.length;++o)r.targetIds[o]=0|e.targetIds[o]}if(null!=e.cause){if(!p.isObject(e.cause))throw TypeError(".google.firestore.v1.TargetChange.cause: object expected");r.cause=f.google.rpc.Status.fromObject(e.cause,t+1)}if(null!=e.resumeToken&&("string"==typeof e.resumeToken?p.base64.decode(e.resumeToken,r.resumeToken=p.newBuffer(p.base64.length(e.resumeToken)),0):0<=e.resumeToken.length&&(r.resumeToken=e.resumeToken)),null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.TargetChange.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},Wt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.targetIds=[]),t.defaults&&(o.targetChangeType=t.enums===String?"NO_CHANGE":0,o.cause=null,t.bytes===String?o.resumeToken="":(o.resumeToken=[],t.bytes!==Array&&(o.resumeToken=p.newBuffer(o.resumeToken))),o.readTime=null),null!=e.targetChangeType&&Object.hasOwnProperty.call(e,"targetChangeType")&&(o.targetChangeType=t.enums!==String||void 0===f.google.firestore.v1.TargetChange.TargetChangeType[e.targetChangeType]?e.targetChangeType:f.google.firestore.v1.TargetChange.TargetChangeType[e.targetChangeType]),e.targetIds&&e.targetIds.length){o.targetIds=[];for(var n=0;n<e.targetIds.length;++n)o.targetIds[n]=e.targetIds[n]}return null!=e.cause&&Object.hasOwnProperty.call(e,"cause")&&(o.cause=f.google.rpc.Status.toObject(e.cause,t,r+1)),null!=e.resumeToken&&Object.hasOwnProperty.call(e,"resumeToken")&&(o.resumeToken=t.bytes===String?p.base64.encode(e.resumeToken,0,e.resumeToken.length):t.bytes===Array?Array.prototype.slice.call(e.resumeToken):e.resumeToken),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1)),o},Wt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Wt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.TargetChange"},Wt.TargetChangeType=(t={},(e=Object.create(t))[t[0]="NO_CHANGE"]=0,e[t[1]="ADD"]=1,e[t[2]="REMOVE"]=2,e[t[3]="CURRENT"]=3,e[t[4]="RESET"]=4,e),Wt),i.ListCollectionIdsRequest=(zt.prototype.parent="",zt.prototype.pageSize=0,zt.prototype.pageToken="",zt.prototype.readTime=null,Object.defineProperty(zt.prototype,"consistencySelector",{get:p.oneOfGetter(t=["readTime"]),set:p.oneOfSetter(t)}),zt.create=function(e){return new zt(e)},zt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&t.uint32(16).int32(e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&t.uint32(26).string(e.pageToken),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(34).fork(),r+1).ldelim(),t},zt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},zt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.ListCollectionIdsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.pageSize=e.int32();break;case 3:i.pageToken=e.string();break;case 4:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},zt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},zt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&!p.isInteger(e.pageSize))return"pageSize: integer expected";if(null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&!p.isString(e.pageToken))return"pageToken: string expected";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){e=f.google.protobuf.Timestamp.verify(e.readTime,t+1);if(e)return"readTime."+e}return null},zt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.ListCollectionIdsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.ListCollectionIdsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.ListCollectionIdsRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.pageSize&&(r.pageSize=0|e.pageSize),null!=e.pageToken&&(r.pageToken=String(e.pageToken)),null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.ListCollectionIdsRequest.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},zt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.parent="",o.pageSize=0,o.pageToken=""),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(o.parent=e.parent),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&(o.pageSize=e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&(o.pageToken=e.pageToken),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.consistencySelector="readTime"),o},zt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},zt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ListCollectionIdsRequest"},zt),i.ListCollectionIdsResponse=(Yt.prototype.collectionIds=p.emptyArray,Yt.prototype.nextPageToken="",Yt.create=function(e){return new Yt(e)},Yt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.collectionIds&&e.collectionIds.length)for(var o=0;o<e.collectionIds.length;++o)t.uint32(10).string(e.collectionIds[o]);return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(18).string(e.nextPageToken),t},Yt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Yt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.ListCollectionIdsResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.collectionIds&&i.collectionIds.length||(i.collectionIds=[]),i.collectionIds.push(e.string());break;case 2:i.nextPageToken=e.string();break;default:e.skipType(7&a,o)}}return i},Yt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Yt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.collectionIds&&Object.hasOwnProperty.call(e,"collectionIds")){if(!Array.isArray(e.collectionIds))return"collectionIds: array expected";for(var r=0;r<e.collectionIds.length;++r)if(!p.isString(e.collectionIds[r]))return"collectionIds: string[] expected"}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&!p.isString(e.nextPageToken)?"nextPageToken: string expected":null},Yt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.ListCollectionIdsResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.ListCollectionIdsResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.ListCollectionIdsResponse;if(e.collectionIds){if(!Array.isArray(e.collectionIds))throw TypeError(".google.firestore.v1.ListCollectionIdsResponse.collectionIds: array expected");r.collectionIds=[];for(var o=0;o<e.collectionIds.length;++o)r.collectionIds[o]=String(e.collectionIds[o])}return null!=e.nextPageToken&&(r.nextPageToken=String(e.nextPageToken)),r},Yt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.collectionIds=[]),t.defaults&&(o.nextPageToken=""),e.collectionIds&&e.collectionIds.length){o.collectionIds=[];for(var n=0;n<e.collectionIds.length;++n)o.collectionIds[n]=e.collectionIds[n]}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&(o.nextPageToken=e.nextPageToken),o},Yt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Yt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ListCollectionIdsResponse"},Yt),i.BatchWriteRequest=(Ht.prototype.database="",Ht.prototype.writes=p.emptyArray,Ht.prototype.labels=p.emptyObject,Ht.create=function(e){return new Ht(e)},Ht.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.writes&&e.writes.length)for(var o=0;o<e.writes.length;++o)f.google.firestore.v1.Write.encode(e.writes[o],t.uint32(18).fork(),r+1).ldelim();if(null!=e.labels&&Object.hasOwnProperty.call(e,"labels"))for(var n=Object.keys(e.labels),o=0;o<n.length;++o)t.uint32(26).fork().uint32(10).string(n[o]).uint32(18).string(e.labels[n[o]]).ldelim();return t},Ht.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ht.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.BatchWriteRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.writes&&i.writes.length||(i.writes=[]),i.writes.push(f.google.firestore.v1.Write.decode(e,e.uint32(),void 0,o+1));break;case 3:i.labels===p.emptyObject&&(i.labels={});for(var s=e.uint32()+e.pos,l="",c="";e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=e.string();break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.labels,l),i.labels[l]=c;break;default:e.skipType(7&a,o)}}return i},Ht.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ht.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.writes&&Object.hasOwnProperty.call(e,"writes")){if(!Array.isArray(e.writes))return"writes: array expected";for(var r=0;r<e.writes.length;++r){var o=f.google.firestore.v1.Write.verify(e.writes[r],t+1);if(o)return"writes."+o}}if(null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){if(!p.isObject(e.labels))return"labels: object expected";for(var n=Object.keys(e.labels),r=0;r<n.length;++r)if(!p.isString(e.labels[n[r]]))return"labels: string{k:string} expected"}return null},Ht.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.BatchWriteRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.BatchWriteRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.BatchWriteRequest;if(null!=e.database&&(r.database=String(e.database)),e.writes){if(!Array.isArray(e.writes))throw TypeError(".google.firestore.v1.BatchWriteRequest.writes: array expected");r.writes=[];for(var o=0;o<e.writes.length;++o){if(!p.isObject(e.writes[o]))throw TypeError(".google.firestore.v1.BatchWriteRequest.writes: object expected");r.writes[o]=f.google.firestore.v1.Write.fromObject(e.writes[o],t+1)}}if(e.labels){if(!p.isObject(e.labels))throw TypeError(".google.firestore.v1.BatchWriteRequest.labels: object expected");r.labels={};for(var n=Object.keys(e.labels),o=0;o<n.length;++o)"__proto__"===n[o]&&p.makeProp(r.labels,n[o]),r.labels[n[o]]=String(e.labels[n[o]])}return r},Ht.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.arrays||t.defaults)&&(n.writes=[]),(t.objects||t.defaults)&&(n.labels={}),t.defaults&&(n.database=""),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(n.database=e.database),e.writes&&e.writes.length){n.writes=[];for(var i=0;i<e.writes.length;++i)n.writes[i]=f.google.firestore.v1.Write.toObject(e.writes[i],t,r+1)}if(e.labels&&(o=Object.keys(e.labels)).length){n.labels={};for(i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.labels,o[i]),n.labels[o[i]]=e.labels[o[i]]}return n},Ht.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ht.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.BatchWriteRequest"},Ht),i.BatchWriteResponse=(Kt.prototype.writeResults=p.emptyArray,Kt.prototype.status=p.emptyArray,Kt.create=function(e){return new Kt(e)},Kt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.writeResults&&e.writeResults.length)for(var o=0;o<e.writeResults.length;++o)f.google.firestore.v1.WriteResult.encode(e.writeResults[o],t.uint32(10).fork(),r+1).ldelim();if(null!=e.status&&e.status.length)for(o=0;o<e.status.length;++o)f.google.rpc.Status.encode(e.status[o],t.uint32(18).fork(),r+1).ldelim();return t},Kt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Kt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.BatchWriteResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.writeResults&&i.writeResults.length||(i.writeResults=[]),i.writeResults.push(f.google.firestore.v1.WriteResult.decode(e,e.uint32(),void 0,o+1));break;case 2:i.status&&i.status.length||(i.status=[]),i.status.push(f.google.rpc.Status.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},Kt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Kt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.writeResults&&Object.hasOwnProperty.call(e,"writeResults")){if(!Array.isArray(e.writeResults))return"writeResults: array expected";for(var r=0;r<e.writeResults.length;++r)if(o=f.google.firestore.v1.WriteResult.verify(e.writeResults[r],t+1))return"writeResults."+o}if(null!=e.status&&Object.hasOwnProperty.call(e,"status")){if(!Array.isArray(e.status))return"status: array expected";for(var o,r=0;r<e.status.length;++r)if(o=f.google.rpc.Status.verify(e.status[r],t+1))return"status."+o}return null},Kt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.BatchWriteResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.BatchWriteResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.BatchWriteResponse;if(e.writeResults){if(!Array.isArray(e.writeResults))throw TypeError(".google.firestore.v1.BatchWriteResponse.writeResults: array expected");r.writeResults=[];for(var o=0;o<e.writeResults.length;++o){if(!p.isObject(e.writeResults[o]))throw TypeError(".google.firestore.v1.BatchWriteResponse.writeResults: object expected");r.writeResults[o]=f.google.firestore.v1.WriteResult.fromObject(e.writeResults[o],t+1)}}if(e.status){if(!Array.isArray(e.status))throw TypeError(".google.firestore.v1.BatchWriteResponse.status: array expected");r.status=[];for(o=0;o<e.status.length;++o){if(!p.isObject(e.status[o]))throw TypeError(".google.firestore.v1.BatchWriteResponse.status: object expected");r.status[o]=f.google.rpc.Status.fromObject(e.status[o],t+1)}}return r},Kt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.writeResults=[],o.status=[]),e.writeResults&&e.writeResults.length){o.writeResults=[];for(var n=0;n<e.writeResults.length;++n)o.writeResults[n]=f.google.firestore.v1.WriteResult.toObject(e.writeResults[n],t,r+1)}if(e.status&&e.status.length){o.status=[];for(n=0;n<e.status.length;++n)o.status[n]=f.google.rpc.Status.toObject(e.status[n],t,r+1)}return o},Kt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Kt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.BatchWriteResponse"},Kt),i.StructuredPipeline=(Xt.prototype.pipeline=null,Xt.prototype.options=p.emptyObject,Xt.create=function(e){return new Xt(e)},Xt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.pipeline&&Object.hasOwnProperty.call(e,"pipeline")&&f.google.firestore.v1.Pipeline.encode(e.pipeline,t.uint32(10).fork(),r+1).ldelim(),null!=e.options&&Object.hasOwnProperty.call(e,"options"))for(var o=Object.keys(e.options),n=0;n<o.length;++n)t.uint32(18).fork().uint32(10).string(o[n]),f.google.firestore.v1.Value.encode(e.options[o[n]],t.uint32(18).fork(),r+1).ldelim().ldelim();return t},Xt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Xt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredPipeline;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.pipeline=f.google.firestore.v1.Pipeline.decode(e,e.uint32(),void 0,o+1);break;case 2:i.options===p.emptyObject&&(i.options={});for(var s=e.uint32()+e.pos,l="",c=null;e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.options,l),i.options[l]=c;break;default:e.skipType(7&a,o)}}return i},Xt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Xt.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.pipeline&&Object.hasOwnProperty.call(e,"pipeline")&&(r=f.google.firestore.v1.Pipeline.verify(e.pipeline,t+1)))return"pipeline."+r;if(null!=e.options&&Object.hasOwnProperty.call(e,"options")){if(!p.isObject(e.options))return"options: object expected";for(var r,o=Object.keys(e.options),n=0;n<o.length;++n)if(r=f.google.firestore.v1.Value.verify(e.options[o[n]],t+1))return"options."+r}return null},Xt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredPipeline)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredPipeline: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.StructuredPipeline;if(null!=e.pipeline){if(!p.isObject(e.pipeline))throw TypeError(".google.firestore.v1.StructuredPipeline.pipeline: object expected");r.pipeline=f.google.firestore.v1.Pipeline.fromObject(e.pipeline,t+1)}if(e.options){if(!p.isObject(e.options))throw TypeError(".google.firestore.v1.StructuredPipeline.options: object expected");r.options={};for(var o=Object.keys(e.options),n=0;n<o.length;++n){if("__proto__"===o[n]&&p.makeProp(r.options,o[n]),!p.isObject(e.options[o[n]]))throw TypeError(".google.firestore.v1.StructuredPipeline.options: object expected");r.options[o[n]]=f.google.firestore.v1.Value.fromObject(e.options[o[n]],t+1)}}return r},Xt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.objects||t.defaults)&&(n.options={}),t.defaults&&(n.pipeline=null),null!=e.pipeline&&Object.hasOwnProperty.call(e,"pipeline")&&(n.pipeline=f.google.firestore.v1.Pipeline.toObject(e.pipeline,t,r+1)),e.options&&(o=Object.keys(e.options)).length){n.options={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.options,o[i]),n.options[o[i]]=f.google.firestore.v1.Value.toObject(e.options[o[i]],t,r+1)}return n},Xt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Xt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredPipeline"},Xt),i.StructuredQuery=(j.prototype.select=null,j.prototype.from=p.emptyArray,j.prototype.where=null,j.prototype.orderBy=p.emptyArray,j.prototype.startAt=null,j.prototype.endAt=null,j.prototype.offset=0,j.prototype.limit=null,j.prototype.findNearest=null,j.create=function(e){return new j(e)},j.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.select&&Object.hasOwnProperty.call(e,"select")&&f.google.firestore.v1.StructuredQuery.Projection.encode(e.select,t.uint32(10).fork(),r+1).ldelim(),null!=e.from&&e.from.length)for(var o=0;o<e.from.length;++o)f.google.firestore.v1.StructuredQuery.CollectionSelector.encode(e.from[o],t.uint32(18).fork(),r+1).ldelim();if(null!=e.where&&Object.hasOwnProperty.call(e,"where")&&f.google.firestore.v1.StructuredQuery.Filter.encode(e.where,t.uint32(26).fork(),r+1).ldelim(),null!=e.orderBy&&e.orderBy.length)for(o=0;o<e.orderBy.length;++o)f.google.firestore.v1.StructuredQuery.Order.encode(e.orderBy[o],t.uint32(34).fork(),r+1).ldelim();return null!=e.limit&&Object.hasOwnProperty.call(e,"limit")&&f.google.protobuf.Int32Value.encode(e.limit,t.uint32(42).fork(),r+1).ldelim(),null!=e.offset&&Object.hasOwnProperty.call(e,"offset")&&t.uint32(48).int32(e.offset),null!=e.startAt&&Object.hasOwnProperty.call(e,"startAt")&&f.google.firestore.v1.Cursor.encode(e.startAt,t.uint32(58).fork(),r+1).ldelim(),null!=e.endAt&&Object.hasOwnProperty.call(e,"endAt")&&f.google.firestore.v1.Cursor.encode(e.endAt,t.uint32(66).fork(),r+1).ldelim(),null!=e.findNearest&&Object.hasOwnProperty.call(e,"findNearest")&&f.google.firestore.v1.StructuredQuery.FindNearest.encode(e.findNearest,t.uint32(74).fork(),r+1).ldelim(),t},j.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},j.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredQuery;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.select=f.google.firestore.v1.StructuredQuery.Projection.decode(e,e.uint32(),void 0,o+1);break;case 2:i.from&&i.from.length||(i.from=[]),i.from.push(f.google.firestore.v1.StructuredQuery.CollectionSelector.decode(e,e.uint32(),void 0,o+1));break;case 3:i.where=f.google.firestore.v1.StructuredQuery.Filter.decode(e,e.uint32(),void 0,o+1);break;case 4:i.orderBy&&i.orderBy.length||(i.orderBy=[]),i.orderBy.push(f.google.firestore.v1.StructuredQuery.Order.decode(e,e.uint32(),void 0,o+1));break;case 7:i.startAt=f.google.firestore.v1.Cursor.decode(e,e.uint32(),void 0,o+1);break;case 8:i.endAt=f.google.firestore.v1.Cursor.decode(e,e.uint32(),void 0,o+1);break;case 6:i.offset=e.int32();break;case 5:i.limit=f.google.protobuf.Int32Value.decode(e,e.uint32(),void 0,o+1);break;case 9:i.findNearest=f.google.firestore.v1.StructuredQuery.FindNearest.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},j.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},j.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.select&&Object.hasOwnProperty.call(e,"select")&&(o=f.google.firestore.v1.StructuredQuery.Projection.verify(e.select,t+1)))return"select."+o;if(null!=e.from&&Object.hasOwnProperty.call(e,"from")){if(!Array.isArray(e.from))return"from: array expected";for(var r=0;r<e.from.length;++r)if(o=f.google.firestore.v1.StructuredQuery.CollectionSelector.verify(e.from[r],t+1))return"from."+o}if(null!=e.where&&Object.hasOwnProperty.call(e,"where")&&(o=f.google.firestore.v1.StructuredQuery.Filter.verify(e.where,t+1)))return"where."+o;if(null!=e.orderBy&&Object.hasOwnProperty.call(e,"orderBy")){if(!Array.isArray(e.orderBy))return"orderBy: array expected";for(var o,r=0;r<e.orderBy.length;++r)if(o=f.google.firestore.v1.StructuredQuery.Order.verify(e.orderBy[r],t+1))return"orderBy."+o}if(null!=e.startAt&&Object.hasOwnProperty.call(e,"startAt")&&(o=f.google.firestore.v1.Cursor.verify(e.startAt,t+1)))return"startAt."+o;if(null!=e.endAt&&Object.hasOwnProperty.call(e,"endAt")&&(o=f.google.firestore.v1.Cursor.verify(e.endAt,t+1)))return"endAt."+o;if(null!=e.offset&&Object.hasOwnProperty.call(e,"offset")&&!p.isInteger(e.offset))return"offset: integer expected";if(null!=e.limit&&Object.hasOwnProperty.call(e,"limit")&&(o=f.google.protobuf.Int32Value.verify(e.limit,t+1)))return"limit."+o;if(null!=e.findNearest&&Object.hasOwnProperty.call(e,"findNearest")&&(o=f.google.firestore.v1.StructuredQuery.FindNearest.verify(e.findNearest,t+1)))return"findNearest."+o;return null},j.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredQuery)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredQuery: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.StructuredQuery;if(null!=e.select){if(!p.isObject(e.select))throw TypeError(".google.firestore.v1.StructuredQuery.select: object expected");r.select=f.google.firestore.v1.StructuredQuery.Projection.fromObject(e.select,t+1)}if(e.from){if(!Array.isArray(e.from))throw TypeError(".google.firestore.v1.StructuredQuery.from: array expected");r.from=[];for(var o=0;o<e.from.length;++o){if(!p.isObject(e.from[o]))throw TypeError(".google.firestore.v1.StructuredQuery.from: object expected");r.from[o]=f.google.firestore.v1.StructuredQuery.CollectionSelector.fromObject(e.from[o],t+1)}}if(null!=e.where){if(!p.isObject(e.where))throw TypeError(".google.firestore.v1.StructuredQuery.where: object expected");r.where=f.google.firestore.v1.StructuredQuery.Filter.fromObject(e.where,t+1)}if(e.orderBy){if(!Array.isArray(e.orderBy))throw TypeError(".google.firestore.v1.StructuredQuery.orderBy: array expected");r.orderBy=[];for(o=0;o<e.orderBy.length;++o){if(!p.isObject(e.orderBy[o]))throw TypeError(".google.firestore.v1.StructuredQuery.orderBy: object expected");r.orderBy[o]=f.google.firestore.v1.StructuredQuery.Order.fromObject(e.orderBy[o],t+1)}}if(null!=e.startAt){if(!p.isObject(e.startAt))throw TypeError(".google.firestore.v1.StructuredQuery.startAt: object expected");r.startAt=f.google.firestore.v1.Cursor.fromObject(e.startAt,t+1)}if(null!=e.endAt){if(!p.isObject(e.endAt))throw TypeError(".google.firestore.v1.StructuredQuery.endAt: object expected");r.endAt=f.google.firestore.v1.Cursor.fromObject(e.endAt,t+1)}if(null!=e.offset&&(r.offset=0|e.offset),null!=e.limit){if(!p.isObject(e.limit))throw TypeError(".google.firestore.v1.StructuredQuery.limit: object expected");r.limit=f.google.protobuf.Int32Value.fromObject(e.limit,t+1)}if(null!=e.findNearest){if(!p.isObject(e.findNearest))throw TypeError(".google.firestore.v1.StructuredQuery.findNearest: object expected");r.findNearest=f.google.firestore.v1.StructuredQuery.FindNearest.fromObject(e.findNearest,t+1)}return r},j.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.from=[],o.orderBy=[]),t.defaults&&(o.select=null,o.where=null,o.limit=null,o.offset=0,o.startAt=null,o.endAt=null,o.findNearest=null),null!=e.select&&Object.hasOwnProperty.call(e,"select")&&(o.select=f.google.firestore.v1.StructuredQuery.Projection.toObject(e.select,t,r+1)),e.from&&e.from.length){o.from=[];for(var n=0;n<e.from.length;++n)o.from[n]=f.google.firestore.v1.StructuredQuery.CollectionSelector.toObject(e.from[n],t,r+1)}if(null!=e.where&&Object.hasOwnProperty.call(e,"where")&&(o.where=f.google.firestore.v1.StructuredQuery.Filter.toObject(e.where,t,r+1)),e.orderBy&&e.orderBy.length){o.orderBy=[];for(n=0;n<e.orderBy.length;++n)o.orderBy[n]=f.google.firestore.v1.StructuredQuery.Order.toObject(e.orderBy[n],t,r+1)}return null!=e.limit&&Object.hasOwnProperty.call(e,"limit")&&(o.limit=f.google.protobuf.Int32Value.toObject(e.limit,t,r+1)),null!=e.offset&&Object.hasOwnProperty.call(e,"offset")&&(o.offset=e.offset),null!=e.startAt&&Object.hasOwnProperty.call(e,"startAt")&&(o.startAt=f.google.firestore.v1.Cursor.toObject(e.startAt,t,r+1)),null!=e.endAt&&Object.hasOwnProperty.call(e,"endAt")&&(o.endAt=f.google.firestore.v1.Cursor.toObject(e.endAt,t,r+1)),null!=e.findNearest&&Object.hasOwnProperty.call(e,"findNearest")&&(o.findNearest=f.google.firestore.v1.StructuredQuery.FindNearest.toObject(e.findNearest,t,r+1)),o},j.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},j.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredQuery"},j.CollectionSelector=(Zt.prototype.collectionId="",Zt.prototype.allDescendants=!1,Zt.create=function(e){return new Zt(e)},Zt.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&t.uint32(18).string(e.collectionId),null!=e.allDescendants&&Object.hasOwnProperty.call(e,"allDescendants")&&t.uint32(24).bool(e.allDescendants),t},Zt.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Zt.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredQuery.CollectionSelector;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 2:i.collectionId=e.string();break;case 3:i.allDescendants=e.bool();break;default:e.skipType(7&a,o)}}return i},Zt.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Zt.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&!p.isString(e.collectionId)?"collectionId: string expected":null!=e.allDescendants&&Object.hasOwnProperty.call(e,"allDescendants")&&"boolean"!=typeof e.allDescendants?"allDescendants: boolean expected":null},Zt.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredQuery.CollectionSelector)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredQuery.CollectionSelector: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.v1.StructuredQuery.CollectionSelector;return null!=e.collectionId&&(t.collectionId=String(e.collectionId)),null!=e.allDescendants&&(t.allDescendants=Boolean(e.allDescendants)),t},Zt.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.collectionId="",r.allDescendants=!1),null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&(r.collectionId=e.collectionId),null!=e.allDescendants&&Object.hasOwnProperty.call(e,"allDescendants")&&(r.allDescendants=e.allDescendants),r},Zt.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Zt.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredQuery.CollectionSelector"},Zt),j.Filter=($t.prototype.compositeFilter=null,$t.prototype.fieldFilter=null,$t.prototype.unaryFilter=null,Object.defineProperty($t.prototype,"filterType",{get:p.oneOfGetter(e=["compositeFilter","fieldFilter","unaryFilter"]),set:p.oneOfSetter(e)}),$t.create=function(e){return new $t(e)},$t.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.compositeFilter&&Object.hasOwnProperty.call(e,"compositeFilter")&&f.google.firestore.v1.StructuredQuery.CompositeFilter.encode(e.compositeFilter,t.uint32(10).fork(),r+1).ldelim(),null!=e.fieldFilter&&Object.hasOwnProperty.call(e,"fieldFilter")&&f.google.firestore.v1.StructuredQuery.FieldFilter.encode(e.fieldFilter,t.uint32(18).fork(),r+1).ldelim(),null!=e.unaryFilter&&Object.hasOwnProperty.call(e,"unaryFilter")&&f.google.firestore.v1.StructuredQuery.UnaryFilter.encode(e.unaryFilter,t.uint32(26).fork(),r+1).ldelim(),t},$t.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},$t.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredQuery.Filter;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.compositeFilter=f.google.firestore.v1.StructuredQuery.CompositeFilter.decode(e,e.uint32(),void 0,o+1);break;case 2:i.fieldFilter=f.google.firestore.v1.StructuredQuery.FieldFilter.decode(e,e.uint32(),void 0,o+1);break;case 3:i.unaryFilter=f.google.firestore.v1.StructuredQuery.UnaryFilter.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},$t.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},$t.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.compositeFilter&&Object.hasOwnProperty.call(e,"compositeFilter")&&(r=f.google.firestore.v1.StructuredQuery.CompositeFilter.verify(e.compositeFilter,t+(o.filterType=1))))return"compositeFilter."+r;if(null!=e.fieldFilter&&Object.hasOwnProperty.call(e,"fieldFilter")){if(1===o.filterType)return"filterType: multiple values";if(r=f.google.firestore.v1.StructuredQuery.FieldFilter.verify(e.fieldFilter,t+(o.filterType=1)))return"fieldFilter."+r}if(null!=e.unaryFilter&&Object.hasOwnProperty.call(e,"unaryFilter")){if(1===o.filterType)return"filterType: multiple values";if(r=f.google.firestore.v1.StructuredQuery.UnaryFilter.verify(e.unaryFilter,t+(o.filterType=1)))return"unaryFilter."+r}return null},$t.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredQuery.Filter)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredQuery.Filter: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.StructuredQuery.Filter;if(null!=e.compositeFilter){if(!p.isObject(e.compositeFilter))throw TypeError(".google.firestore.v1.StructuredQuery.Filter.compositeFilter: object expected");r.compositeFilter=f.google.firestore.v1.StructuredQuery.CompositeFilter.fromObject(e.compositeFilter,t+1)}if(null!=e.fieldFilter){if(!p.isObject(e.fieldFilter))throw TypeError(".google.firestore.v1.StructuredQuery.Filter.fieldFilter: object expected");r.fieldFilter=f.google.firestore.v1.StructuredQuery.FieldFilter.fromObject(e.fieldFilter,t+1)}if(null!=e.unaryFilter){if(!p.isObject(e.unaryFilter))throw TypeError(".google.firestore.v1.StructuredQuery.Filter.unaryFilter: object expected");r.unaryFilter=f.google.firestore.v1.StructuredQuery.UnaryFilter.fromObject(e.unaryFilter,t+1)}return r},$t.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return null!=e.compositeFilter&&Object.hasOwnProperty.call(e,"compositeFilter")&&(o.compositeFilter=f.google.firestore.v1.StructuredQuery.CompositeFilter.toObject(e.compositeFilter,t,r+1),t.oneofs)&&(o.filterType="compositeFilter"),null!=e.fieldFilter&&Object.hasOwnProperty.call(e,"fieldFilter")&&(o.fieldFilter=f.google.firestore.v1.StructuredQuery.FieldFilter.toObject(e.fieldFilter,t,r+1),t.oneofs)&&(o.filterType="fieldFilter"),null!=e.unaryFilter&&Object.hasOwnProperty.call(e,"unaryFilter")&&(o.unaryFilter=f.google.firestore.v1.StructuredQuery.UnaryFilter.toObject(e.unaryFilter,t,r+1),t.oneofs)&&(o.filterType="unaryFilter"),o},$t.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},$t.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredQuery.Filter"},$t),j.CompositeFilter=(er.prototype.op=0,er.prototype.filters=p.emptyArray,er.create=function(e){return new er(e)},er.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.op&&Object.hasOwnProperty.call(e,"op")&&t.uint32(8).int32(e.op),null!=e.filters&&e.filters.length)for(var o=0;o<e.filters.length;++o)f.google.firestore.v1.StructuredQuery.Filter.encode(e.filters[o],t.uint32(18).fork(),r+1).ldelim();return t},er.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},er.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredQuery.CompositeFilter;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.op=e.int32();break;case 2:i.filters&&i.filters.length||(i.filters=[]),i.filters.push(f.google.firestore.v1.StructuredQuery.Filter.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},er.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},er.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.op&&Object.hasOwnProperty.call(e,"op"))switch(e.op){default:return"op: enum value expected";case 0:case 1:case 2:}if(null!=e.filters&&Object.hasOwnProperty.call(e,"filters")){if(!Array.isArray(e.filters))return"filters: array expected";for(var r=0;r<e.filters.length;++r){var o=f.google.firestore.v1.StructuredQuery.Filter.verify(e.filters[r],t+1);if(o)return"filters."+o}}return null},er.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredQuery.CompositeFilter)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredQuery.CompositeFilter: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.StructuredQuery.CompositeFilter;switch(e.op){default:"number"==typeof e.op&&(r.op=e.op);break;case"OPERATOR_UNSPECIFIED":case 0:r.op=0;break;case"AND":case 1:r.op=1;break;case"OR":case 2:r.op=2}if(e.filters){if(!Array.isArray(e.filters))throw TypeError(".google.firestore.v1.StructuredQuery.CompositeFilter.filters: array expected");r.filters=[];for(var o=0;o<e.filters.length;++o){if(!p.isObject(e.filters[o]))throw TypeError(".google.firestore.v1.StructuredQuery.CompositeFilter.filters: object expected");r.filters[o]=f.google.firestore.v1.StructuredQuery.Filter.fromObject(e.filters[o],t+1)}}return r},er.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.filters=[]),t.defaults&&(o.op=t.enums===String?"OPERATOR_UNSPECIFIED":0),null!=e.op&&Object.hasOwnProperty.call(e,"op")&&(o.op=t.enums!==String||void 0===f.google.firestore.v1.StructuredQuery.CompositeFilter.Operator[e.op]?e.op:f.google.firestore.v1.StructuredQuery.CompositeFilter.Operator[e.op]),e.filters&&e.filters.length){o.filters=[];for(var n=0;n<e.filters.length;++n)o.filters[n]=f.google.firestore.v1.StructuredQuery.Filter.toObject(e.filters[n],t,r+1)}return o},er.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},er.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredQuery.CompositeFilter"},er.Operator=(e={},(t=Object.create(e))[e[0]="OPERATOR_UNSPECIFIED"]=0,t[e[1]="AND"]=1,t[e[2]="OR"]=2,t),er),j.FieldFilter=(tr.prototype.field=null,tr.prototype.op=0,tr.prototype.value=null,tr.create=function(e){return new tr(e)},tr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.field&&Object.hasOwnProperty.call(e,"field")&&f.google.firestore.v1.StructuredQuery.FieldReference.encode(e.field,t.uint32(10).fork(),r+1).ldelim(),null!=e.op&&Object.hasOwnProperty.call(e,"op")&&t.uint32(16).int32(e.op),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&f.google.firestore.v1.Value.encode(e.value,t.uint32(26).fork(),r+1).ldelim(),t},tr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},tr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredQuery.FieldFilter;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.field=f.google.firestore.v1.StructuredQuery.FieldReference.decode(e,e.uint32(),void 0,o+1);break;case 2:i.op=e.int32();break;case 3:i.value=f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},tr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},tr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.field&&Object.hasOwnProperty.call(e,"field")&&(r=f.google.firestore.v1.StructuredQuery.FieldReference.verify(e.field,t+1)))return"field."+r;if(null!=e.op&&Object.hasOwnProperty.call(e,"op"))switch(e.op){default:return"op: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:}if(null!=e.value&&Object.hasOwnProperty.call(e,"value")&&(r=f.google.firestore.v1.Value.verify(e.value,t+1)))return"value."+r;return null},tr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredQuery.FieldFilter)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredQuery.FieldFilter: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.StructuredQuery.FieldFilter;if(null!=e.field){if(!p.isObject(e.field))throw TypeError(".google.firestore.v1.StructuredQuery.FieldFilter.field: object expected");r.field=f.google.firestore.v1.StructuredQuery.FieldReference.fromObject(e.field,t+1)}switch(e.op){default:"number"==typeof e.op&&(r.op=e.op);break;case"OPERATOR_UNSPECIFIED":case 0:r.op=0;break;case"LESS_THAN":case 1:r.op=1;break;case"LESS_THAN_OR_EQUAL":case 2:r.op=2;break;case"GREATER_THAN":case 3:r.op=3;break;case"GREATER_THAN_OR_EQUAL":case 4:r.op=4;break;case"EQUAL":case 5:r.op=5;break;case"NOT_EQUAL":case 6:r.op=6;break;case"ARRAY_CONTAINS":case 7:r.op=7;break;case"IN":case 8:r.op=8;break;case"ARRAY_CONTAINS_ANY":case 9:r.op=9;break;case"NOT_IN":case 10:r.op=10}if(null!=e.value){if(!p.isObject(e.value))throw TypeError(".google.firestore.v1.StructuredQuery.FieldFilter.value: object expected");r.value=f.google.firestore.v1.Value.fromObject(e.value,t+1)}return r},tr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.field=null,o.op=t.enums===String?"OPERATOR_UNSPECIFIED":0,o.value=null),null!=e.field&&Object.hasOwnProperty.call(e,"field")&&(o.field=f.google.firestore.v1.StructuredQuery.FieldReference.toObject(e.field,t,r+1)),null!=e.op&&Object.hasOwnProperty.call(e,"op")&&(o.op=t.enums!==String||void 0===f.google.firestore.v1.StructuredQuery.FieldFilter.Operator[e.op]?e.op:f.google.firestore.v1.StructuredQuery.FieldFilter.Operator[e.op]),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&(o.value=f.google.firestore.v1.Value.toObject(e.value,t,r+1)),o},tr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},tr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredQuery.FieldFilter"},tr.Operator=(e={},(t=Object.create(e))[e[0]="OPERATOR_UNSPECIFIED"]=0,t[e[1]="LESS_THAN"]=1,t[e[2]="LESS_THAN_OR_EQUAL"]=2,t[e[3]="GREATER_THAN"]=3,t[e[4]="GREATER_THAN_OR_EQUAL"]=4,t[e[5]="EQUAL"]=5,t[e[6]="NOT_EQUAL"]=6,t[e[7]="ARRAY_CONTAINS"]=7,t[e[8]="IN"]=8,t[e[9]="ARRAY_CONTAINS_ANY"]=9,t[e[10]="NOT_IN"]=10,t),tr),j.UnaryFilter=(rr.prototype.op=0,rr.prototype.field=null,Object.defineProperty(rr.prototype,"operandType",{get:p.oneOfGetter(e=["field"]),set:p.oneOfSetter(e)}),rr.create=function(e){return new rr(e)},rr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.op&&Object.hasOwnProperty.call(e,"op")&&t.uint32(8).int32(e.op),null!=e.field&&Object.hasOwnProperty.call(e,"field")&&f.google.firestore.v1.StructuredQuery.FieldReference.encode(e.field,t.uint32(18).fork(),r+1).ldelim(),t},rr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},rr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredQuery.UnaryFilter;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.op=e.int32();break;case 2:i.field=f.google.firestore.v1.StructuredQuery.FieldReference.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},rr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},rr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.op&&Object.hasOwnProperty.call(e,"op"))switch(e.op){default:return"op: enum value expected";case 0:case 2:case 3:case 4:case 5:}if(null!=e.field&&Object.hasOwnProperty.call(e,"field")){e=f.google.firestore.v1.StructuredQuery.FieldReference.verify(e.field,t+1);if(e)return"field."+e}return null},rr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredQuery.UnaryFilter)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredQuery.UnaryFilter: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.StructuredQuery.UnaryFilter;switch(e.op){default:"number"==typeof e.op&&(r.op=e.op);break;case"OPERATOR_UNSPECIFIED":case 0:r.op=0;break;case"IS_NAN":case 2:r.op=2;break;case"IS_NULL":case 3:r.op=3;break;case"IS_NOT_NAN":case 4:r.op=4;break;case"IS_NOT_NULL":case 5:r.op=5}if(null!=e.field){if(!p.isObject(e.field))throw TypeError(".google.firestore.v1.StructuredQuery.UnaryFilter.field: object expected");r.field=f.google.firestore.v1.StructuredQuery.FieldReference.fromObject(e.field,t+1)}return r},rr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.op=t.enums===String?"OPERATOR_UNSPECIFIED":0),null!=e.op&&Object.hasOwnProperty.call(e,"op")&&(o.op=t.enums!==String||void 0===f.google.firestore.v1.StructuredQuery.UnaryFilter.Operator[e.op]?e.op:f.google.firestore.v1.StructuredQuery.UnaryFilter.Operator[e.op]),null!=e.field&&Object.hasOwnProperty.call(e,"field")&&(o.field=f.google.firestore.v1.StructuredQuery.FieldReference.toObject(e.field,t,r+1),t.oneofs)&&(o.operandType="field"),o},rr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},rr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredQuery.UnaryFilter"},rr.Operator=(e={},(t=Object.create(e))[e[0]="OPERATOR_UNSPECIFIED"]=0,t[e[2]="IS_NAN"]=2,t[e[3]="IS_NULL"]=3,t[e[4]="IS_NOT_NAN"]=4,t[e[5]="IS_NOT_NULL"]=5,t),rr),j.Order=(or.prototype.field=null,or.prototype.direction=0,or.create=function(e){return new or(e)},or.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.field&&Object.hasOwnProperty.call(e,"field")&&f.google.firestore.v1.StructuredQuery.FieldReference.encode(e.field,t.uint32(10).fork(),r+1).ldelim(),null!=e.direction&&Object.hasOwnProperty.call(e,"direction")&&t.uint32(16).int32(e.direction),t},or.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},or.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredQuery.Order;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.field=f.google.firestore.v1.StructuredQuery.FieldReference.decode(e,e.uint32(),void 0,o+1);break;case 2:i.direction=e.int32();break;default:e.skipType(7&a,o)}}return i},or.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},or.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.field&&Object.hasOwnProperty.call(e,"field")){t=f.google.firestore.v1.StructuredQuery.FieldReference.verify(e.field,t+1);if(t)return"field."+t}if(null!=e.direction&&Object.hasOwnProperty.call(e,"direction"))switch(e.direction){default:return"direction: enum value expected";case 0:case 1:case 2:}return null},or.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredQuery.Order)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredQuery.Order: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.StructuredQuery.Order;if(null!=e.field){if(!p.isObject(e.field))throw TypeError(".google.firestore.v1.StructuredQuery.Order.field: object expected");r.field=f.google.firestore.v1.StructuredQuery.FieldReference.fromObject(e.field,t+1)}switch(e.direction){default:"number"==typeof e.direction&&(r.direction=e.direction);break;case"DIRECTION_UNSPECIFIED":case 0:r.direction=0;break;case"ASCENDING":case 1:r.direction=1;break;case"DESCENDING":case 2:r.direction=2}return r},or.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.field=null,o.direction=t.enums===String?"DIRECTION_UNSPECIFIED":0),null!=e.field&&Object.hasOwnProperty.call(e,"field")&&(o.field=f.google.firestore.v1.StructuredQuery.FieldReference.toObject(e.field,t,r+1)),null!=e.direction&&Object.hasOwnProperty.call(e,"direction")&&(o.direction=t.enums!==String||void 0===f.google.firestore.v1.StructuredQuery.Direction[e.direction]?e.direction:f.google.firestore.v1.StructuredQuery.Direction[e.direction]),o},or.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},or.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredQuery.Order"},or),j.Direction=(e={},(t=Object.create(e))[e[0]="DIRECTION_UNSPECIFIED"]=0,t[e[1]="ASCENDING"]=1,t[e[2]="DESCENDING"]=2,t),j.FieldReference=(nr.prototype.fieldPath="",nr.create=function(e){return new nr(e)},nr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&t.uint32(18).string(e.fieldPath),t},nr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},nr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredQuery.FieldReference;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==2?i.fieldPath=e.string():e.skipType(7&a,o)}return i},nr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},nr.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&!p.isString(e.fieldPath)?"fieldPath: string expected":null},nr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredQuery.FieldReference)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredQuery.FieldReference: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.v1.StructuredQuery.FieldReference;return null!=e.fieldPath&&(t.fieldPath=String(e.fieldPath)),t},nr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.fieldPath=""),null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&(r.fieldPath=e.fieldPath),r},nr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},nr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredQuery.FieldReference"},nr),j.Projection=(ir.prototype.fields=p.emptyArray,ir.create=function(e){return new ir(e)},ir.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.fields&&e.fields.length)for(var o=0;o<e.fields.length;++o)f.google.firestore.v1.StructuredQuery.FieldReference.encode(e.fields[o],t.uint32(18).fork(),r+1).ldelim();return t},ir.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ir.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredQuery.Projection;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==2?(i.fields&&i.fields.length||(i.fields=[]),i.fields.push(f.google.firestore.v1.StructuredQuery.FieldReference.decode(e,e.uint32(),void 0,o+1))):e.skipType(7&a,o)}return i},ir.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ir.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.fields&&Object.hasOwnProperty.call(e,"fields")){if(!Array.isArray(e.fields))return"fields: array expected";for(var r=0;r<e.fields.length;++r){var o=f.google.firestore.v1.StructuredQuery.FieldReference.verify(e.fields[r],t+1);if(o)return"fields."+o}}return null},ir.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredQuery.Projection)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredQuery.Projection: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.StructuredQuery.Projection;if(e.fields){if(!Array.isArray(e.fields))throw TypeError(".google.firestore.v1.StructuredQuery.Projection.fields: array expected");r.fields=[];for(var o=0;o<e.fields.length;++o){if(!p.isObject(e.fields[o]))throw TypeError(".google.firestore.v1.StructuredQuery.Projection.fields: object expected");r.fields[o]=f.google.firestore.v1.StructuredQuery.FieldReference.fromObject(e.fields[o],t+1)}}return r},ir.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.fields=[]),e.fields&&e.fields.length){o.fields=[];for(var n=0;n<e.fields.length;++n)o.fields[n]=f.google.firestore.v1.StructuredQuery.FieldReference.toObject(e.fields[n],t,r+1)}return o},ir.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ir.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredQuery.Projection"},ir),j.FindNearest=(ar.prototype.vectorField=null,ar.prototype.queryVector=null,ar.prototype.distanceMeasure=0,ar.prototype.limit=null,ar.prototype.distanceResultField="",ar.prototype.distanceThreshold=null,ar.create=function(e){return new ar(e)},ar.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.vectorField&&Object.hasOwnProperty.call(e,"vectorField")&&f.google.firestore.v1.StructuredQuery.FieldReference.encode(e.vectorField,t.uint32(10).fork(),r+1).ldelim(),null!=e.queryVector&&Object.hasOwnProperty.call(e,"queryVector")&&f.google.firestore.v1.Value.encode(e.queryVector,t.uint32(18).fork(),r+1).ldelim(),null!=e.distanceMeasure&&Object.hasOwnProperty.call(e,"distanceMeasure")&&t.uint32(24).int32(e.distanceMeasure),null!=e.limit&&Object.hasOwnProperty.call(e,"limit")&&f.google.protobuf.Int32Value.encode(e.limit,t.uint32(34).fork(),r+1).ldelim(),null!=e.distanceResultField&&Object.hasOwnProperty.call(e,"distanceResultField")&&t.uint32(42).string(e.distanceResultField),null!=e.distanceThreshold&&Object.hasOwnProperty.call(e,"distanceThreshold")&&f.google.protobuf.DoubleValue.encode(e.distanceThreshold,t.uint32(50).fork(),r+1).ldelim(),t},ar.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ar.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredQuery.FindNearest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.vectorField=f.google.firestore.v1.StructuredQuery.FieldReference.decode(e,e.uint32(),void 0,o+1);break;case 2:i.queryVector=f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1);break;case 3:i.distanceMeasure=e.int32();break;case 4:i.limit=f.google.protobuf.Int32Value.decode(e,e.uint32(),void 0,o+1);break;case 5:i.distanceResultField=e.string();break;case 6:i.distanceThreshold=f.google.protobuf.DoubleValue.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},ar.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ar.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.vectorField&&Object.hasOwnProperty.call(e,"vectorField")&&(r=f.google.firestore.v1.StructuredQuery.FieldReference.verify(e.vectorField,t+1)))return"vectorField."+r;if(null!=e.queryVector&&Object.hasOwnProperty.call(e,"queryVector")&&(r=f.google.firestore.v1.Value.verify(e.queryVector,t+1)))return"queryVector."+r;if(null!=e.distanceMeasure&&Object.hasOwnProperty.call(e,"distanceMeasure"))switch(e.distanceMeasure){default:return"distanceMeasure: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.limit&&Object.hasOwnProperty.call(e,"limit")&&(r=f.google.protobuf.Int32Value.verify(e.limit,t+1)))return"limit."+r;if(null!=e.distanceResultField&&Object.hasOwnProperty.call(e,"distanceResultField")&&!p.isString(e.distanceResultField))return"distanceResultField: string expected";if(null!=e.distanceThreshold&&Object.hasOwnProperty.call(e,"distanceThreshold")&&(r=f.google.protobuf.DoubleValue.verify(e.distanceThreshold,t+1)))return"distanceThreshold."+r;return null},ar.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredQuery.FindNearest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredQuery.FindNearest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.StructuredQuery.FindNearest;if(null!=e.vectorField){if(!p.isObject(e.vectorField))throw TypeError(".google.firestore.v1.StructuredQuery.FindNearest.vectorField: object expected");r.vectorField=f.google.firestore.v1.StructuredQuery.FieldReference.fromObject(e.vectorField,t+1)}if(null!=e.queryVector){if(!p.isObject(e.queryVector))throw TypeError(".google.firestore.v1.StructuredQuery.FindNearest.queryVector: object expected");r.queryVector=f.google.firestore.v1.Value.fromObject(e.queryVector,t+1)}switch(e.distanceMeasure){default:"number"==typeof e.distanceMeasure&&(r.distanceMeasure=e.distanceMeasure);break;case"DISTANCE_MEASURE_UNSPECIFIED":case 0:r.distanceMeasure=0;break;case"EUCLIDEAN":case 1:r.distanceMeasure=1;break;case"COSINE":case 2:r.distanceMeasure=2;break;case"DOT_PRODUCT":case 3:r.distanceMeasure=3}if(null!=e.limit){if(!p.isObject(e.limit))throw TypeError(".google.firestore.v1.StructuredQuery.FindNearest.limit: object expected");r.limit=f.google.protobuf.Int32Value.fromObject(e.limit,t+1)}if(null!=e.distanceResultField&&(r.distanceResultField=String(e.distanceResultField)),null!=e.distanceThreshold){if(!p.isObject(e.distanceThreshold))throw TypeError(".google.firestore.v1.StructuredQuery.FindNearest.distanceThreshold: object expected");r.distanceThreshold=f.google.protobuf.DoubleValue.fromObject(e.distanceThreshold,t+1)}return r},ar.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.vectorField=null,o.queryVector=null,o.distanceMeasure=t.enums===String?"DISTANCE_MEASURE_UNSPECIFIED":0,o.limit=null,o.distanceResultField="",o.distanceThreshold=null),null!=e.vectorField&&Object.hasOwnProperty.call(e,"vectorField")&&(o.vectorField=f.google.firestore.v1.StructuredQuery.FieldReference.toObject(e.vectorField,t,r+1)),null!=e.queryVector&&Object.hasOwnProperty.call(e,"queryVector")&&(o.queryVector=f.google.firestore.v1.Value.toObject(e.queryVector,t,r+1)),null!=e.distanceMeasure&&Object.hasOwnProperty.call(e,"distanceMeasure")&&(o.distanceMeasure=t.enums!==String||void 0===f.google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure[e.distanceMeasure]?e.distanceMeasure:f.google.firestore.v1.StructuredQuery.FindNearest.DistanceMeasure[e.distanceMeasure]),null!=e.limit&&Object.hasOwnProperty.call(e,"limit")&&(o.limit=f.google.protobuf.Int32Value.toObject(e.limit,t,r+1)),null!=e.distanceResultField&&Object.hasOwnProperty.call(e,"distanceResultField")&&(o.distanceResultField=e.distanceResultField),null!=e.distanceThreshold&&Object.hasOwnProperty.call(e,"distanceThreshold")&&(o.distanceThreshold=f.google.protobuf.DoubleValue.toObject(e.distanceThreshold,t,r+1)),o},ar.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ar.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredQuery.FindNearest"},ar.DistanceMeasure=(e={},(t=Object.create(e))[e[0]="DISTANCE_MEASURE_UNSPECIFIED"]=0,t[e[1]="EUCLIDEAN"]=1,t[e[2]="COSINE"]=2,t[e[3]="DOT_PRODUCT"]=3,t),ar),j),i.StructuredAggregationQuery=(sr.prototype.structuredQuery=null,sr.prototype.aggregations=p.emptyArray,Object.defineProperty(sr.prototype,"queryType",{get:p.oneOfGetter(e=["structuredQuery"]),set:p.oneOfSetter(e)}),sr.create=function(e){return new sr(e)},sr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&f.google.firestore.v1.StructuredQuery.encode(e.structuredQuery,t.uint32(10).fork(),r+1).ldelim(),null!=e.aggregations&&e.aggregations.length)for(var o=0;o<e.aggregations.length;++o)f.google.firestore.v1.StructuredAggregationQuery.Aggregation.encode(e.aggregations[o],t.uint32(26).fork(),r+1).ldelim();return t},sr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},sr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredAggregationQuery;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.structuredQuery=f.google.firestore.v1.StructuredQuery.decode(e,e.uint32(),void 0,o+1);break;case 3:i.aggregations&&i.aggregations.length||(i.aggregations=[]),i.aggregations.push(f.google.firestore.v1.StructuredAggregationQuery.Aggregation.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},sr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},sr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&(r=f.google.firestore.v1.StructuredQuery.verify(e.structuredQuery,t+1)))return"structuredQuery."+r;if(null!=e.aggregations&&Object.hasOwnProperty.call(e,"aggregations")){if(!Array.isArray(e.aggregations))return"aggregations: array expected";for(var r,o=0;o<e.aggregations.length;++o)if(r=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.verify(e.aggregations[o],t+1))return"aggregations."+r}return null},sr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredAggregationQuery)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredAggregationQuery: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.StructuredAggregationQuery;if(null!=e.structuredQuery){if(!p.isObject(e.structuredQuery))throw TypeError(".google.firestore.v1.StructuredAggregationQuery.structuredQuery: object expected");r.structuredQuery=f.google.firestore.v1.StructuredQuery.fromObject(e.structuredQuery,t+1)}if(e.aggregations){if(!Array.isArray(e.aggregations))throw TypeError(".google.firestore.v1.StructuredAggregationQuery.aggregations: array expected");r.aggregations=[];for(var o=0;o<e.aggregations.length;++o){if(!p.isObject(e.aggregations[o]))throw TypeError(".google.firestore.v1.StructuredAggregationQuery.aggregations: object expected");r.aggregations[o]=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.fromObject(e.aggregations[o],t+1)}}return r},sr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.aggregations=[]),null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&(o.structuredQuery=f.google.firestore.v1.StructuredQuery.toObject(e.structuredQuery,t,r+1),t.oneofs)&&(o.queryType="structuredQuery"),e.aggregations&&e.aggregations.length){o.aggregations=[];for(var n=0;n<e.aggregations.length;++n)o.aggregations[n]=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.toObject(e.aggregations[n],t,r+1)}return o},sr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},sr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredAggregationQuery"},sr.Aggregation=(lr.prototype.count=null,lr.prototype.sum=null,lr.prototype.avg=null,lr.prototype.alias="",Object.defineProperty(lr.prototype,"operator",{get:p.oneOfGetter(e=["count","sum","avg"]),set:p.oneOfSetter(e)}),lr.create=function(e){return new lr(e)},lr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.count&&Object.hasOwnProperty.call(e,"count")&&f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.encode(e.count,t.uint32(10).fork(),r+1).ldelim(),null!=e.sum&&Object.hasOwnProperty.call(e,"sum")&&f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.encode(e.sum,t.uint32(18).fork(),r+1).ldelim(),null!=e.avg&&Object.hasOwnProperty.call(e,"avg")&&f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.encode(e.avg,t.uint32(26).fork(),r+1).ldelim(),null!=e.alias&&Object.hasOwnProperty.call(e,"alias")&&t.uint32(58).string(e.alias),t},lr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},lr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredAggregationQuery.Aggregation;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.count=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.decode(e,e.uint32(),void 0,o+1);break;case 2:i.sum=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.decode(e,e.uint32(),void 0,o+1);break;case 3:i.avg=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.decode(e,e.uint32(),void 0,o+1);break;case 7:i.alias=e.string();break;default:e.skipType(7&a,o)}}return i},lr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},lr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.count&&Object.hasOwnProperty.call(e,"count")&&(r=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.verify(e.count,t+(o.operator=1))))return"count."+r;if(null!=e.sum&&Object.hasOwnProperty.call(e,"sum")){if(1===o.operator)return"operator: multiple values";if(r=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.verify(e.sum,t+(o.operator=1)))return"sum."+r}if(null!=e.avg&&Object.hasOwnProperty.call(e,"avg")){if(1===o.operator)return"operator: multiple values";if(r=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.verify(e.avg,t+(o.operator=1)))return"avg."+r}return null!=e.alias&&Object.hasOwnProperty.call(e,"alias")&&!p.isString(e.alias)?"alias: string expected":null},lr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredAggregationQuery.Aggregation)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.StructuredAggregationQuery.Aggregation;if(null!=e.count){if(!p.isObject(e.count))throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.count: object expected");r.count=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.fromObject(e.count,t+1)}if(null!=e.sum){if(!p.isObject(e.sum))throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.sum: object expected");r.sum=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.fromObject(e.sum,t+1)}if(null!=e.avg){if(!p.isObject(e.avg))throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.avg: object expected");r.avg=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.fromObject(e.avg,t+1)}return null!=e.alias&&(r.alias=String(e.alias)),r},lr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.alias=""),null!=e.count&&Object.hasOwnProperty.call(e,"count")&&(o.count=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.toObject(e.count,t,r+1),t.oneofs)&&(o.operator="count"),null!=e.sum&&Object.hasOwnProperty.call(e,"sum")&&(o.sum=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.toObject(e.sum,t,r+1),t.oneofs)&&(o.operator="sum"),null!=e.avg&&Object.hasOwnProperty.call(e,"avg")&&(o.avg=f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.toObject(e.avg,t,r+1),t.oneofs)&&(o.operator="avg"),null!=e.alias&&Object.hasOwnProperty.call(e,"alias")&&(o.alias=e.alias),o},lr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},lr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredAggregationQuery.Aggregation"},lr.Count=(cr.prototype.upTo=null,cr.create=function(e){return new cr(e)},cr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.upTo&&Object.hasOwnProperty.call(e,"upTo")&&f.google.protobuf.Int64Value.encode(e.upTo,t.uint32(10).fork(),r+1).ldelim(),t},cr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},cr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.upTo=f.google.protobuf.Int64Value.decode(e,e.uint32(),void 0,o+1):e.skipType(7&a,o)}return i},cr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},cr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.upTo&&Object.hasOwnProperty.call(e,"upTo")){e=f.google.protobuf.Int64Value.verify(e.upTo,t+1);if(e)return"upTo."+e}return null},cr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.Count: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Count;if(null!=e.upTo){if(!p.isObject(e.upTo))throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.Count.upTo: object expected");r.upTo=f.google.protobuf.Int64Value.fromObject(e.upTo,t+1)}return r},cr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.upTo=null),null!=e.upTo&&Object.hasOwnProperty.call(e,"upTo")&&(o.upTo=f.google.protobuf.Int64Value.toObject(e.upTo,t,r+1)),o},cr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},cr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredAggregationQuery.Aggregation.Count"},cr),lr.Sum=(ur.prototype.field=null,ur.create=function(e){return new ur(e)},ur.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.field&&Object.hasOwnProperty.call(e,"field")&&f.google.firestore.v1.StructuredQuery.FieldReference.encode(e.field,t.uint32(10).fork(),r+1).ldelim(),t},ur.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ur.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.field=f.google.firestore.v1.StructuredQuery.FieldReference.decode(e,e.uint32(),void 0,o+1):e.skipType(7&a,o)}return i},ur.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ur.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.field&&Object.hasOwnProperty.call(e,"field")){e=f.google.firestore.v1.StructuredQuery.FieldReference.verify(e.field,t+1);if(e)return"field."+e}return null},ur.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum;if(null!=e.field){if(!p.isObject(e.field))throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum.field: object expected");r.field=f.google.firestore.v1.StructuredQuery.FieldReference.fromObject(e.field,t+1)}return r},ur.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.field=null),null!=e.field&&Object.hasOwnProperty.call(e,"field")&&(o.field=f.google.firestore.v1.StructuredQuery.FieldReference.toObject(e.field,t,r+1)),o},ur.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ur.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredAggregationQuery.Aggregation.Sum"},ur),lr.Avg=(dr.prototype.field=null,dr.create=function(e){return new dr(e)},dr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.field&&Object.hasOwnProperty.call(e,"field")&&f.google.firestore.v1.StructuredQuery.FieldReference.encode(e.field,t.uint32(10).fork(),r+1).ldelim(),t},dr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},dr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.field=f.google.firestore.v1.StructuredQuery.FieldReference.decode(e,e.uint32(),void 0,o+1):e.skipType(7&a,o)}return i},dr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},dr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.field&&Object.hasOwnProperty.call(e,"field")){e=f.google.firestore.v1.StructuredQuery.FieldReference.verify(e.field,t+1);if(e)return"field."+e}return null},dr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg;if(null!=e.field){if(!p.isObject(e.field))throw TypeError(".google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg.field: object expected");r.field=f.google.firestore.v1.StructuredQuery.FieldReference.fromObject(e.field,t+1)}return r},dr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.field=null),null!=e.field&&Object.hasOwnProperty.call(e,"field")&&(o.field=f.google.firestore.v1.StructuredQuery.FieldReference.toObject(e.field,t,r+1)),o},dr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},dr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.StructuredAggregationQuery.Aggregation.Avg"},dr),lr),sr),i.Cursor=(pr.prototype.values=p.emptyArray,pr.prototype.before=!1,pr.create=function(e){return new pr(e)},pr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.values&&e.values.length)for(var o=0;o<e.values.length;++o)f.google.firestore.v1.Value.encode(e.values[o],t.uint32(10).fork(),r+1).ldelim();return null!=e.before&&Object.hasOwnProperty.call(e,"before")&&t.uint32(16).bool(e.before),t},pr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},pr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.Cursor;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.values&&i.values.length||(i.values=[]),i.values.push(f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1));break;case 2:i.before=e.bool();break;default:e.skipType(7&a,o)}}return i},pr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},pr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.values&&Object.hasOwnProperty.call(e,"values")){if(!Array.isArray(e.values))return"values: array expected";for(var r=0;r<e.values.length;++r){var o=f.google.firestore.v1.Value.verify(e.values[r],t+1);if(o)return"values."+o}}return null!=e.before&&Object.hasOwnProperty.call(e,"before")&&"boolean"!=typeof e.before?"before: boolean expected":null},pr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.Cursor)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.Cursor: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.Cursor;if(e.values){if(!Array.isArray(e.values))throw TypeError(".google.firestore.v1.Cursor.values: array expected");r.values=[];for(var o=0;o<e.values.length;++o){if(!p.isObject(e.values[o]))throw TypeError(".google.firestore.v1.Cursor.values: object expected");r.values[o]=f.google.firestore.v1.Value.fromObject(e.values[o],t+1)}}return null!=e.before&&(r.before=Boolean(e.before)),r},pr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.values=[]),t.defaults&&(o.before=!1),e.values&&e.values.length){o.values=[];for(var n=0;n<e.values.length;++n)o.values[n]=f.google.firestore.v1.Value.toObject(e.values[n],t,r+1)}return null!=e.before&&Object.hasOwnProperty.call(e,"before")&&(o.before=e.before),o},pr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},pr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.Cursor"},pr),i.ExplainOptions=(fr.prototype.analyze=!1,fr.create=function(e){return new fr(e)},fr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.analyze&&Object.hasOwnProperty.call(e,"analyze")&&t.uint32(8).bool(e.analyze),t},fr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},fr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.ExplainOptions;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.analyze=e.bool():e.skipType(7&a,o)}return i},fr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},fr.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.analyze&&Object.hasOwnProperty.call(e,"analyze")&&"boolean"!=typeof e.analyze?"analyze: boolean expected":null},fr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.ExplainOptions)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.ExplainOptions: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.v1.ExplainOptions;return null!=e.analyze&&(t.analyze=Boolean(e.analyze)),t},fr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.analyze=!1),null!=e.analyze&&Object.hasOwnProperty.call(e,"analyze")&&(r.analyze=e.analyze),r},fr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},fr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ExplainOptions"},fr),i.ExplainMetrics=(gr.prototype.planSummary=null,gr.prototype.executionStats=null,gr.create=function(e){return new gr(e)},gr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.planSummary&&Object.hasOwnProperty.call(e,"planSummary")&&f.google.firestore.v1.PlanSummary.encode(e.planSummary,t.uint32(10).fork(),r+1).ldelim(),null!=e.executionStats&&Object.hasOwnProperty.call(e,"executionStats")&&f.google.firestore.v1.ExecutionStats.encode(e.executionStats,t.uint32(18).fork(),r+1).ldelim(),t},gr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},gr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.ExplainMetrics;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.planSummary=f.google.firestore.v1.PlanSummary.decode(e,e.uint32(),void 0,o+1);break;case 2:i.executionStats=f.google.firestore.v1.ExecutionStats.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},gr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},gr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.planSummary&&Object.hasOwnProperty.call(e,"planSummary")&&(r=f.google.firestore.v1.PlanSummary.verify(e.planSummary,t+1)))return"planSummary."+r;if(null!=e.executionStats&&Object.hasOwnProperty.call(e,"executionStats")&&(r=f.google.firestore.v1.ExecutionStats.verify(e.executionStats,t+1)))return"executionStats."+r;return null},gr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.ExplainMetrics)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.ExplainMetrics: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.ExplainMetrics;if(null!=e.planSummary){if(!p.isObject(e.planSummary))throw TypeError(".google.firestore.v1.ExplainMetrics.planSummary: object expected");r.planSummary=f.google.firestore.v1.PlanSummary.fromObject(e.planSummary,t+1)}if(null!=e.executionStats){if(!p.isObject(e.executionStats))throw TypeError(".google.firestore.v1.ExplainMetrics.executionStats: object expected");r.executionStats=f.google.firestore.v1.ExecutionStats.fromObject(e.executionStats,t+1)}return r},gr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.planSummary=null,o.executionStats=null),null!=e.planSummary&&Object.hasOwnProperty.call(e,"planSummary")&&(o.planSummary=f.google.firestore.v1.PlanSummary.toObject(e.planSummary,t,r+1)),null!=e.executionStats&&Object.hasOwnProperty.call(e,"executionStats")&&(o.executionStats=f.google.firestore.v1.ExecutionStats.toObject(e.executionStats,t,r+1)),o},gr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},gr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ExplainMetrics"},gr),i.PlanSummary=(mr.prototype.indexesUsed=p.emptyArray,mr.create=function(e){return new mr(e)},mr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.indexesUsed&&e.indexesUsed.length)for(var o=0;o<e.indexesUsed.length;++o)f.google.protobuf.Struct.encode(e.indexesUsed[o],t.uint32(10).fork(),r+1).ldelim();return t},mr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},mr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.PlanSummary;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?(i.indexesUsed&&i.indexesUsed.length||(i.indexesUsed=[]),i.indexesUsed.push(f.google.protobuf.Struct.decode(e,e.uint32(),void 0,o+1))):e.skipType(7&a,o)}return i},mr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},mr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.indexesUsed&&Object.hasOwnProperty.call(e,"indexesUsed")){if(!Array.isArray(e.indexesUsed))return"indexesUsed: array expected";for(var r=0;r<e.indexesUsed.length;++r){var o=f.google.protobuf.Struct.verify(e.indexesUsed[r],t+1);if(o)return"indexesUsed."+o}}return null},mr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.PlanSummary)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.PlanSummary: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.PlanSummary;if(e.indexesUsed){if(!Array.isArray(e.indexesUsed))throw TypeError(".google.firestore.v1.PlanSummary.indexesUsed: array expected");r.indexesUsed=[];for(var o=0;o<e.indexesUsed.length;++o){if(!p.isObject(e.indexesUsed[o]))throw TypeError(".google.firestore.v1.PlanSummary.indexesUsed: object expected");r.indexesUsed[o]=f.google.protobuf.Struct.fromObject(e.indexesUsed[o],t+1)}}return r},mr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.indexesUsed=[]),e.indexesUsed&&e.indexesUsed.length){o.indexesUsed=[];for(var n=0;n<e.indexesUsed.length;++n)o.indexesUsed[n]=f.google.protobuf.Struct.toObject(e.indexesUsed[n],t,r+1)}return o},mr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},mr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.PlanSummary"},mr),i.ExecutionStats=(br.prototype.resultsReturned=p.Long?p.Long.fromBits(0,0,!1):0,br.prototype.executionDuration=null,br.prototype.readOperations=p.Long?p.Long.fromBits(0,0,!1):0,br.prototype.debugStats=null,br.create=function(e){return new br(e)},br.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.resultsReturned&&Object.hasOwnProperty.call(e,"resultsReturned")&&t.uint32(8).int64(e.resultsReturned),null!=e.executionDuration&&Object.hasOwnProperty.call(e,"executionDuration")&&f.google.protobuf.Duration.encode(e.executionDuration,t.uint32(26).fork(),r+1).ldelim(),null!=e.readOperations&&Object.hasOwnProperty.call(e,"readOperations")&&t.uint32(32).int64(e.readOperations),null!=e.debugStats&&Object.hasOwnProperty.call(e,"debugStats")&&f.google.protobuf.Struct.encode(e.debugStats,t.uint32(42).fork(),r+1).ldelim(),t},br.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},br.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.ExecutionStats;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.resultsReturned=e.int64();break;case 3:i.executionDuration=f.google.protobuf.Duration.decode(e,e.uint32(),void 0,o+1);break;case 4:i.readOperations=e.int64();break;case 5:i.debugStats=f.google.protobuf.Struct.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},br.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},br.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.resultsReturned&&Object.hasOwnProperty.call(e,"resultsReturned")&&!(p.isInteger(e.resultsReturned)||e.resultsReturned&&p.isInteger(e.resultsReturned.low)&&p.isInteger(e.resultsReturned.high)))return"resultsReturned: integer|Long expected";var r;if(null!=e.executionDuration&&Object.hasOwnProperty.call(e,"executionDuration")&&(r=f.google.protobuf.Duration.verify(e.executionDuration,t+1)))return"executionDuration."+r;if(null!=e.readOperations&&Object.hasOwnProperty.call(e,"readOperations")&&!(p.isInteger(e.readOperations)||e.readOperations&&p.isInteger(e.readOperations.low)&&p.isInteger(e.readOperations.high)))return"readOperations: integer|Long expected";if(null!=e.debugStats&&Object.hasOwnProperty.call(e,"debugStats")&&(r=f.google.protobuf.Struct.verify(e.debugStats,t+1)))return"debugStats."+r;return null},br.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.ExecutionStats)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.ExecutionStats: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.ExecutionStats;if(null!=e.resultsReturned&&(p.Long?r.resultsReturned=p.Long.fromValue(e.resultsReturned,!1):"string"==typeof e.resultsReturned?r.resultsReturned=parseInt(e.resultsReturned,10):"number"==typeof e.resultsReturned?r.resultsReturned=e.resultsReturned:"object"==typeof e.resultsReturned&&(r.resultsReturned=new p.LongBits(e.resultsReturned.low>>>0,e.resultsReturned.high>>>0).toNumber())),null!=e.executionDuration){if(!p.isObject(e.executionDuration))throw TypeError(".google.firestore.v1.ExecutionStats.executionDuration: object expected");r.executionDuration=f.google.protobuf.Duration.fromObject(e.executionDuration,t+1)}if(null!=e.readOperations&&(p.Long?r.readOperations=p.Long.fromValue(e.readOperations,!1):"string"==typeof e.readOperations?r.readOperations=parseInt(e.readOperations,10):"number"==typeof e.readOperations?r.readOperations=e.readOperations:"object"==typeof e.readOperations&&(r.readOperations=new p.LongBits(e.readOperations.low>>>0,e.readOperations.high>>>0).toNumber())),null!=e.debugStats){if(!p.isObject(e.debugStats))throw TypeError(".google.firestore.v1.ExecutionStats.debugStats: object expected");r.debugStats=f.google.protobuf.Struct.fromObject(e.debugStats,t+1)}return r},br.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};return t.defaults&&(p.Long?(o=new p.Long(0,0,!1),n.resultsReturned=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):n.resultsReturned=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0,n.executionDuration=null,p.Long?(o=new p.Long(0,0,!1),n.readOperations=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):n.readOperations=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0,n.debugStats=null),null!=e.resultsReturned&&Object.hasOwnProperty.call(e,"resultsReturned")&&("undefined"!=typeof BigInt&&t.longs===BigInt?n.resultsReturned="number"==typeof e.resultsReturned?BigInt(e.resultsReturned):p.Long.fromBits(e.resultsReturned.low>>>0,e.resultsReturned.high>>>0,!1).toBigInt():"number"==typeof e.resultsReturned?n.resultsReturned=t.longs===String?String(e.resultsReturned):e.resultsReturned:n.resultsReturned=t.longs===String?p.Long.prototype.toString.call(e.resultsReturned):t.longs===Number?new p.LongBits(e.resultsReturned.low>>>0,e.resultsReturned.high>>>0).toNumber():e.resultsReturned),null!=e.executionDuration&&Object.hasOwnProperty.call(e,"executionDuration")&&(n.executionDuration=f.google.protobuf.Duration.toObject(e.executionDuration,t,r+1)),null!=e.readOperations&&Object.hasOwnProperty.call(e,"readOperations")&&("undefined"!=typeof BigInt&&t.longs===BigInt?n.readOperations="number"==typeof e.readOperations?BigInt(e.readOperations):p.Long.fromBits(e.readOperations.low>>>0,e.readOperations.high>>>0,!1).toBigInt():"number"==typeof e.readOperations?n.readOperations=t.longs===String?String(e.readOperations):e.readOperations:n.readOperations=t.longs===String?p.Long.prototype.toString.call(e.readOperations):t.longs===Number?new p.LongBits(e.readOperations.low>>>0,e.readOperations.high>>>0).toNumber():e.readOperations),null!=e.debugStats&&Object.hasOwnProperty.call(e,"debugStats")&&(n.debugStats=f.google.protobuf.Struct.toObject(e.debugStats,t,r+1)),n},br.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},br.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ExecutionStats"},br),i.Write=(yr.prototype.update=null,yr.prototype.delete=null,yr.prototype.transform=null,yr.prototype.updateMask=null,yr.prototype.updateTransforms=p.emptyArray,yr.prototype.currentDocument=null,Object.defineProperty(yr.prototype,"operation",{get:p.oneOfGetter(t=["update","delete","transform"]),set:p.oneOfSetter(t)}),yr.create=function(e){return new yr(e)},yr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.update&&Object.hasOwnProperty.call(e,"update")&&f.google.firestore.v1.Document.encode(e.update,t.uint32(10).fork(),r+1).ldelim(),null!=e.delete&&Object.hasOwnProperty.call(e,"delete")&&t.uint32(18).string(e.delete),null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&f.google.firestore.v1.DocumentMask.encode(e.updateMask,t.uint32(26).fork(),r+1).ldelim(),null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&f.google.firestore.v1.Precondition.encode(e.currentDocument,t.uint32(34).fork(),r+1).ldelim(),null!=e.transform&&Object.hasOwnProperty.call(e,"transform")&&f.google.firestore.v1.DocumentTransform.encode(e.transform,t.uint32(50).fork(),r+1).ldelim(),null!=e.updateTransforms&&e.updateTransforms.length)for(var o=0;o<e.updateTransforms.length;++o)f.google.firestore.v1.DocumentTransform.FieldTransform.encode(e.updateTransforms[o],t.uint32(58).fork(),r+1).ldelim();return t},yr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},yr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.Write;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.update=f.google.firestore.v1.Document.decode(e,e.uint32(),void 0,o+1);break;case 2:i.delete=e.string();break;case 6:i.transform=f.google.firestore.v1.DocumentTransform.decode(e,e.uint32(),void 0,o+1);break;case 3:i.updateMask=f.google.firestore.v1.DocumentMask.decode(e,e.uint32(),void 0,o+1);break;case 7:i.updateTransforms&&i.updateTransforms.length||(i.updateTransforms=[]),i.updateTransforms.push(f.google.firestore.v1.DocumentTransform.FieldTransform.decode(e,e.uint32(),void 0,o+1));break;case 4:i.currentDocument=f.google.firestore.v1.Precondition.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},yr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},yr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r={};if(null!=e.update&&Object.hasOwnProperty.call(e,"update")&&(o=f.google.firestore.v1.Document.verify(e.update,t+(r.operation=1))))return"update."+o;if(null!=e.delete&&Object.hasOwnProperty.call(e,"delete")){if(1===r.operation)return"operation: multiple values";if(r.operation=1,!p.isString(e.delete))return"delete: string expected"}if(null!=e.transform&&Object.hasOwnProperty.call(e,"transform")){if(1===r.operation)return"operation: multiple values";if(o=f.google.firestore.v1.DocumentTransform.verify(e.transform,t+(r.operation=1)))return"transform."+o}if(null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&(o=f.google.firestore.v1.DocumentMask.verify(e.updateMask,t+1)))return"updateMask."+o;if(null!=e.updateTransforms&&Object.hasOwnProperty.call(e,"updateTransforms")){if(!Array.isArray(e.updateTransforms))return"updateTransforms: array expected";for(var o,n=0;n<e.updateTransforms.length;++n)if(o=f.google.firestore.v1.DocumentTransform.FieldTransform.verify(e.updateTransforms[n],t+1))return"updateTransforms."+o}if(null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&(o=f.google.firestore.v1.Precondition.verify(e.currentDocument,t+1)))return"currentDocument."+o;return null},yr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.Write)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.Write: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.Write;if(null!=e.update){if(!p.isObject(e.update))throw TypeError(".google.firestore.v1.Write.update: object expected");r.update=f.google.firestore.v1.Document.fromObject(e.update,t+1)}if(null!=e.delete&&(r.delete=String(e.delete)),null!=e.transform){if(!p.isObject(e.transform))throw TypeError(".google.firestore.v1.Write.transform: object expected");r.transform=f.google.firestore.v1.DocumentTransform.fromObject(e.transform,t+1)}if(null!=e.updateMask){if(!p.isObject(e.updateMask))throw TypeError(".google.firestore.v1.Write.updateMask: object expected");r.updateMask=f.google.firestore.v1.DocumentMask.fromObject(e.updateMask,t+1)}if(e.updateTransforms){if(!Array.isArray(e.updateTransforms))throw TypeError(".google.firestore.v1.Write.updateTransforms: array expected");r.updateTransforms=[];for(var o=0;o<e.updateTransforms.length;++o){if(!p.isObject(e.updateTransforms[o]))throw TypeError(".google.firestore.v1.Write.updateTransforms: object expected");r.updateTransforms[o]=f.google.firestore.v1.DocumentTransform.FieldTransform.fromObject(e.updateTransforms[o],t+1)}}if(null!=e.currentDocument){if(!p.isObject(e.currentDocument))throw TypeError(".google.firestore.v1.Write.currentDocument: object expected");r.currentDocument=f.google.firestore.v1.Precondition.fromObject(e.currentDocument,t+1)}return r},yr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.updateTransforms=[]),t.defaults&&(o.updateMask=null,o.currentDocument=null),null!=e.update&&Object.hasOwnProperty.call(e,"update")&&(o.update=f.google.firestore.v1.Document.toObject(e.update,t,r+1),t.oneofs)&&(o.operation="update"),null!=e.delete&&Object.hasOwnProperty.call(e,"delete")&&(o.delete=e.delete,t.oneofs)&&(o.operation="delete"),null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&(o.updateMask=f.google.firestore.v1.DocumentMask.toObject(e.updateMask,t,r+1)),null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&(o.currentDocument=f.google.firestore.v1.Precondition.toObject(e.currentDocument,t,r+1)),null!=e.transform&&Object.hasOwnProperty.call(e,"transform")&&(o.transform=f.google.firestore.v1.DocumentTransform.toObject(e.transform,t,r+1),t.oneofs)&&(o.operation="transform"),e.updateTransforms&&e.updateTransforms.length){o.updateTransforms=[];for(var n=0;n<e.updateTransforms.length;++n)o.updateTransforms[n]=f.google.firestore.v1.DocumentTransform.FieldTransform.toObject(e.updateTransforms[n],t,r+1)}return o},yr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},yr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.Write"},yr),i.DocumentTransform=(hr.prototype.document="",hr.prototype.fieldTransforms=p.emptyArray,hr.create=function(e){return new hr(e)},hr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&t.uint32(10).string(e.document),null!=e.fieldTransforms&&e.fieldTransforms.length)for(var o=0;o<e.fieldTransforms.length;++o)f.google.firestore.v1.DocumentTransform.FieldTransform.encode(e.fieldTransforms[o],t.uint32(18).fork(),r+1).ldelim();return t},hr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},hr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.DocumentTransform;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.document=e.string();break;case 2:i.fieldTransforms&&i.fieldTransforms.length||(i.fieldTransforms=[]),i.fieldTransforms.push(f.google.firestore.v1.DocumentTransform.FieldTransform.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},hr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},hr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&!p.isString(e.document))return"document: string expected";if(null!=e.fieldTransforms&&Object.hasOwnProperty.call(e,"fieldTransforms")){if(!Array.isArray(e.fieldTransforms))return"fieldTransforms: array expected";for(var r=0;r<e.fieldTransforms.length;++r){var o=f.google.firestore.v1.DocumentTransform.FieldTransform.verify(e.fieldTransforms[r],t+1);if(o)return"fieldTransforms."+o}}return null},hr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.DocumentTransform)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.DocumentTransform: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.DocumentTransform;if(null!=e.document&&(r.document=String(e.document)),e.fieldTransforms){if(!Array.isArray(e.fieldTransforms))throw TypeError(".google.firestore.v1.DocumentTransform.fieldTransforms: array expected");r.fieldTransforms=[];for(var o=0;o<e.fieldTransforms.length;++o){if(!p.isObject(e.fieldTransforms[o]))throw TypeError(".google.firestore.v1.DocumentTransform.fieldTransforms: object expected");r.fieldTransforms[o]=f.google.firestore.v1.DocumentTransform.FieldTransform.fromObject(e.fieldTransforms[o],t+1)}}return r},hr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.fieldTransforms=[]),t.defaults&&(o.document=""),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(o.document=e.document),e.fieldTransforms&&e.fieldTransforms.length){o.fieldTransforms=[];for(var n=0;n<e.fieldTransforms.length;++n)o.fieldTransforms[n]=f.google.firestore.v1.DocumentTransform.FieldTransform.toObject(e.fieldTransforms[n],t,r+1)}return o},hr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},hr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.DocumentTransform"},hr.FieldTransform=(w.prototype.fieldPath="",w.prototype.setToServerValue=null,w.prototype.increment=null,w.prototype.maximum=null,w.prototype.minimum=null,w.prototype.appendMissingElements=null,w.prototype.removeAllFromArray=null,Object.defineProperty(w.prototype,"transformType",{get:p.oneOfGetter(e=["setToServerValue","increment","maximum","minimum","appendMissingElements","removeAllFromArray"]),set:p.oneOfSetter(e)}),w.create=function(e){return new w(e)},w.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&t.uint32(10).string(e.fieldPath),null!=e.setToServerValue&&Object.hasOwnProperty.call(e,"setToServerValue")&&t.uint32(16).int32(e.setToServerValue),null!=e.increment&&Object.hasOwnProperty.call(e,"increment")&&f.google.firestore.v1.Value.encode(e.increment,t.uint32(26).fork(),r+1).ldelim(),null!=e.maximum&&Object.hasOwnProperty.call(e,"maximum")&&f.google.firestore.v1.Value.encode(e.maximum,t.uint32(34).fork(),r+1).ldelim(),null!=e.minimum&&Object.hasOwnProperty.call(e,"minimum")&&f.google.firestore.v1.Value.encode(e.minimum,t.uint32(42).fork(),r+1).ldelim(),null!=e.appendMissingElements&&Object.hasOwnProperty.call(e,"appendMissingElements")&&f.google.firestore.v1.ArrayValue.encode(e.appendMissingElements,t.uint32(50).fork(),r+1).ldelim(),null!=e.removeAllFromArray&&Object.hasOwnProperty.call(e,"removeAllFromArray")&&f.google.firestore.v1.ArrayValue.encode(e.removeAllFromArray,t.uint32(58).fork(),r+1).ldelim(),t},w.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},w.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.DocumentTransform.FieldTransform;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.fieldPath=e.string();break;case 2:i.setToServerValue=e.int32();break;case 3:i.increment=f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1);break;case 4:i.maximum=f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1);break;case 5:i.minimum=f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1);break;case 6:i.appendMissingElements=f.google.firestore.v1.ArrayValue.decode(e,e.uint32(),void 0,o+1);break;case 7:i.removeAllFromArray=f.google.firestore.v1.ArrayValue.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},w.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},w.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&!p.isString(e.fieldPath))return"fieldPath: string expected";if(null!=e.setToServerValue&&Object.hasOwnProperty.call(e,"setToServerValue"))switch(o.transformType=1,e.setToServerValue){default:return"setToServerValue: enum value expected";case 0:case 1:}if(null!=e.increment&&Object.hasOwnProperty.call(e,"increment")){if(1===o.transformType)return"transformType: multiple values";if(r=f.google.firestore.v1.Value.verify(e.increment,t+(o.transformType=1)))return"increment."+r}if(null!=e.maximum&&Object.hasOwnProperty.call(e,"maximum")){if(1===o.transformType)return"transformType: multiple values";if(r=f.google.firestore.v1.Value.verify(e.maximum,t+(o.transformType=1)))return"maximum."+r}if(null!=e.minimum&&Object.hasOwnProperty.call(e,"minimum")){if(1===o.transformType)return"transformType: multiple values";if(r=f.google.firestore.v1.Value.verify(e.minimum,t+(o.transformType=1)))return"minimum."+r}if(null!=e.appendMissingElements&&Object.hasOwnProperty.call(e,"appendMissingElements")){if(1===o.transformType)return"transformType: multiple values";if(r=f.google.firestore.v1.ArrayValue.verify(e.appendMissingElements,t+(o.transformType=1)))return"appendMissingElements."+r}if(null!=e.removeAllFromArray&&Object.hasOwnProperty.call(e,"removeAllFromArray")){if(1===o.transformType)return"transformType: multiple values";if(r=f.google.firestore.v1.ArrayValue.verify(e.removeAllFromArray,t+(o.transformType=1)))return"removeAllFromArray."+r}return null},w.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.DocumentTransform.FieldTransform)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.DocumentTransform.FieldTransform: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.DocumentTransform.FieldTransform;switch(null!=e.fieldPath&&(r.fieldPath=String(e.fieldPath)),e.setToServerValue){default:"number"==typeof e.setToServerValue&&(r.setToServerValue=e.setToServerValue);break;case"SERVER_VALUE_UNSPECIFIED":case 0:r.setToServerValue=0;break;case"REQUEST_TIME":case 1:r.setToServerValue=1}if(null!=e.increment){if(!p.isObject(e.increment))throw TypeError(".google.firestore.v1.DocumentTransform.FieldTransform.increment: object expected");r.increment=f.google.firestore.v1.Value.fromObject(e.increment,t+1)}if(null!=e.maximum){if(!p.isObject(e.maximum))throw TypeError(".google.firestore.v1.DocumentTransform.FieldTransform.maximum: object expected");r.maximum=f.google.firestore.v1.Value.fromObject(e.maximum,t+1)}if(null!=e.minimum){if(!p.isObject(e.minimum))throw TypeError(".google.firestore.v1.DocumentTransform.FieldTransform.minimum: object expected");r.minimum=f.google.firestore.v1.Value.fromObject(e.minimum,t+1)}if(null!=e.appendMissingElements){if(!p.isObject(e.appendMissingElements))throw TypeError(".google.firestore.v1.DocumentTransform.FieldTransform.appendMissingElements: object expected");r.appendMissingElements=f.google.firestore.v1.ArrayValue.fromObject(e.appendMissingElements,t+1)}if(null!=e.removeAllFromArray){if(!p.isObject(e.removeAllFromArray))throw TypeError(".google.firestore.v1.DocumentTransform.FieldTransform.removeAllFromArray: object expected");r.removeAllFromArray=f.google.firestore.v1.ArrayValue.fromObject(e.removeAllFromArray,t+1)}return r},w.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.fieldPath=""),null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&(o.fieldPath=e.fieldPath),null!=e.setToServerValue&&Object.hasOwnProperty.call(e,"setToServerValue")&&(o.setToServerValue=t.enums!==String||void 0===f.google.firestore.v1.DocumentTransform.FieldTransform.ServerValue[e.setToServerValue]?e.setToServerValue:f.google.firestore.v1.DocumentTransform.FieldTransform.ServerValue[e.setToServerValue],t.oneofs)&&(o.transformType="setToServerValue"),null!=e.increment&&Object.hasOwnProperty.call(e,"increment")&&(o.increment=f.google.firestore.v1.Value.toObject(e.increment,t,r+1),t.oneofs)&&(o.transformType="increment"),null!=e.maximum&&Object.hasOwnProperty.call(e,"maximum")&&(o.maximum=f.google.firestore.v1.Value.toObject(e.maximum,t,r+1),t.oneofs)&&(o.transformType="maximum"),null!=e.minimum&&Object.hasOwnProperty.call(e,"minimum")&&(o.minimum=f.google.firestore.v1.Value.toObject(e.minimum,t,r+1),t.oneofs)&&(o.transformType="minimum"),null!=e.appendMissingElements&&Object.hasOwnProperty.call(e,"appendMissingElements")&&(o.appendMissingElements=f.google.firestore.v1.ArrayValue.toObject(e.appendMissingElements,t,r+1),t.oneofs)&&(o.transformType="appendMissingElements"),null!=e.removeAllFromArray&&Object.hasOwnProperty.call(e,"removeAllFromArray")&&(o.removeAllFromArray=f.google.firestore.v1.ArrayValue.toObject(e.removeAllFromArray,t,r+1),t.oneofs)&&(o.transformType="removeAllFromArray"),o},w.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},w.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.DocumentTransform.FieldTransform"},w.ServerValue=(e={},(t=Object.create(e))[e[0]="SERVER_VALUE_UNSPECIFIED"]=0,t[e[1]="REQUEST_TIME"]=1,t),w),hr),i.WriteResult=(Or.prototype.updateTime=null,Or.prototype.transformResults=p.emptyArray,Or.create=function(e){return new Or(e)},Or.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&f.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(10).fork(),r+1).ldelim(),null!=e.transformResults&&e.transformResults.length)for(var o=0;o<e.transformResults.length;++o)f.google.firestore.v1.Value.encode(e.transformResults[o],t.uint32(18).fork(),r+1).ldelim();return t},Or.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Or.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.WriteResult;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.updateTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 2:i.transformResults&&i.transformResults.length||(i.transformResults=[]),i.transformResults.push(f.google.firestore.v1.Value.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},Or.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Or.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(r=f.google.protobuf.Timestamp.verify(e.updateTime,t+1)))return"updateTime."+r;if(null!=e.transformResults&&Object.hasOwnProperty.call(e,"transformResults")){if(!Array.isArray(e.transformResults))return"transformResults: array expected";for(var r,o=0;o<e.transformResults.length;++o)if(r=f.google.firestore.v1.Value.verify(e.transformResults[o],t+1))return"transformResults."+r}return null},Or.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.WriteResult)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.WriteResult: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.WriteResult;if(null!=e.updateTime){if(!p.isObject(e.updateTime))throw TypeError(".google.firestore.v1.WriteResult.updateTime: object expected");r.updateTime=f.google.protobuf.Timestamp.fromObject(e.updateTime,t+1)}if(e.transformResults){if(!Array.isArray(e.transformResults))throw TypeError(".google.firestore.v1.WriteResult.transformResults: array expected");r.transformResults=[];for(var o=0;o<e.transformResults.length;++o){if(!p.isObject(e.transformResults[o]))throw TypeError(".google.firestore.v1.WriteResult.transformResults: object expected");r.transformResults[o]=f.google.firestore.v1.Value.fromObject(e.transformResults[o],t+1)}}return r},Or.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.transformResults=[]),t.defaults&&(o.updateTime=null),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(o.updateTime=f.google.protobuf.Timestamp.toObject(e.updateTime,t,r+1)),e.transformResults&&e.transformResults.length){o.transformResults=[];for(var n=0;n<e.transformResults.length;++n)o.transformResults[n]=f.google.firestore.v1.Value.toObject(e.transformResults[n],t,r+1)}return o},Or.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Or.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.WriteResult"},Or),i.DocumentChange=(vr.prototype.document=null,vr.prototype.targetIds=p.emptyArray,vr.prototype.removedTargetIds=p.emptyArray,vr.create=function(e){return new vr(e)},vr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&f.google.firestore.v1.Document.encode(e.document,t.uint32(10).fork(),r+1).ldelim(),null!=e.targetIds&&e.targetIds.length){t.uint32(42).fork();for(var o=0;o<e.targetIds.length;++o)t.int32(e.targetIds[o]);t.ldelim()}if(null!=e.removedTargetIds&&e.removedTargetIds.length){t.uint32(50).fork();for(o=0;o<e.removedTargetIds.length;++o)t.int32(e.removedTargetIds[o]);t.ldelim()}return t},vr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},vr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.DocumentChange;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.document=f.google.firestore.v1.Document.decode(e,e.uint32(),void 0,o+1);break;case 5:if(i.targetIds&&i.targetIds.length||(i.targetIds=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.targetIds.push(e.int32());else i.targetIds.push(e.int32());break;case 6:if(i.removedTargetIds&&i.removedTargetIds.length||(i.removedTargetIds=[]),2==(7&a))for(s=e.uint32()+e.pos;e.pos<s;)i.removedTargetIds.push(e.int32());else i.removedTargetIds.push(e.int32());break;default:e.skipType(7&a,o)}}return i},vr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},vr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.document&&Object.hasOwnProperty.call(e,"document")){t=f.google.firestore.v1.Document.verify(e.document,t+1);if(t)return"document."+t}if(null!=e.targetIds&&Object.hasOwnProperty.call(e,"targetIds")){if(!Array.isArray(e.targetIds))return"targetIds: array expected";for(var r=0;r<e.targetIds.length;++r)if(!p.isInteger(e.targetIds[r]))return"targetIds: integer[] expected"}if(null!=e.removedTargetIds&&Object.hasOwnProperty.call(e,"removedTargetIds")){if(!Array.isArray(e.removedTargetIds))return"removedTargetIds: array expected";for(r=0;r<e.removedTargetIds.length;++r)if(!p.isInteger(e.removedTargetIds[r]))return"removedTargetIds: integer[] expected"}return null},vr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.DocumentChange)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.DocumentChange: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.DocumentChange;if(null!=e.document){if(!p.isObject(e.document))throw TypeError(".google.firestore.v1.DocumentChange.document: object expected");r.document=f.google.firestore.v1.Document.fromObject(e.document,t+1)}if(e.targetIds){if(!Array.isArray(e.targetIds))throw TypeError(".google.firestore.v1.DocumentChange.targetIds: array expected");r.targetIds=[];for(var o=0;o<e.targetIds.length;++o)r.targetIds[o]=0|e.targetIds[o]}if(e.removedTargetIds){if(!Array.isArray(e.removedTargetIds))throw TypeError(".google.firestore.v1.DocumentChange.removedTargetIds: array expected");r.removedTargetIds=[];for(o=0;o<e.removedTargetIds.length;++o)r.removedTargetIds[o]=0|e.removedTargetIds[o]}return r},vr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.targetIds=[],o.removedTargetIds=[]),t.defaults&&(o.document=null),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(o.document=f.google.firestore.v1.Document.toObject(e.document,t,r+1)),e.targetIds&&e.targetIds.length){o.targetIds=[];for(var n=0;n<e.targetIds.length;++n)o.targetIds[n]=e.targetIds[n]}if(e.removedTargetIds&&e.removedTargetIds.length){o.removedTargetIds=[];for(n=0;n<e.removedTargetIds.length;++n)o.removedTargetIds[n]=e.removedTargetIds[n]}return o},vr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},vr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.DocumentChange"},vr),i.DocumentDelete=(jr.prototype.document="",jr.prototype.removedTargetIds=p.emptyArray,jr.prototype.readTime=null,jr.create=function(e){return new jr(e)},jr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&t.uint32(10).string(e.document),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(34).fork(),r+1).ldelim(),null!=e.removedTargetIds&&e.removedTargetIds.length){t.uint32(50).fork();for(var o=0;o<e.removedTargetIds.length;++o)t.int32(e.removedTargetIds[o]);t.ldelim()}return t},jr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},jr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.DocumentDelete;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.document=e.string();break;case 6:if(i.removedTargetIds&&i.removedTargetIds.length||(i.removedTargetIds=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.removedTargetIds.push(e.int32());else i.removedTargetIds.push(e.int32());break;case 4:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},jr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},jr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&!p.isString(e.document))return"document: string expected";if(null!=e.removedTargetIds&&Object.hasOwnProperty.call(e,"removedTargetIds")){if(!Array.isArray(e.removedTargetIds))return"removedTargetIds: array expected";for(var r=0;r<e.removedTargetIds.length;++r)if(!p.isInteger(e.removedTargetIds[r]))return"removedTargetIds: integer[] expected"}if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){t=f.google.protobuf.Timestamp.verify(e.readTime,t+1);if(t)return"readTime."+t}return null},jr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.DocumentDelete)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.DocumentDelete: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.DocumentDelete;if(null!=e.document&&(r.document=String(e.document)),e.removedTargetIds){if(!Array.isArray(e.removedTargetIds))throw TypeError(".google.firestore.v1.DocumentDelete.removedTargetIds: array expected");r.removedTargetIds=[];for(var o=0;o<e.removedTargetIds.length;++o)r.removedTargetIds[o]=0|e.removedTargetIds[o]}if(null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.DocumentDelete.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},jr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.removedTargetIds=[]),t.defaults&&(o.document="",o.readTime=null),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(o.document=e.document),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1)),e.removedTargetIds&&e.removedTargetIds.length){o.removedTargetIds=[];for(var n=0;n<e.removedTargetIds.length;++n)o.removedTargetIds[n]=e.removedTargetIds[n]}return o},jr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},jr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.DocumentDelete"},jr),i.DocumentRemove=(wr.prototype.document="",wr.prototype.removedTargetIds=p.emptyArray,wr.prototype.readTime=null,wr.create=function(e){return new wr(e)},wr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&t.uint32(10).string(e.document),null!=e.removedTargetIds&&e.removedTargetIds.length){t.uint32(18).fork();for(var o=0;o<e.removedTargetIds.length;++o)t.int32(e.removedTargetIds[o]);t.ldelim()}return null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(34).fork(),r+1).ldelim(),t},wr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},wr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.DocumentRemove;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.document=e.string();break;case 2:if(i.removedTargetIds&&i.removedTargetIds.length||(i.removedTargetIds=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.removedTargetIds.push(e.int32());else i.removedTargetIds.push(e.int32());break;case 4:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},wr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},wr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&!p.isString(e.document))return"document: string expected";if(null!=e.removedTargetIds&&Object.hasOwnProperty.call(e,"removedTargetIds")){if(!Array.isArray(e.removedTargetIds))return"removedTargetIds: array expected";for(var r=0;r<e.removedTargetIds.length;++r)if(!p.isInteger(e.removedTargetIds[r]))return"removedTargetIds: integer[] expected"}if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){t=f.google.protobuf.Timestamp.verify(e.readTime,t+1);if(t)return"readTime."+t}return null},wr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.DocumentRemove)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.DocumentRemove: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.DocumentRemove;if(null!=e.document&&(r.document=String(e.document)),e.removedTargetIds){if(!Array.isArray(e.removedTargetIds))throw TypeError(".google.firestore.v1.DocumentRemove.removedTargetIds: array expected");r.removedTargetIds=[];for(var o=0;o<e.removedTargetIds.length;++o)r.removedTargetIds[o]=0|e.removedTargetIds[o]}if(null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1.DocumentRemove.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},wr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.removedTargetIds=[]),t.defaults&&(o.document="",o.readTime=null),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(o.document=e.document),e.removedTargetIds&&e.removedTargetIds.length){o.removedTargetIds=[];for(var n=0;n<e.removedTargetIds.length;++n)o.removedTargetIds[n]=e.removedTargetIds[n]}return null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1)),o},wr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},wr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.DocumentRemove"},wr),i.ExistenceFilter=(xr.prototype.targetId=0,xr.prototype.count=0,xr.prototype.unchangedNames=null,xr.create=function(e){return new xr(e)},xr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.targetId&&Object.hasOwnProperty.call(e,"targetId")&&t.uint32(8).int32(e.targetId),null!=e.count&&Object.hasOwnProperty.call(e,"count")&&t.uint32(16).int32(e.count),null!=e.unchangedNames&&Object.hasOwnProperty.call(e,"unchangedNames")&&f.google.firestore.v1.BloomFilter.encode(e.unchangedNames,t.uint32(26).fork(),r+1).ldelim(),t},xr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},xr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1.ExistenceFilter;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.targetId=e.int32();break;case 2:i.count=e.int32();break;case 3:i.unchangedNames=f.google.firestore.v1.BloomFilter.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},xr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},xr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.targetId&&Object.hasOwnProperty.call(e,"targetId")&&!p.isInteger(e.targetId))return"targetId: integer expected";if(null!=e.count&&Object.hasOwnProperty.call(e,"count")&&!p.isInteger(e.count))return"count: integer expected";if(null!=e.unchangedNames&&Object.hasOwnProperty.call(e,"unchangedNames")){e=f.google.firestore.v1.BloomFilter.verify(e.unchangedNames,t+1);if(e)return"unchangedNames."+e}return null},xr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1.ExistenceFilter)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1.ExistenceFilter: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1.ExistenceFilter;if(null!=e.targetId&&(r.targetId=0|e.targetId),null!=e.count&&(r.count=0|e.count),null!=e.unchangedNames){if(!p.isObject(e.unchangedNames))throw TypeError(".google.firestore.v1.ExistenceFilter.unchangedNames: object expected");r.unchangedNames=f.google.firestore.v1.BloomFilter.fromObject(e.unchangedNames,t+1)}return r},xr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.targetId=0,o.count=0,o.unchangedNames=null),null!=e.targetId&&Object.hasOwnProperty.call(e,"targetId")&&(o.targetId=e.targetId),null!=e.count&&Object.hasOwnProperty.call(e,"count")&&(o.count=e.count),null!=e.unchangedNames&&Object.hasOwnProperty.call(e,"unchangedNames")&&(o.unchangedNames=f.google.firestore.v1.BloomFilter.toObject(e.unchangedNames,t,r+1)),o},xr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},xr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1.ExistenceFilter"},xr),i),n.v1beta1=((r={}).DocumentMask=(Tr.prototype.fieldPaths=p.emptyArray,Tr.create=function(e){return new Tr(e)},Tr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.fieldPaths&&e.fieldPaths.length)for(var o=0;o<e.fieldPaths.length;++o)t.uint32(10).string(e.fieldPaths[o]);return t},Tr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Tr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.DocumentMask;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?(i.fieldPaths&&i.fieldPaths.length||(i.fieldPaths=[]),i.fieldPaths.push(e.string())):e.skipType(7&a,o)}return i},Tr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Tr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.fieldPaths&&Object.hasOwnProperty.call(e,"fieldPaths")){if(!Array.isArray(e.fieldPaths))return"fieldPaths: array expected";for(var r=0;r<e.fieldPaths.length;++r)if(!p.isString(e.fieldPaths[r]))return"fieldPaths: string[] expected"}return null},Tr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.DocumentMask)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.DocumentMask: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.DocumentMask;if(e.fieldPaths){if(!Array.isArray(e.fieldPaths))throw TypeError(".google.firestore.v1beta1.DocumentMask.fieldPaths: array expected");r.fieldPaths=[];for(var o=0;o<e.fieldPaths.length;++o)r.fieldPaths[o]=String(e.fieldPaths[o])}return r},Tr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.fieldPaths=[]),e.fieldPaths&&e.fieldPaths.length){o.fieldPaths=[];for(var n=0;n<e.fieldPaths.length;++n)o.fieldPaths[n]=e.fieldPaths[n]}return o},Tr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Tr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.DocumentMask"},Tr),r.Precondition=(kr.prototype.exists=null,kr.prototype.updateTime=null,Object.defineProperty(kr.prototype,"conditionType",{get:p.oneOfGetter(e=["exists","updateTime"]),set:p.oneOfSetter(e)}),kr.create=function(e){return new kr(e)},kr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.exists&&Object.hasOwnProperty.call(e,"exists")&&t.uint32(8).bool(e.exists),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&f.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(18).fork(),r+1).ldelim(),t},kr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},kr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.Precondition;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.exists=e.bool();break;case 2:i.updateTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},kr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},kr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r={};if(null!=e.exists&&Object.hasOwnProperty.call(e,"exists")&&(r.conditionType=1,"boolean"!=typeof e.exists))return"exists: boolean expected";if(null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")){if(1===r.conditionType)return"conditionType: multiple values";e=f.google.protobuf.Timestamp.verify(e.updateTime,t+(r.conditionType=1));if(e)return"updateTime."+e}return null},kr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.Precondition)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.Precondition: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.Precondition;if(null!=e.exists&&(r.exists=Boolean(e.exists)),null!=e.updateTime){if(!p.isObject(e.updateTime))throw TypeError(".google.firestore.v1beta1.Precondition.updateTime: object expected");r.updateTime=f.google.protobuf.Timestamp.fromObject(e.updateTime,t+1)}return r},kr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return null!=e.exists&&Object.hasOwnProperty.call(e,"exists")&&(o.exists=e.exists,t.oneofs)&&(o.conditionType="exists"),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(o.updateTime=f.google.protobuf.Timestamp.toObject(e.updateTime,t,r+1),t.oneofs)&&(o.conditionType="updateTime"),o},kr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},kr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.Precondition"},kr),r.TransactionOptions=(Sr.prototype.readOnly=null,Sr.prototype.readWrite=null,Object.defineProperty(Sr.prototype,"mode",{get:p.oneOfGetter(e=["readOnly","readWrite"]),set:p.oneOfSetter(e)}),Sr.create=function(e){return new Sr(e)},Sr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.readOnly&&Object.hasOwnProperty.call(e,"readOnly")&&f.google.firestore.v1beta1.TransactionOptions.ReadOnly.encode(e.readOnly,t.uint32(18).fork(),r+1).ldelim(),null!=e.readWrite&&Object.hasOwnProperty.call(e,"readWrite")&&f.google.firestore.v1beta1.TransactionOptions.ReadWrite.encode(e.readWrite,t.uint32(26).fork(),r+1).ldelim(),t},Sr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Sr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.TransactionOptions;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 2:i.readOnly=f.google.firestore.v1beta1.TransactionOptions.ReadOnly.decode(e,e.uint32(),void 0,o+1);break;case 3:i.readWrite=f.google.firestore.v1beta1.TransactionOptions.ReadWrite.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Sr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Sr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.readOnly&&Object.hasOwnProperty.call(e,"readOnly")&&(r=f.google.firestore.v1beta1.TransactionOptions.ReadOnly.verify(e.readOnly,t+(o.mode=1))))return"readOnly."+r;if(null!=e.readWrite&&Object.hasOwnProperty.call(e,"readWrite")){if(1===o.mode)return"mode: multiple values";if(r=f.google.firestore.v1beta1.TransactionOptions.ReadWrite.verify(e.readWrite,t+(o.mode=1)))return"readWrite."+r}return null},Sr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.TransactionOptions)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.TransactionOptions: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.TransactionOptions;if(null!=e.readOnly){if(!p.isObject(e.readOnly))throw TypeError(".google.firestore.v1beta1.TransactionOptions.readOnly: object expected");r.readOnly=f.google.firestore.v1beta1.TransactionOptions.ReadOnly.fromObject(e.readOnly,t+1)}if(null!=e.readWrite){if(!p.isObject(e.readWrite))throw TypeError(".google.firestore.v1beta1.TransactionOptions.readWrite: object expected");r.readWrite=f.google.firestore.v1beta1.TransactionOptions.ReadWrite.fromObject(e.readWrite,t+1)}return r},Sr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return null!=e.readOnly&&Object.hasOwnProperty.call(e,"readOnly")&&(o.readOnly=f.google.firestore.v1beta1.TransactionOptions.ReadOnly.toObject(e.readOnly,t,r+1),t.oneofs)&&(o.mode="readOnly"),null!=e.readWrite&&Object.hasOwnProperty.call(e,"readWrite")&&(o.readWrite=f.google.firestore.v1beta1.TransactionOptions.ReadWrite.toObject(e.readWrite,t,r+1),t.oneofs)&&(o.mode="readWrite"),o},Sr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Sr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.TransactionOptions"},Sr.ReadWrite=(Pr.prototype.retryTransaction=p.newBuffer([]),Pr.create=function(e){return new Pr(e)},Pr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.retryTransaction&&Object.hasOwnProperty.call(e,"retryTransaction")&&t.uint32(10).bytes(e.retryTransaction),t},Pr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Pr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.TransactionOptions.ReadWrite;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.retryTransaction=e.bytes():e.skipType(7&a,o)}return i},Pr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Pr.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.retryTransaction&&Object.hasOwnProperty.call(e,"retryTransaction")&&!(e.retryTransaction&&"number"==typeof e.retryTransaction.length||p.isString(e.retryTransaction))?"retryTransaction: buffer expected":null},Pr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.TransactionOptions.ReadWrite)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.TransactionOptions.ReadWrite: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.v1beta1.TransactionOptions.ReadWrite;return null!=e.retryTransaction&&("string"==typeof e.retryTransaction?p.base64.decode(e.retryTransaction,t.retryTransaction=p.newBuffer(p.base64.length(e.retryTransaction)),0):0<=e.retryTransaction.length&&(t.retryTransaction=e.retryTransaction)),t},Pr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(t.bytes===String?r.retryTransaction="":(r.retryTransaction=[],t.bytes!==Array&&(r.retryTransaction=p.newBuffer(r.retryTransaction)))),null!=e.retryTransaction&&Object.hasOwnProperty.call(e,"retryTransaction")&&(r.retryTransaction=t.bytes===String?p.base64.encode(e.retryTransaction,0,e.retryTransaction.length):t.bytes===Array?Array.prototype.slice.call(e.retryTransaction):e.retryTransaction),r},Pr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Pr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.TransactionOptions.ReadWrite"},Pr),Sr.ReadOnly=(Er.prototype.readTime=null,Object.defineProperty(Er.prototype,"consistencySelector",{get:p.oneOfGetter(e=["readTime"]),set:p.oneOfSetter(e)}),Er.create=function(e){return new Er(e)},Er.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(18).fork(),r+1).ldelim(),t},Er.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Er.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.TransactionOptions.ReadOnly;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==2?i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1):e.skipType(7&a,o)}return i},Er.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Er.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){e=f.google.protobuf.Timestamp.verify(e.readTime,t+1);if(e)return"readTime."+e}return null},Er.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.TransactionOptions.ReadOnly)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.TransactionOptions.ReadOnly: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.TransactionOptions.ReadOnly;if(null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1beta1.TransactionOptions.ReadOnly.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},Er.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.consistencySelector="readTime"),o},Er.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Er.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.TransactionOptions.ReadOnly"},Er),Sr),r.Document=(Dr.prototype.name="",Dr.prototype.fields=p.emptyObject,Dr.prototype.createTime=null,Dr.prototype.updateTime=null,Dr.create=function(e){return new Dr(e)},Dr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.fields&&Object.hasOwnProperty.call(e,"fields"))for(var o=Object.keys(e.fields),n=0;n<o.length;++n)t.uint32(18).fork().uint32(10).string(o[n]),f.google.firestore.v1beta1.Value.encode(e.fields[o[n]],t.uint32(18).fork(),r+1).ldelim().ldelim();return null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&f.google.protobuf.Timestamp.encode(e.createTime,t.uint32(26).fork(),r+1).ldelim(),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&f.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(34).fork(),r+1).ldelim(),t},Dr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Dr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.Document;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.fields===p.emptyObject&&(i.fields={});for(var s=e.uint32()+e.pos,l="",c=null;e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=f.google.firestore.v1beta1.Value.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.fields,l),i.fields[l]=c;break;case 3:i.createTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 4:i.updateTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Dr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Dr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.fields&&Object.hasOwnProperty.call(e,"fields")){if(!p.isObject(e.fields))return"fields: object expected";for(var r=Object.keys(e.fields),o=0;o<r.length;++o)if(n=f.google.firestore.v1beta1.Value.verify(e.fields[r[o]],t+1))return"fields."+n}var n;if(null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&(n=f.google.protobuf.Timestamp.verify(e.createTime,t+1)))return"createTime."+n;if(null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(n=f.google.protobuf.Timestamp.verify(e.updateTime,t+1)))return"updateTime."+n;return null},Dr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.Document)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.Document: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.Document;if(null!=e.name&&(r.name=String(e.name)),e.fields){if(!p.isObject(e.fields))throw TypeError(".google.firestore.v1beta1.Document.fields: object expected");r.fields={};for(var o=Object.keys(e.fields),n=0;n<o.length;++n){if("__proto__"===o[n]&&p.makeProp(r.fields,o[n]),!p.isObject(e.fields[o[n]]))throw TypeError(".google.firestore.v1beta1.Document.fields: object expected");r.fields[o[n]]=f.google.firestore.v1beta1.Value.fromObject(e.fields[o[n]],t+1)}}if(null!=e.createTime){if(!p.isObject(e.createTime))throw TypeError(".google.firestore.v1beta1.Document.createTime: object expected");r.createTime=f.google.protobuf.Timestamp.fromObject(e.createTime,t+1)}if(null!=e.updateTime){if(!p.isObject(e.updateTime))throw TypeError(".google.firestore.v1beta1.Document.updateTime: object expected");r.updateTime=f.google.protobuf.Timestamp.fromObject(e.updateTime,t+1)}return r},Dr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.objects||t.defaults)&&(n.fields={}),t.defaults&&(n.name="",n.createTime=null,n.updateTime=null),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(n.name=e.name),e.fields&&(o=Object.keys(e.fields)).length){n.fields={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.fields,o[i]),n.fields[o[i]]=f.google.firestore.v1beta1.Value.toObject(e.fields[o[i]],t,r+1)}return null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&(n.createTime=f.google.protobuf.Timestamp.toObject(e.createTime,t,r+1)),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(n.updateTime=f.google.protobuf.Timestamp.toObject(e.updateTime,t,r+1)),n},Dr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Dr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.Document"},Dr),r.Value=(x.prototype.nullValue=null,x.prototype.booleanValue=null,x.prototype.integerValue=null,x.prototype.doubleValue=null,x.prototype.timestampValue=null,x.prototype.stringValue=null,x.prototype.bytesValue=null,x.prototype.referenceValue=null,x.prototype.geoPointValue=null,x.prototype.arrayValue=null,x.prototype.mapValue=null,Object.defineProperty(x.prototype,"valueType",{get:p.oneOfGetter(e=["nullValue","booleanValue","integerValue","doubleValue","timestampValue","stringValue","bytesValue","referenceValue","geoPointValue","arrayValue","mapValue"]),set:p.oneOfSetter(e)}),x.create=function(e){return new x(e)},x.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.booleanValue&&Object.hasOwnProperty.call(e,"booleanValue")&&t.uint32(8).bool(e.booleanValue),null!=e.integerValue&&Object.hasOwnProperty.call(e,"integerValue")&&t.uint32(16).int64(e.integerValue),null!=e.doubleValue&&Object.hasOwnProperty.call(e,"doubleValue")&&t.uint32(25).double(e.doubleValue),null!=e.referenceValue&&Object.hasOwnProperty.call(e,"referenceValue")&&t.uint32(42).string(e.referenceValue),null!=e.mapValue&&Object.hasOwnProperty.call(e,"mapValue")&&f.google.firestore.v1beta1.MapValue.encode(e.mapValue,t.uint32(50).fork(),r+1).ldelim(),null!=e.geoPointValue&&Object.hasOwnProperty.call(e,"geoPointValue")&&f.google.type.LatLng.encode(e.geoPointValue,t.uint32(66).fork(),r+1).ldelim(),null!=e.arrayValue&&Object.hasOwnProperty.call(e,"arrayValue")&&f.google.firestore.v1beta1.ArrayValue.encode(e.arrayValue,t.uint32(74).fork(),r+1).ldelim(),null!=e.timestampValue&&Object.hasOwnProperty.call(e,"timestampValue")&&f.google.protobuf.Timestamp.encode(e.timestampValue,t.uint32(82).fork(),r+1).ldelim(),null!=e.nullValue&&Object.hasOwnProperty.call(e,"nullValue")&&t.uint32(88).int32(e.nullValue),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&t.uint32(138).string(e.stringValue),null!=e.bytesValue&&Object.hasOwnProperty.call(e,"bytesValue")&&t.uint32(146).bytes(e.bytesValue),t},x.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},x.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.Value;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 11:i.nullValue=e.int32();break;case 1:i.booleanValue=e.bool();break;case 2:i.integerValue=e.int64();break;case 3:i.doubleValue=e.double();break;case 10:i.timestampValue=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 17:i.stringValue=e.string();break;case 18:i.bytesValue=e.bytes();break;case 5:i.referenceValue=e.string();break;case 8:i.geoPointValue=f.google.type.LatLng.decode(e,e.uint32(),void 0,o+1);break;case 9:i.arrayValue=f.google.firestore.v1beta1.ArrayValue.decode(e,e.uint32(),void 0,o+1);break;case 6:i.mapValue=f.google.firestore.v1beta1.MapValue.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},x.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},x.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.nullValue&&Object.hasOwnProperty.call(e,"nullValue")&&(o.valueType=1,0!==e.nullValue))return"nullValue: enum value expected";if(null!=e.booleanValue&&Object.hasOwnProperty.call(e,"booleanValue")){if(1===o.valueType)return"valueType: multiple values";if(o.valueType=1,"boolean"!=typeof e.booleanValue)return"booleanValue: boolean expected"}if(null!=e.integerValue&&Object.hasOwnProperty.call(e,"integerValue")){if(1===o.valueType)return"valueType: multiple values";if(o.valueType=1,!(p.isInteger(e.integerValue)||e.integerValue&&p.isInteger(e.integerValue.low)&&p.isInteger(e.integerValue.high)))return"integerValue: integer|Long expected"}if(null!=e.doubleValue&&Object.hasOwnProperty.call(e,"doubleValue")){if(1===o.valueType)return"valueType: multiple values";if(o.valueType=1,"number"!=typeof e.doubleValue)return"doubleValue: number expected"}if(null!=e.timestampValue&&Object.hasOwnProperty.call(e,"timestampValue")){if(1===o.valueType)return"valueType: multiple values";if(r=f.google.protobuf.Timestamp.verify(e.timestampValue,t+(o.valueType=1)))return"timestampValue."+r}if(null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")){if(1===o.valueType)return"valueType: multiple values";if(o.valueType=1,!p.isString(e.stringValue))return"stringValue: string expected"}if(null!=e.bytesValue&&Object.hasOwnProperty.call(e,"bytesValue")){if(1===o.valueType)return"valueType: multiple values";if(o.valueType=1,!(e.bytesValue&&"number"==typeof e.bytesValue.length||p.isString(e.bytesValue)))return"bytesValue: buffer expected"}if(null!=e.referenceValue&&Object.hasOwnProperty.call(e,"referenceValue")){if(1===o.valueType)return"valueType: multiple values";if(o.valueType=1,!p.isString(e.referenceValue))return"referenceValue: string expected"}if(null!=e.geoPointValue&&Object.hasOwnProperty.call(e,"geoPointValue")){if(1===o.valueType)return"valueType: multiple values";if(r=f.google.type.LatLng.verify(e.geoPointValue,t+(o.valueType=1)))return"geoPointValue."+r}if(null!=e.arrayValue&&Object.hasOwnProperty.call(e,"arrayValue")){if(1===o.valueType)return"valueType: multiple values";if(r=f.google.firestore.v1beta1.ArrayValue.verify(e.arrayValue,t+(o.valueType=1)))return"arrayValue."+r}if(null!=e.mapValue&&Object.hasOwnProperty.call(e,"mapValue")){if(1===o.valueType)return"valueType: multiple values";if(r=f.google.firestore.v1beta1.MapValue.verify(e.mapValue,t+(o.valueType=1)))return"mapValue."+r}return null},x.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.Value)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.Value: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.Value;switch(e.nullValue){default:"number"==typeof e.nullValue&&(r.nullValue=e.nullValue);break;case"NULL_VALUE":case 0:r.nullValue=0}if(null!=e.booleanValue&&(r.booleanValue=Boolean(e.booleanValue)),null!=e.integerValue&&(p.Long?r.integerValue=p.Long.fromValue(e.integerValue,!1):"string"==typeof e.integerValue?r.integerValue=parseInt(e.integerValue,10):"number"==typeof e.integerValue?r.integerValue=e.integerValue:"object"==typeof e.integerValue&&(r.integerValue=new p.LongBits(e.integerValue.low>>>0,e.integerValue.high>>>0).toNumber())),null!=e.doubleValue&&(r.doubleValue=Number(e.doubleValue)),null!=e.timestampValue){if(!p.isObject(e.timestampValue))throw TypeError(".google.firestore.v1beta1.Value.timestampValue: object expected");r.timestampValue=f.google.protobuf.Timestamp.fromObject(e.timestampValue,t+1)}if(null!=e.stringValue&&(r.stringValue=String(e.stringValue)),null!=e.bytesValue&&("string"==typeof e.bytesValue?p.base64.decode(e.bytesValue,r.bytesValue=p.newBuffer(p.base64.length(e.bytesValue)),0):0<=e.bytesValue.length&&(r.bytesValue=e.bytesValue)),null!=e.referenceValue&&(r.referenceValue=String(e.referenceValue)),null!=e.geoPointValue){if(!p.isObject(e.geoPointValue))throw TypeError(".google.firestore.v1beta1.Value.geoPointValue: object expected");r.geoPointValue=f.google.type.LatLng.fromObject(e.geoPointValue,t+1)}if(null!=e.arrayValue){if(!p.isObject(e.arrayValue))throw TypeError(".google.firestore.v1beta1.Value.arrayValue: object expected");r.arrayValue=f.google.firestore.v1beta1.ArrayValue.fromObject(e.arrayValue,t+1)}if(null!=e.mapValue){if(!p.isObject(e.mapValue))throw TypeError(".google.firestore.v1beta1.Value.mapValue: object expected");r.mapValue=f.google.firestore.v1beta1.MapValue.fromObject(e.mapValue,t+1)}return r},x.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return null!=e.booleanValue&&Object.hasOwnProperty.call(e,"booleanValue")&&(o.booleanValue=e.booleanValue,t.oneofs)&&(o.valueType="booleanValue"),null!=e.integerValue&&Object.hasOwnProperty.call(e,"integerValue")&&("undefined"!=typeof BigInt&&t.longs===BigInt?o.integerValue="number"==typeof e.integerValue?BigInt(e.integerValue):p.Long.fromBits(e.integerValue.low>>>0,e.integerValue.high>>>0,!1).toBigInt():"number"==typeof e.integerValue?o.integerValue=t.longs===String?String(e.integerValue):e.integerValue:o.integerValue=t.longs===String?p.Long.prototype.toString.call(e.integerValue):t.longs===Number?new p.LongBits(e.integerValue.low>>>0,e.integerValue.high>>>0).toNumber():e.integerValue,t.oneofs)&&(o.valueType="integerValue"),null!=e.doubleValue&&Object.hasOwnProperty.call(e,"doubleValue")&&(o.doubleValue=t.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue,t.oneofs)&&(o.valueType="doubleValue"),null!=e.referenceValue&&Object.hasOwnProperty.call(e,"referenceValue")&&(o.referenceValue=e.referenceValue,t.oneofs)&&(o.valueType="referenceValue"),null!=e.mapValue&&Object.hasOwnProperty.call(e,"mapValue")&&(o.mapValue=f.google.firestore.v1beta1.MapValue.toObject(e.mapValue,t,r+1),t.oneofs)&&(o.valueType="mapValue"),null!=e.geoPointValue&&Object.hasOwnProperty.call(e,"geoPointValue")&&(o.geoPointValue=f.google.type.LatLng.toObject(e.geoPointValue,t,r+1),t.oneofs)&&(o.valueType="geoPointValue"),null!=e.arrayValue&&Object.hasOwnProperty.call(e,"arrayValue")&&(o.arrayValue=f.google.firestore.v1beta1.ArrayValue.toObject(e.arrayValue,t,r+1),t.oneofs)&&(o.valueType="arrayValue"),null!=e.timestampValue&&Object.hasOwnProperty.call(e,"timestampValue")&&(o.timestampValue=f.google.protobuf.Timestamp.toObject(e.timestampValue,t,r+1),t.oneofs)&&(o.valueType="timestampValue"),null!=e.nullValue&&Object.hasOwnProperty.call(e,"nullValue")&&(o.nullValue=t.enums!==String||void 0===f.google.protobuf.NullValue[e.nullValue]?e.nullValue:f.google.protobuf.NullValue[e.nullValue],t.oneofs)&&(o.valueType="nullValue"),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&(o.stringValue=e.stringValue,t.oneofs)&&(o.valueType="stringValue"),null!=e.bytesValue&&Object.hasOwnProperty.call(e,"bytesValue")&&(o.bytesValue=t.bytes===String?p.base64.encode(e.bytesValue,0,e.bytesValue.length):t.bytes===Array?Array.prototype.slice.call(e.bytesValue):e.bytesValue,t.oneofs)&&(o.valueType="bytesValue"),o},x.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},x.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.Value"},x),r.ArrayValue=(Ir.prototype.values=p.emptyArray,Ir.create=function(e){return new Ir(e)},Ir.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.values&&e.values.length)for(var o=0;o<e.values.length;++o)f.google.firestore.v1beta1.Value.encode(e.values[o],t.uint32(10).fork(),r+1).ldelim();return t},Ir.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ir.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.ArrayValue;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?(i.values&&i.values.length||(i.values=[]),i.values.push(f.google.firestore.v1beta1.Value.decode(e,e.uint32(),void 0,o+1))):e.skipType(7&a,o)}return i},Ir.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ir.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.values&&Object.hasOwnProperty.call(e,"values")){if(!Array.isArray(e.values))return"values: array expected";for(var r=0;r<e.values.length;++r){var o=f.google.firestore.v1beta1.Value.verify(e.values[r],t+1);if(o)return"values."+o}}return null},Ir.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.ArrayValue)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.ArrayValue: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.ArrayValue;if(e.values){if(!Array.isArray(e.values))throw TypeError(".google.firestore.v1beta1.ArrayValue.values: array expected");r.values=[];for(var o=0;o<e.values.length;++o){if(!p.isObject(e.values[o]))throw TypeError(".google.firestore.v1beta1.ArrayValue.values: object expected");r.values[o]=f.google.firestore.v1beta1.Value.fromObject(e.values[o],t+1)}}return r},Ir.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.values=[]),e.values&&e.values.length){o.values=[];for(var n=0;n<e.values.length;++n)o.values[n]=f.google.firestore.v1beta1.Value.toObject(e.values[n],t,r+1)}return o},Ir.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ir.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.ArrayValue"},Ir),r.MapValue=(Rr.prototype.fields=p.emptyObject,Rr.create=function(e){return new Rr(e)},Rr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.fields&&Object.hasOwnProperty.call(e,"fields"))for(var o=Object.keys(e.fields),n=0;n<o.length;++n)t.uint32(10).fork().uint32(10).string(o[n]),f.google.firestore.v1beta1.Value.encode(e.fields[o[n]],t.uint32(18).fork(),r+1).ldelim().ldelim();return t},Rr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Rr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.MapValue;e.pos<n;){var a=e.uint32();if(a===r)break;if(a>>>3==1){i.fields===p.emptyObject&&(i.fields={});for(var s=e.uint32()+e.pos,l="",c=null;e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=f.google.firestore.v1beta1.Value.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.fields,l),i.fields[l]=c}else e.skipType(7&a,o)}return i},Rr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Rr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.fields&&Object.hasOwnProperty.call(e,"fields")){if(!p.isObject(e.fields))return"fields: object expected";for(var r=Object.keys(e.fields),o=0;o<r.length;++o){var n=f.google.firestore.v1beta1.Value.verify(e.fields[r[o]],t+1);if(n)return"fields."+n}}return null},Rr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.MapValue)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.MapValue: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.MapValue;if(e.fields){if(!p.isObject(e.fields))throw TypeError(".google.firestore.v1beta1.MapValue.fields: object expected");r.fields={};for(var o=Object.keys(e.fields),n=0;n<o.length;++n){if("__proto__"===o[n]&&p.makeProp(r.fields,o[n]),!p.isObject(e.fields[o[n]]))throw TypeError(".google.firestore.v1beta1.MapValue.fields: object expected");r.fields[o[n]]=f.google.firestore.v1beta1.Value.fromObject(e.fields[o[n]],t+1)}}return r},Rr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.objects||t.defaults)&&(n.fields={}),e.fields&&(o=Object.keys(e.fields)).length){n.fields={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.fields,o[i]),n.fields[o[i]]=f.google.firestore.v1beta1.Value.toObject(e.fields[o[i]],t,r+1)}return n},Rr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Rr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.MapValue"},Rr),r.Firestore=(((Lr.prototype=Object.create(o.rpc.Service.prototype)).constructor=Lr).create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(Lr.prototype.getDocument=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.GetDocumentRequest,f.google.firestore.v1beta1.Document,t,r)},"name",{value:"GetDocument"}),Object.defineProperty(Lr.prototype.listDocuments=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.ListDocumentsRequest,f.google.firestore.v1beta1.ListDocumentsResponse,t,r)},"name",{value:"ListDocuments"}),Object.defineProperty(Lr.prototype.updateDocument=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.UpdateDocumentRequest,f.google.firestore.v1beta1.Document,t,r)},"name",{value:"UpdateDocument"}),Object.defineProperty(Lr.prototype.deleteDocument=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.DeleteDocumentRequest,f.google.protobuf.Empty,t,r)},"name",{value:"DeleteDocument"}),Object.defineProperty(Lr.prototype.batchGetDocuments=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.BatchGetDocumentsRequest,f.google.firestore.v1beta1.BatchGetDocumentsResponse,t,r)},"name",{value:"BatchGetDocuments"}),Object.defineProperty(Lr.prototype.beginTransaction=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.BeginTransactionRequest,f.google.firestore.v1beta1.BeginTransactionResponse,t,r)},"name",{value:"BeginTransaction"}),Object.defineProperty(Lr.prototype.commit=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.CommitRequest,f.google.firestore.v1beta1.CommitResponse,t,r)},"name",{value:"Commit"}),Object.defineProperty(Lr.prototype.rollback=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.RollbackRequest,f.google.protobuf.Empty,t,r)},"name",{value:"Rollback"}),Object.defineProperty(Lr.prototype.runQuery=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.RunQueryRequest,f.google.firestore.v1beta1.RunQueryResponse,t,r)},"name",{value:"RunQuery"}),Object.defineProperty(Lr.prototype.partitionQuery=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.PartitionQueryRequest,f.google.firestore.v1beta1.PartitionQueryResponse,t,r)},"name",{value:"PartitionQuery"}),Object.defineProperty(Lr.prototype.write=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.WriteRequest,f.google.firestore.v1beta1.WriteResponse,t,r)},"name",{value:"Write"}),Object.defineProperty(Lr.prototype.listen=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.ListenRequest,f.google.firestore.v1beta1.ListenResponse,t,r)},"name",{value:"Listen"}),Object.defineProperty(Lr.prototype.listCollectionIds=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.ListCollectionIdsRequest,f.google.firestore.v1beta1.ListCollectionIdsResponse,t,r)},"name",{value:"ListCollectionIds"}),Object.defineProperty(Lr.prototype.batchWrite=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.BatchWriteRequest,f.google.firestore.v1beta1.BatchWriteResponse,t,r)},"name",{value:"BatchWrite"}),Object.defineProperty(Lr.prototype.createDocument=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.firestore.v1beta1.CreateDocumentRequest,f.google.firestore.v1beta1.Document,t,r)},"name",{value:"CreateDocument"}),Lr),r.GetDocumentRequest=(_r.prototype.name="",_r.prototype.mask=null,_r.prototype.transaction=null,_r.prototype.readTime=null,Object.defineProperty(_r.prototype,"consistencySelector",{get:p.oneOfGetter(e=["transaction","readTime"]),set:p.oneOfSetter(e)}),_r.create=function(e){return new _r(e)},_r.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&f.google.firestore.v1beta1.DocumentMask.encode(e.mask,t.uint32(18).fork(),r+1).ldelim(),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(26).bytes(e.transaction),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(42).fork(),r+1).ldelim(),t},_r.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},_r.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.GetDocumentRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.mask=f.google.firestore.v1beta1.DocumentMask.decode(e,e.uint32(),void 0,o+1);break;case 3:i.transaction=e.bytes();break;case 5:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},_r.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},_r.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(r=f.google.firestore.v1beta1.DocumentMask.verify(e.mask,t+1)))return"mask."+r;if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.consistencySelector=1,!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))))return"transaction: buffer expected";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.protobuf.Timestamp.verify(e.readTime,t+(o.consistencySelector=1)))return"readTime."+r}return null},_r.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.GetDocumentRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.GetDocumentRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.GetDocumentRequest;if(null!=e.name&&(r.name=String(e.name)),null!=e.mask){if(!p.isObject(e.mask))throw TypeError(".google.firestore.v1beta1.GetDocumentRequest.mask: object expected");r.mask=f.google.firestore.v1beta1.DocumentMask.fromObject(e.mask,t+1)}if(null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1beta1.GetDocumentRequest.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},_r.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.name="",o.mask=null),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(o.mask=f.google.firestore.v1beta1.DocumentMask.toObject(e.mask,t,r+1)),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction,t.oneofs)&&(o.consistencySelector="transaction"),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.consistencySelector="readTime"),o},_r.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},_r.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.GetDocumentRequest"},_r),r.ListDocumentsRequest=(T.prototype.parent="",T.prototype.collectionId="",T.prototype.pageSize=0,T.prototype.pageToken="",T.prototype.orderBy="",T.prototype.mask=null,T.prototype.transaction=null,T.prototype.readTime=null,T.prototype.showMissing=!1,Object.defineProperty(T.prototype,"consistencySelector",{get:p.oneOfGetter(e=["transaction","readTime"]),set:p.oneOfSetter(e)}),T.create=function(e){return new T(e)},T.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&t.uint32(18).string(e.collectionId),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&t.uint32(24).int32(e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&t.uint32(34).string(e.pageToken),null!=e.orderBy&&Object.hasOwnProperty.call(e,"orderBy")&&t.uint32(50).string(e.orderBy),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&f.google.firestore.v1beta1.DocumentMask.encode(e.mask,t.uint32(58).fork(),r+1).ldelim(),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(66).bytes(e.transaction),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(82).fork(),r+1).ldelim(),null!=e.showMissing&&Object.hasOwnProperty.call(e,"showMissing")&&t.uint32(96).bool(e.showMissing),t},T.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},T.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.ListDocumentsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.collectionId=e.string();break;case 3:i.pageSize=e.int32();break;case 4:i.pageToken=e.string();break;case 6:i.orderBy=e.string();break;case 7:i.mask=f.google.firestore.v1beta1.DocumentMask.decode(e,e.uint32(),void 0,o+1);break;case 8:i.transaction=e.bytes();break;case 10:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 12:i.showMissing=e.bool();break;default:e.skipType(7&a,o)}}return i},T.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},T.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&!p.isString(e.collectionId))return"collectionId: string expected";if(null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&!p.isInteger(e.pageSize))return"pageSize: integer expected";if(null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&!p.isString(e.pageToken))return"pageToken: string expected";if(null!=e.orderBy&&Object.hasOwnProperty.call(e,"orderBy")&&!p.isString(e.orderBy))return"orderBy: string expected";if(null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(r=f.google.firestore.v1beta1.DocumentMask.verify(e.mask,t+1)))return"mask."+r;if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.consistencySelector=1,!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))))return"transaction: buffer expected";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.protobuf.Timestamp.verify(e.readTime,t+(o.consistencySelector=1)))return"readTime."+r}return null!=e.showMissing&&Object.hasOwnProperty.call(e,"showMissing")&&"boolean"!=typeof e.showMissing?"showMissing: boolean expected":null},T.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.ListDocumentsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.ListDocumentsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.ListDocumentsRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.collectionId&&(r.collectionId=String(e.collectionId)),null!=e.pageSize&&(r.pageSize=0|e.pageSize),null!=e.pageToken&&(r.pageToken=String(e.pageToken)),null!=e.orderBy&&(r.orderBy=String(e.orderBy)),null!=e.mask){if(!p.isObject(e.mask))throw TypeError(".google.firestore.v1beta1.ListDocumentsRequest.mask: object expected");r.mask=f.google.firestore.v1beta1.DocumentMask.fromObject(e.mask,t+1)}if(null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1beta1.ListDocumentsRequest.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return null!=e.showMissing&&(r.showMissing=Boolean(e.showMissing)),r},T.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.parent="",o.collectionId="",o.pageSize=0,o.pageToken="",o.orderBy="",o.mask=null,o.showMissing=!1),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(o.parent=e.parent),null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&(o.collectionId=e.collectionId),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&(o.pageSize=e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&(o.pageToken=e.pageToken),null!=e.orderBy&&Object.hasOwnProperty.call(e,"orderBy")&&(o.orderBy=e.orderBy),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(o.mask=f.google.firestore.v1beta1.DocumentMask.toObject(e.mask,t,r+1)),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction,t.oneofs)&&(o.consistencySelector="transaction"),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.consistencySelector="readTime"),null!=e.showMissing&&Object.hasOwnProperty.call(e,"showMissing")&&(o.showMissing=e.showMissing),o},T.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},T.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.ListDocumentsRequest"},T),r.ListDocumentsResponse=(Cr.prototype.documents=p.emptyArray,Cr.prototype.nextPageToken="",Cr.create=function(e){return new Cr(e)},Cr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.documents&&e.documents.length)for(var o=0;o<e.documents.length;++o)f.google.firestore.v1beta1.Document.encode(e.documents[o],t.uint32(10).fork(),r+1).ldelim();return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(18).string(e.nextPageToken),t},Cr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Cr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.ListDocumentsResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.documents&&i.documents.length||(i.documents=[]),i.documents.push(f.google.firestore.v1beta1.Document.decode(e,e.uint32(),void 0,o+1));break;case 2:i.nextPageToken=e.string();break;default:e.skipType(7&a,o)}}return i},Cr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Cr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.documents&&Object.hasOwnProperty.call(e,"documents")){if(!Array.isArray(e.documents))return"documents: array expected";for(var r=0;r<e.documents.length;++r){var o=f.google.firestore.v1beta1.Document.verify(e.documents[r],t+1);if(o)return"documents."+o}}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&!p.isString(e.nextPageToken)?"nextPageToken: string expected":null},Cr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.ListDocumentsResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.ListDocumentsResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.ListDocumentsResponse;if(e.documents){if(!Array.isArray(e.documents))throw TypeError(".google.firestore.v1beta1.ListDocumentsResponse.documents: array expected");r.documents=[];for(var o=0;o<e.documents.length;++o){if(!p.isObject(e.documents[o]))throw TypeError(".google.firestore.v1beta1.ListDocumentsResponse.documents: object expected");r.documents[o]=f.google.firestore.v1beta1.Document.fromObject(e.documents[o],t+1)}}return null!=e.nextPageToken&&(r.nextPageToken=String(e.nextPageToken)),r},Cr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.documents=[]),t.defaults&&(o.nextPageToken=""),e.documents&&e.documents.length){o.documents=[];for(var n=0;n<e.documents.length;++n)o.documents[n]=f.google.firestore.v1beta1.Document.toObject(e.documents[n],t,r+1)}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&(o.nextPageToken=e.nextPageToken),o},Cr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Cr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.ListDocumentsResponse"},Cr),r.CreateDocumentRequest=(Nr.prototype.parent="",Nr.prototype.collectionId="",Nr.prototype.documentId="",Nr.prototype.document=null,Nr.prototype.mask=null,Nr.create=function(e){return new Nr(e)},Nr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&t.uint32(18).string(e.collectionId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(26).string(e.documentId),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&f.google.firestore.v1beta1.Document.encode(e.document,t.uint32(34).fork(),r+1).ldelim(),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&f.google.firestore.v1beta1.DocumentMask.encode(e.mask,t.uint32(42).fork(),r+1).ldelim(),t},Nr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Nr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.CreateDocumentRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.collectionId=e.string();break;case 3:i.documentId=e.string();break;case 4:i.document=f.google.firestore.v1beta1.Document.decode(e,e.uint32(),void 0,o+1);break;case 5:i.mask=f.google.firestore.v1beta1.DocumentMask.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Nr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Nr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&!p.isString(e.collectionId))return"collectionId: string expected";if(null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&!p.isString(e.documentId))return"documentId: string expected";var r;if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(r=f.google.firestore.v1beta1.Document.verify(e.document,t+1)))return"document."+r;if(null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(r=f.google.firestore.v1beta1.DocumentMask.verify(e.mask,t+1)))return"mask."+r;return null},Nr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.CreateDocumentRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.CreateDocumentRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.CreateDocumentRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.collectionId&&(r.collectionId=String(e.collectionId)),null!=e.documentId&&(r.documentId=String(e.documentId)),null!=e.document){if(!p.isObject(e.document))throw TypeError(".google.firestore.v1beta1.CreateDocumentRequest.document: object expected");r.document=f.google.firestore.v1beta1.Document.fromObject(e.document,t+1)}if(null!=e.mask){if(!p.isObject(e.mask))throw TypeError(".google.firestore.v1beta1.CreateDocumentRequest.mask: object expected");r.mask=f.google.firestore.v1beta1.DocumentMask.fromObject(e.mask,t+1)}return r},Nr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.parent="",o.collectionId="",o.documentId="",o.document=null,o.mask=null),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(o.parent=e.parent),null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&(o.collectionId=e.collectionId),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&(o.documentId=e.documentId),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(o.document=f.google.firestore.v1beta1.Document.toObject(e.document,t,r+1)),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(o.mask=f.google.firestore.v1beta1.DocumentMask.toObject(e.mask,t,r+1)),o},Nr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Nr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.CreateDocumentRequest"},Nr),r.UpdateDocumentRequest=(Ar.prototype.document=null,Ar.prototype.updateMask=null,Ar.prototype.mask=null,Ar.prototype.currentDocument=null,Ar.create=function(e){return new Ar(e)},Ar.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.document&&Object.hasOwnProperty.call(e,"document")&&f.google.firestore.v1beta1.Document.encode(e.document,t.uint32(10).fork(),r+1).ldelim(),null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&f.google.firestore.v1beta1.DocumentMask.encode(e.updateMask,t.uint32(18).fork(),r+1).ldelim(),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&f.google.firestore.v1beta1.DocumentMask.encode(e.mask,t.uint32(26).fork(),r+1).ldelim(),null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&f.google.firestore.v1beta1.Precondition.encode(e.currentDocument,t.uint32(34).fork(),r+1).ldelim(),t},Ar.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ar.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.UpdateDocumentRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.document=f.google.firestore.v1beta1.Document.decode(e,e.uint32(),void 0,o+1);break;case 2:i.updateMask=f.google.firestore.v1beta1.DocumentMask.decode(e,e.uint32(),void 0,o+1);break;case 3:i.mask=f.google.firestore.v1beta1.DocumentMask.decode(e,e.uint32(),void 0,o+1);break;case 4:i.currentDocument=f.google.firestore.v1beta1.Precondition.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Ar.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ar.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(r=f.google.firestore.v1beta1.Document.verify(e.document,t+1)))return"document."+r;if(null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&(r=f.google.firestore.v1beta1.DocumentMask.verify(e.updateMask,t+1)))return"updateMask."+r;if(null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(r=f.google.firestore.v1beta1.DocumentMask.verify(e.mask,t+1)))return"mask."+r;if(null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&(r=f.google.firestore.v1beta1.Precondition.verify(e.currentDocument,t+1)))return"currentDocument."+r;return null},Ar.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.UpdateDocumentRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.UpdateDocumentRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.UpdateDocumentRequest;if(null!=e.document){if(!p.isObject(e.document))throw TypeError(".google.firestore.v1beta1.UpdateDocumentRequest.document: object expected");r.document=f.google.firestore.v1beta1.Document.fromObject(e.document,t+1)}if(null!=e.updateMask){if(!p.isObject(e.updateMask))throw TypeError(".google.firestore.v1beta1.UpdateDocumentRequest.updateMask: object expected");r.updateMask=f.google.firestore.v1beta1.DocumentMask.fromObject(e.updateMask,t+1)}if(null!=e.mask){if(!p.isObject(e.mask))throw TypeError(".google.firestore.v1beta1.UpdateDocumentRequest.mask: object expected");r.mask=f.google.firestore.v1beta1.DocumentMask.fromObject(e.mask,t+1)}if(null!=e.currentDocument){if(!p.isObject(e.currentDocument))throw TypeError(".google.firestore.v1beta1.UpdateDocumentRequest.currentDocument: object expected");r.currentDocument=f.google.firestore.v1beta1.Precondition.fromObject(e.currentDocument,t+1)}return r},Ar.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.document=null,o.updateMask=null,o.mask=null,o.currentDocument=null),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(o.document=f.google.firestore.v1beta1.Document.toObject(e.document,t,r+1)),null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&(o.updateMask=f.google.firestore.v1beta1.DocumentMask.toObject(e.updateMask,t,r+1)),null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(o.mask=f.google.firestore.v1beta1.DocumentMask.toObject(e.mask,t,r+1)),null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&(o.currentDocument=f.google.firestore.v1beta1.Precondition.toObject(e.currentDocument,t,r+1)),o},Ar.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ar.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.UpdateDocumentRequest"},Ar),r.DeleteDocumentRequest=(Fr.prototype.name="",Fr.prototype.currentDocument=null,Fr.create=function(e){return new Fr(e)},Fr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&f.google.firestore.v1beta1.Precondition.encode(e.currentDocument,t.uint32(18).fork(),r+1).ldelim(),t},Fr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Fr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.DeleteDocumentRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.currentDocument=f.google.firestore.v1beta1.Precondition.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Fr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Fr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")){e=f.google.firestore.v1beta1.Precondition.verify(e.currentDocument,t+1);if(e)return"currentDocument."+e}return null},Fr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.DeleteDocumentRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.DeleteDocumentRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.DeleteDocumentRequest;if(null!=e.name&&(r.name=String(e.name)),null!=e.currentDocument){if(!p.isObject(e.currentDocument))throw TypeError(".google.firestore.v1beta1.DeleteDocumentRequest.currentDocument: object expected");r.currentDocument=f.google.firestore.v1beta1.Precondition.fromObject(e.currentDocument,t+1)}return r},Fr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.name="",o.currentDocument=null),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&(o.currentDocument=f.google.firestore.v1beta1.Precondition.toObject(e.currentDocument,t,r+1)),o},Fr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Fr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.DeleteDocumentRequest"},Fr),r.BatchGetDocumentsRequest=(Vr.prototype.database="",Vr.prototype.documents=p.emptyArray,Vr.prototype.mask=null,Vr.prototype.transaction=null,Vr.prototype.newTransaction=null,Vr.prototype.readTime=null,Object.defineProperty(Vr.prototype,"consistencySelector",{get:p.oneOfGetter(e=["transaction","newTransaction","readTime"]),set:p.oneOfSetter(e)}),Vr.create=function(e){return new Vr(e)},Vr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.documents&&e.documents.length)for(var o=0;o<e.documents.length;++o)t.uint32(18).string(e.documents[o]);return null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&f.google.firestore.v1beta1.DocumentMask.encode(e.mask,t.uint32(26).fork(),r+1).ldelim(),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(34).bytes(e.transaction),null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")&&f.google.firestore.v1beta1.TransactionOptions.encode(e.newTransaction,t.uint32(42).fork(),r+1).ldelim(),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(58).fork(),r+1).ldelim(),t},Vr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Vr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.BatchGetDocumentsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.documents&&i.documents.length||(i.documents=[]),i.documents.push(e.string());break;case 3:i.mask=f.google.firestore.v1beta1.DocumentMask.decode(e,e.uint32(),void 0,o+1);break;case 4:i.transaction=e.bytes();break;case 5:i.newTransaction=f.google.firestore.v1beta1.TransactionOptions.decode(e,e.uint32(),void 0,o+1);break;case 7:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Vr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Vr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.documents&&Object.hasOwnProperty.call(e,"documents")){if(!Array.isArray(e.documents))return"documents: array expected";for(var n=0;n<e.documents.length;++n)if(!p.isString(e.documents[n]))return"documents: string[] expected"}if(null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(r=f.google.firestore.v1beta1.DocumentMask.verify(e.mask,t+1)))return"mask."+r;if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.consistencySelector=1,!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))))return"transaction: buffer expected";if(null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.firestore.v1beta1.TransactionOptions.verify(e.newTransaction,t+(o.consistencySelector=1)))return"newTransaction."+r}if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.protobuf.Timestamp.verify(e.readTime,t+(o.consistencySelector=1)))return"readTime."+r}return null},Vr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.BatchGetDocumentsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.BatchGetDocumentsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.BatchGetDocumentsRequest;if(null!=e.database&&(r.database=String(e.database)),e.documents){if(!Array.isArray(e.documents))throw TypeError(".google.firestore.v1beta1.BatchGetDocumentsRequest.documents: array expected");r.documents=[];for(var o=0;o<e.documents.length;++o)r.documents[o]=String(e.documents[o])}if(null!=e.mask){if(!p.isObject(e.mask))throw TypeError(".google.firestore.v1beta1.BatchGetDocumentsRequest.mask: object expected");r.mask=f.google.firestore.v1beta1.DocumentMask.fromObject(e.mask,t+1)}if(null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.newTransaction){if(!p.isObject(e.newTransaction))throw TypeError(".google.firestore.v1beta1.BatchGetDocumentsRequest.newTransaction: object expected");r.newTransaction=f.google.firestore.v1beta1.TransactionOptions.fromObject(e.newTransaction,t+1)}if(null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1beta1.BatchGetDocumentsRequest.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},Vr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.documents=[]),t.defaults&&(o.database="",o.mask=null),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(o.database=e.database),e.documents&&e.documents.length){o.documents=[];for(var n=0;n<e.documents.length;++n)o.documents[n]=e.documents[n]}return null!=e.mask&&Object.hasOwnProperty.call(e,"mask")&&(o.mask=f.google.firestore.v1beta1.DocumentMask.toObject(e.mask,t,r+1)),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction,t.oneofs)&&(o.consistencySelector="transaction"),null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")&&(o.newTransaction=f.google.firestore.v1beta1.TransactionOptions.toObject(e.newTransaction,t,r+1),t.oneofs)&&(o.consistencySelector="newTransaction"),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.consistencySelector="readTime"),o},Vr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Vr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.BatchGetDocumentsRequest"},Vr),r.BatchGetDocumentsResponse=(Ur.prototype.found=null,Ur.prototype.missing=null,Ur.prototype.transaction=p.newBuffer([]),Ur.prototype.readTime=null,Object.defineProperty(Ur.prototype,"result",{get:p.oneOfGetter(e=["found","missing"]),set:p.oneOfSetter(e)}),Ur.create=function(e){return new Ur(e)},Ur.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.found&&Object.hasOwnProperty.call(e,"found")&&f.google.firestore.v1beta1.Document.encode(e.found,t.uint32(10).fork(),r+1).ldelim(),null!=e.missing&&Object.hasOwnProperty.call(e,"missing")&&t.uint32(18).string(e.missing),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(26).bytes(e.transaction),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(34).fork(),r+1).ldelim(),t},Ur.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ur.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.BatchGetDocumentsResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.found=f.google.firestore.v1beta1.Document.decode(e,e.uint32(),void 0,o+1);break;case 2:i.missing=e.string();break;case 3:i.transaction=e.bytes();break;case 4:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Ur.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ur.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.found&&Object.hasOwnProperty.call(e,"found")&&(r=f.google.firestore.v1beta1.Document.verify(e.found,t+(o.result=1))))return"found."+r;if(null!=e.missing&&Object.hasOwnProperty.call(e,"missing")){if(1===o.result)return"result: multiple values";if(o.result=1,!p.isString(e.missing))return"missing: string expected"}if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction)))return"transaction: buffer expected";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(r=f.google.protobuf.Timestamp.verify(e.readTime,t+1)))return"readTime."+r;return null},Ur.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.BatchGetDocumentsResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.BatchGetDocumentsResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.BatchGetDocumentsResponse;if(null!=e.found){if(!p.isObject(e.found))throw TypeError(".google.firestore.v1beta1.BatchGetDocumentsResponse.found: object expected");r.found=f.google.firestore.v1beta1.Document.fromObject(e.found,t+1)}if(null!=e.missing&&(r.missing=String(e.missing)),null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1beta1.BatchGetDocumentsResponse.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},Ur.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(t.bytes===String?o.transaction="":(o.transaction=[],t.bytes!==Array&&(o.transaction=p.newBuffer(o.transaction))),o.readTime=null),null!=e.found&&Object.hasOwnProperty.call(e,"found")&&(o.found=f.google.firestore.v1beta1.Document.toObject(e.found,t,r+1),t.oneofs)&&(o.result="found"),null!=e.missing&&Object.hasOwnProperty.call(e,"missing")&&(o.missing=e.missing,t.oneofs)&&(o.result="missing"),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1)),o},Ur.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ur.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.BatchGetDocumentsResponse"},Ur),r.BeginTransactionRequest=(Br.prototype.database="",Br.prototype.options=null,Br.create=function(e){return new Br(e)},Br.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&f.google.firestore.v1beta1.TransactionOptions.encode(e.options,t.uint32(18).fork(),r+1).ldelim(),t},Br.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Br.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.BeginTransactionRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.options=f.google.firestore.v1beta1.TransactionOptions.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Br.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Br.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.options&&Object.hasOwnProperty.call(e,"options")){e=f.google.firestore.v1beta1.TransactionOptions.verify(e.options,t+1);if(e)return"options."+e}return null},Br.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.BeginTransactionRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.BeginTransactionRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.BeginTransactionRequest;if(null!=e.database&&(r.database=String(e.database)),null!=e.options){if(!p.isObject(e.options))throw TypeError(".google.firestore.v1beta1.BeginTransactionRequest.options: object expected");r.options=f.google.firestore.v1beta1.TransactionOptions.fromObject(e.options,t+1)}return r},Br.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.database="",o.options=null),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(o.database=e.database),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o.options=f.google.firestore.v1beta1.TransactionOptions.toObject(e.options,t,r+1)),o},Br.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Br.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.BeginTransactionRequest"},Br),r.BeginTransactionResponse=(Mr.prototype.transaction=p.newBuffer([]),Mr.create=function(e){return new Mr(e)},Mr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(10).bytes(e.transaction),t},Mr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Mr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.BeginTransactionResponse;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.transaction=e.bytes():e.skipType(7&a,o)}return i},Mr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Mr.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))?"transaction: buffer expected":null},Mr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.BeginTransactionResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.BeginTransactionResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.v1beta1.BeginTransactionResponse;return null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,t.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(t.transaction=e.transaction)),t},Mr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(t.bytes===String?r.transaction="":(r.transaction=[],t.bytes!==Array&&(r.transaction=p.newBuffer(r.transaction)))),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(r.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction),r},Mr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Mr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.BeginTransactionResponse"},Mr),r.CommitRequest=(qr.prototype.database="",qr.prototype.writes=p.emptyArray,qr.prototype.transaction=p.newBuffer([]),qr.create=function(e){return new qr(e)},qr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.writes&&e.writes.length)for(var o=0;o<e.writes.length;++o)f.google.firestore.v1beta1.Write.encode(e.writes[o],t.uint32(18).fork(),r+1).ldelim();return null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(26).bytes(e.transaction),t},qr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},qr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.CommitRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.writes&&i.writes.length||(i.writes=[]),i.writes.push(f.google.firestore.v1beta1.Write.decode(e,e.uint32(),void 0,o+1));break;case 3:i.transaction=e.bytes();break;default:e.skipType(7&a,o)}}return i},qr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},qr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.writes&&Object.hasOwnProperty.call(e,"writes")){if(!Array.isArray(e.writes))return"writes: array expected";for(var r=0;r<e.writes.length;++r){var o=f.google.firestore.v1beta1.Write.verify(e.writes[r],t+1);if(o)return"writes."+o}}return null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))?"transaction: buffer expected":null},qr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.CommitRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.CommitRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.CommitRequest;if(null!=e.database&&(r.database=String(e.database)),e.writes){if(!Array.isArray(e.writes))throw TypeError(".google.firestore.v1beta1.CommitRequest.writes: array expected");r.writes=[];for(var o=0;o<e.writes.length;++o){if(!p.isObject(e.writes[o]))throw TypeError(".google.firestore.v1beta1.CommitRequest.writes: object expected");r.writes[o]=f.google.firestore.v1beta1.Write.fromObject(e.writes[o],t+1)}}return null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),r},qr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.writes=[]),t.defaults&&(o.database="",t.bytes===String?o.transaction="":(o.transaction=[],t.bytes!==Array&&(o.transaction=p.newBuffer(o.transaction)))),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(o.database=e.database),e.writes&&e.writes.length){o.writes=[];for(var n=0;n<e.writes.length;++n)o.writes[n]=f.google.firestore.v1beta1.Write.toObject(e.writes[n],t,r+1)}return null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction),o},qr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},qr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.CommitRequest"},qr),r.CommitResponse=(Qr.prototype.writeResults=p.emptyArray,Qr.prototype.commitTime=null,Qr.create=function(e){return new Qr(e)},Qr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.writeResults&&e.writeResults.length)for(var o=0;o<e.writeResults.length;++o)f.google.firestore.v1beta1.WriteResult.encode(e.writeResults[o],t.uint32(10).fork(),r+1).ldelim();return null!=e.commitTime&&Object.hasOwnProperty.call(e,"commitTime")&&f.google.protobuf.Timestamp.encode(e.commitTime,t.uint32(18).fork(),r+1).ldelim(),t},Qr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Qr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.CommitResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.writeResults&&i.writeResults.length||(i.writeResults=[]),i.writeResults.push(f.google.firestore.v1beta1.WriteResult.decode(e,e.uint32(),void 0,o+1));break;case 2:i.commitTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Qr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Qr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.writeResults&&Object.hasOwnProperty.call(e,"writeResults")){if(!Array.isArray(e.writeResults))return"writeResults: array expected";for(var r=0;r<e.writeResults.length;++r)if(o=f.google.firestore.v1beta1.WriteResult.verify(e.writeResults[r],t+1))return"writeResults."+o}var o;if(null!=e.commitTime&&Object.hasOwnProperty.call(e,"commitTime")&&(o=f.google.protobuf.Timestamp.verify(e.commitTime,t+1)))return"commitTime."+o;return null},Qr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.CommitResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.CommitResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.CommitResponse;if(e.writeResults){if(!Array.isArray(e.writeResults))throw TypeError(".google.firestore.v1beta1.CommitResponse.writeResults: array expected");r.writeResults=[];for(var o=0;o<e.writeResults.length;++o){if(!p.isObject(e.writeResults[o]))throw TypeError(".google.firestore.v1beta1.CommitResponse.writeResults: object expected");r.writeResults[o]=f.google.firestore.v1beta1.WriteResult.fromObject(e.writeResults[o],t+1)}}if(null!=e.commitTime){if(!p.isObject(e.commitTime))throw TypeError(".google.firestore.v1beta1.CommitResponse.commitTime: object expected");r.commitTime=f.google.protobuf.Timestamp.fromObject(e.commitTime,t+1)}return r},Qr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.writeResults=[]),t.defaults&&(o.commitTime=null),e.writeResults&&e.writeResults.length){o.writeResults=[];for(var n=0;n<e.writeResults.length;++n)o.writeResults[n]=f.google.firestore.v1beta1.WriteResult.toObject(e.writeResults[n],t,r+1)}return null!=e.commitTime&&Object.hasOwnProperty.call(e,"commitTime")&&(o.commitTime=f.google.protobuf.Timestamp.toObject(e.commitTime,t,r+1)),o},Qr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Qr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.CommitResponse"},Qr),r.RollbackRequest=(Jr.prototype.database="",Jr.prototype.transaction=p.newBuffer([]),Jr.create=function(e){return new Jr(e)},Jr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(18).bytes(e.transaction),t},Jr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Jr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.RollbackRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.transaction=e.bytes();break;default:e.skipType(7&a,o)}}return i},Jr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Jr.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database)?"database: string expected":null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))?"transaction: buffer expected":null},Jr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.RollbackRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.RollbackRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.v1beta1.RollbackRequest;return null!=e.database&&(t.database=String(e.database)),null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,t.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(t.transaction=e.transaction)),t},Jr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.database="",t.bytes===String?r.transaction="":(r.transaction=[],t.bytes!==Array&&(r.transaction=p.newBuffer(r.transaction)))),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(r.database=e.database),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(r.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction),r},Jr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Jr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.RollbackRequest"},Jr),r.RunQueryRequest=(Gr.prototype.parent="",Gr.prototype.structuredQuery=null,Gr.prototype.transaction=null,Gr.prototype.newTransaction=null,Gr.prototype.readTime=null,Object.defineProperty(Gr.prototype,"queryType",{get:p.oneOfGetter(e=["structuredQuery"]),set:p.oneOfSetter(e)}),Object.defineProperty(Gr.prototype,"consistencySelector",{get:p.oneOfGetter(e=["transaction","newTransaction","readTime"]),set:p.oneOfSetter(e)}),Gr.create=function(e){return new Gr(e)},Gr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&f.google.firestore.v1beta1.StructuredQuery.encode(e.structuredQuery,t.uint32(18).fork(),r+1).ldelim(),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(42).bytes(e.transaction),null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")&&f.google.firestore.v1beta1.TransactionOptions.encode(e.newTransaction,t.uint32(50).fork(),r+1).ldelim(),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(58).fork(),r+1).ldelim(),t},Gr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Gr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.RunQueryRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.structuredQuery=f.google.firestore.v1beta1.StructuredQuery.decode(e,e.uint32(),void 0,o+1);break;case 5:i.transaction=e.bytes();break;case 6:i.newTransaction=f.google.firestore.v1beta1.TransactionOptions.decode(e,e.uint32(),void 0,o+1);break;case 7:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Gr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Gr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&(r=f.google.firestore.v1beta1.StructuredQuery.verify(e.structuredQuery,t+(o.queryType=1))))return"structuredQuery."+r;if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.consistencySelector=1,!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction))))return"transaction: buffer expected";if(null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.firestore.v1beta1.TransactionOptions.verify(e.newTransaction,t+(o.consistencySelector=1)))return"newTransaction."+r}if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){if(1===o.consistencySelector)return"consistencySelector: multiple values";if(r=f.google.protobuf.Timestamp.verify(e.readTime,t+(o.consistencySelector=1)))return"readTime."+r}return null},Gr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.RunQueryRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.RunQueryRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.RunQueryRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.structuredQuery){if(!p.isObject(e.structuredQuery))throw TypeError(".google.firestore.v1beta1.RunQueryRequest.structuredQuery: object expected");r.structuredQuery=f.google.firestore.v1beta1.StructuredQuery.fromObject(e.structuredQuery,t+1)}if(null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.newTransaction){if(!p.isObject(e.newTransaction))throw TypeError(".google.firestore.v1beta1.RunQueryRequest.newTransaction: object expected");r.newTransaction=f.google.firestore.v1beta1.TransactionOptions.fromObject(e.newTransaction,t+1)}if(null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1beta1.RunQueryRequest.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},Gr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.parent=""),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(o.parent=e.parent),null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&(o.structuredQuery=f.google.firestore.v1beta1.StructuredQuery.toObject(e.structuredQuery,t,r+1),t.oneofs)&&(o.queryType="structuredQuery"),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction,t.oneofs)&&(o.consistencySelector="transaction"),null!=e.newTransaction&&Object.hasOwnProperty.call(e,"newTransaction")&&(o.newTransaction=f.google.firestore.v1beta1.TransactionOptions.toObject(e.newTransaction,t,r+1),t.oneofs)&&(o.consistencySelector="newTransaction"),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.consistencySelector="readTime"),o},Gr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Gr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.RunQueryRequest"},Gr),r.RunQueryResponse=(Wr.prototype.transaction=p.newBuffer([]),Wr.prototype.document=null,Wr.prototype.readTime=null,Wr.prototype.skippedResults=0,Wr.create=function(e){return new Wr(e)},Wr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.document&&Object.hasOwnProperty.call(e,"document")&&f.google.firestore.v1beta1.Document.encode(e.document,t.uint32(10).fork(),r+1).ldelim(),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&t.uint32(18).bytes(e.transaction),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(26).fork(),r+1).ldelim(),null!=e.skippedResults&&Object.hasOwnProperty.call(e,"skippedResults")&&t.uint32(32).int32(e.skippedResults),t},Wr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Wr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.RunQueryResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 2:i.transaction=e.bytes();break;case 1:i.document=f.google.firestore.v1beta1.Document.decode(e,e.uint32(),void 0,o+1);break;case 3:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 4:i.skippedResults=e.int32();break;default:e.skipType(7&a,o)}}return i},Wr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Wr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&!(e.transaction&&"number"==typeof e.transaction.length||p.isString(e.transaction)))return"transaction: buffer expected";var r;if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(r=f.google.firestore.v1beta1.Document.verify(e.document,t+1)))return"document."+r;if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(r=f.google.protobuf.Timestamp.verify(e.readTime,t+1)))return"readTime."+r;return null!=e.skippedResults&&Object.hasOwnProperty.call(e,"skippedResults")&&!p.isInteger(e.skippedResults)?"skippedResults: integer expected":null},Wr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.RunQueryResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.RunQueryResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.RunQueryResponse;if(null!=e.transaction&&("string"==typeof e.transaction?p.base64.decode(e.transaction,r.transaction=p.newBuffer(p.base64.length(e.transaction)),0):0<=e.transaction.length&&(r.transaction=e.transaction)),null!=e.document){if(!p.isObject(e.document))throw TypeError(".google.firestore.v1beta1.RunQueryResponse.document: object expected");r.document=f.google.firestore.v1beta1.Document.fromObject(e.document,t+1)}if(null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1beta1.RunQueryResponse.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return null!=e.skippedResults&&(r.skippedResults=0|e.skippedResults),r},Wr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.document=null,t.bytes===String?o.transaction="":(o.transaction=[],t.bytes!==Array&&(o.transaction=p.newBuffer(o.transaction))),o.readTime=null,o.skippedResults=0),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(o.document=f.google.firestore.v1beta1.Document.toObject(e.document,t,r+1)),null!=e.transaction&&Object.hasOwnProperty.call(e,"transaction")&&(o.transaction=t.bytes===String?p.base64.encode(e.transaction,0,e.transaction.length):t.bytes===Array?Array.prototype.slice.call(e.transaction):e.transaction),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1)),null!=e.skippedResults&&Object.hasOwnProperty.call(e,"skippedResults")&&(o.skippedResults=e.skippedResults),o},Wr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Wr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.RunQueryResponse"},Wr),r.PartitionQueryRequest=(zr.prototype.parent="",zr.prototype.structuredQuery=null,zr.prototype.partitionCount=p.Long?p.Long.fromBits(0,0,!1):0,zr.prototype.pageToken="",zr.prototype.pageSize=0,Object.defineProperty(zr.prototype,"queryType",{get:p.oneOfGetter(e=["structuredQuery"]),set:p.oneOfSetter(e)}),zr.create=function(e){return new zr(e)},zr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&f.google.firestore.v1beta1.StructuredQuery.encode(e.structuredQuery,t.uint32(18).fork(),r+1).ldelim(),null!=e.partitionCount&&Object.hasOwnProperty.call(e,"partitionCount")&&t.uint32(24).int64(e.partitionCount),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&t.uint32(34).string(e.pageToken),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&t.uint32(40).int32(e.pageSize),t},zr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},zr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.PartitionQueryRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.structuredQuery=f.google.firestore.v1beta1.StructuredQuery.decode(e,e.uint32(),void 0,o+1);break;case 3:i.partitionCount=e.int64();break;case 4:i.pageToken=e.string();break;case 5:i.pageSize=e.int32();break;default:e.skipType(7&a,o)}}return i},zr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},zr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")){t=f.google.firestore.v1beta1.StructuredQuery.verify(e.structuredQuery,t+1);if(t)return"structuredQuery."+t}return null!=e.partitionCount&&Object.hasOwnProperty.call(e,"partitionCount")&&!(p.isInteger(e.partitionCount)||e.partitionCount&&p.isInteger(e.partitionCount.low)&&p.isInteger(e.partitionCount.high))?"partitionCount: integer|Long expected":null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&!p.isString(e.pageToken)?"pageToken: string expected":null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&!p.isInteger(e.pageSize)?"pageSize: integer expected":null},zr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.PartitionQueryRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.PartitionQueryRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.PartitionQueryRequest;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.structuredQuery){if(!p.isObject(e.structuredQuery))throw TypeError(".google.firestore.v1beta1.PartitionQueryRequest.structuredQuery: object expected");r.structuredQuery=f.google.firestore.v1beta1.StructuredQuery.fromObject(e.structuredQuery,t+1)}return null!=e.partitionCount&&(p.Long?r.partitionCount=p.Long.fromValue(e.partitionCount,!1):"string"==typeof e.partitionCount?r.partitionCount=parseInt(e.partitionCount,10):"number"==typeof e.partitionCount?r.partitionCount=e.partitionCount:"object"==typeof e.partitionCount&&(r.partitionCount=new p.LongBits(e.partitionCount.low>>>0,e.partitionCount.high>>>0).toNumber())),null!=e.pageToken&&(r.pageToken=String(e.pageToken)),null!=e.pageSize&&(r.pageSize=0|e.pageSize),r},zr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};return t.defaults&&(n.parent="",p.Long?(o=new p.Long(0,0,!1),n.partitionCount=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):n.partitionCount=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0,n.pageToken="",n.pageSize=0),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(n.parent=e.parent),null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&(n.structuredQuery=f.google.firestore.v1beta1.StructuredQuery.toObject(e.structuredQuery,t,r+1),t.oneofs)&&(n.queryType="structuredQuery"),null!=e.partitionCount&&Object.hasOwnProperty.call(e,"partitionCount")&&("undefined"!=typeof BigInt&&t.longs===BigInt?n.partitionCount="number"==typeof e.partitionCount?BigInt(e.partitionCount):p.Long.fromBits(e.partitionCount.low>>>0,e.partitionCount.high>>>0,!1).toBigInt():"number"==typeof e.partitionCount?n.partitionCount=t.longs===String?String(e.partitionCount):e.partitionCount:n.partitionCount=t.longs===String?p.Long.prototype.toString.call(e.partitionCount):t.longs===Number?new p.LongBits(e.partitionCount.low>>>0,e.partitionCount.high>>>0).toNumber():e.partitionCount),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&(n.pageToken=e.pageToken),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&(n.pageSize=e.pageSize),n},zr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},zr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.PartitionQueryRequest"},zr),r.PartitionQueryResponse=(Yr.prototype.partitions=p.emptyArray,Yr.prototype.nextPageToken="",Yr.create=function(e){return new Yr(e)},Yr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.partitions&&e.partitions.length)for(var o=0;o<e.partitions.length;++o)f.google.firestore.v1beta1.Cursor.encode(e.partitions[o],t.uint32(10).fork(),r+1).ldelim();return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(18).string(e.nextPageToken),t},Yr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Yr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.PartitionQueryResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.partitions&&i.partitions.length||(i.partitions=[]),i.partitions.push(f.google.firestore.v1beta1.Cursor.decode(e,e.uint32(),void 0,o+1));break;case 2:i.nextPageToken=e.string();break;default:e.skipType(7&a,o)}}return i},Yr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Yr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.partitions&&Object.hasOwnProperty.call(e,"partitions")){if(!Array.isArray(e.partitions))return"partitions: array expected";for(var r=0;r<e.partitions.length;++r){var o=f.google.firestore.v1beta1.Cursor.verify(e.partitions[r],t+1);if(o)return"partitions."+o}}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&!p.isString(e.nextPageToken)?"nextPageToken: string expected":null},Yr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.PartitionQueryResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.PartitionQueryResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.PartitionQueryResponse;if(e.partitions){if(!Array.isArray(e.partitions))throw TypeError(".google.firestore.v1beta1.PartitionQueryResponse.partitions: array expected");r.partitions=[];for(var o=0;o<e.partitions.length;++o){if(!p.isObject(e.partitions[o]))throw TypeError(".google.firestore.v1beta1.PartitionQueryResponse.partitions: object expected");r.partitions[o]=f.google.firestore.v1beta1.Cursor.fromObject(e.partitions[o],t+1)}}return null!=e.nextPageToken&&(r.nextPageToken=String(e.nextPageToken)),r},Yr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.partitions=[]),t.defaults&&(o.nextPageToken=""),e.partitions&&e.partitions.length){o.partitions=[];for(var n=0;n<e.partitions.length;++n)o.partitions[n]=f.google.firestore.v1beta1.Cursor.toObject(e.partitions[n],t,r+1)}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&(o.nextPageToken=e.nextPageToken),o},Yr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Yr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.PartitionQueryResponse"},Yr),r.WriteRequest=(Hr.prototype.database="",Hr.prototype.streamId="",Hr.prototype.writes=p.emptyArray,Hr.prototype.streamToken=p.newBuffer([]),Hr.prototype.labels=p.emptyObject,Hr.create=function(e){return new Hr(e)},Hr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.streamId&&Object.hasOwnProperty.call(e,"streamId")&&t.uint32(18).string(e.streamId),null!=e.writes&&e.writes.length)for(var o=0;o<e.writes.length;++o)f.google.firestore.v1beta1.Write.encode(e.writes[o],t.uint32(26).fork(),r+1).ldelim();if(null!=e.streamToken&&Object.hasOwnProperty.call(e,"streamToken")&&t.uint32(34).bytes(e.streamToken),null!=e.labels&&Object.hasOwnProperty.call(e,"labels"))for(var n=Object.keys(e.labels),o=0;o<n.length;++o)t.uint32(42).fork().uint32(10).string(n[o]).uint32(18).string(e.labels[n[o]]).ldelim();return t},Hr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Hr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.WriteRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.streamId=e.string();break;case 3:i.writes&&i.writes.length||(i.writes=[]),i.writes.push(f.google.firestore.v1beta1.Write.decode(e,e.uint32(),void 0,o+1));break;case 4:i.streamToken=e.bytes();break;case 5:i.labels===p.emptyObject&&(i.labels={});for(var s=e.uint32()+e.pos,l="",c="";e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=e.string();break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.labels,l),i.labels[l]=c;break;default:e.skipType(7&a,o)}}return i},Hr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Hr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.streamId&&Object.hasOwnProperty.call(e,"streamId")&&!p.isString(e.streamId))return"streamId: string expected";if(null!=e.writes&&Object.hasOwnProperty.call(e,"writes")){if(!Array.isArray(e.writes))return"writes: array expected";for(var r=0;r<e.writes.length;++r){var o=f.google.firestore.v1beta1.Write.verify(e.writes[r],t+1);if(o)return"writes."+o}}if(null!=e.streamToken&&Object.hasOwnProperty.call(e,"streamToken")&&!(e.streamToken&&"number"==typeof e.streamToken.length||p.isString(e.streamToken)))return"streamToken: buffer expected";if(null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){if(!p.isObject(e.labels))return"labels: object expected";for(var n=Object.keys(e.labels),r=0;r<n.length;++r)if(!p.isString(e.labels[n[r]]))return"labels: string{k:string} expected"}return null},Hr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.WriteRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.WriteRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.WriteRequest;if(null!=e.database&&(r.database=String(e.database)),null!=e.streamId&&(r.streamId=String(e.streamId)),e.writes){if(!Array.isArray(e.writes))throw TypeError(".google.firestore.v1beta1.WriteRequest.writes: array expected");r.writes=[];for(var o=0;o<e.writes.length;++o){if(!p.isObject(e.writes[o]))throw TypeError(".google.firestore.v1beta1.WriteRequest.writes: object expected");r.writes[o]=f.google.firestore.v1beta1.Write.fromObject(e.writes[o],t+1)}}if(null!=e.streamToken&&("string"==typeof e.streamToken?p.base64.decode(e.streamToken,r.streamToken=p.newBuffer(p.base64.length(e.streamToken)),0):0<=e.streamToken.length&&(r.streamToken=e.streamToken)),e.labels){if(!p.isObject(e.labels))throw TypeError(".google.firestore.v1beta1.WriteRequest.labels: object expected");r.labels={};for(var n=Object.keys(e.labels),o=0;o<n.length;++o)"__proto__"===n[o]&&p.makeProp(r.labels,n[o]),r.labels[n[o]]=String(e.labels[n[o]])}return r},Hr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.arrays||t.defaults)&&(n.writes=[]),(t.objects||t.defaults)&&(n.labels={}),t.defaults&&(n.database="",n.streamId="",t.bytes===String?n.streamToken="":(n.streamToken=[],t.bytes!==Array&&(n.streamToken=p.newBuffer(n.streamToken)))),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(n.database=e.database),null!=e.streamId&&Object.hasOwnProperty.call(e,"streamId")&&(n.streamId=e.streamId),e.writes&&e.writes.length){n.writes=[];for(var i=0;i<e.writes.length;++i)n.writes[i]=f.google.firestore.v1beta1.Write.toObject(e.writes[i],t,r+1)}if(null!=e.streamToken&&Object.hasOwnProperty.call(e,"streamToken")&&(n.streamToken=t.bytes===String?p.base64.encode(e.streamToken,0,e.streamToken.length):t.bytes===Array?Array.prototype.slice.call(e.streamToken):e.streamToken),e.labels&&(o=Object.keys(e.labels)).length){n.labels={};for(i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.labels,o[i]),n.labels[o[i]]=e.labels[o[i]]}return n},Hr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Hr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.WriteRequest"},Hr),r.WriteResponse=(Kr.prototype.streamId="",Kr.prototype.streamToken=p.newBuffer([]),Kr.prototype.writeResults=p.emptyArray,Kr.prototype.commitTime=null,Kr.create=function(e){return new Kr(e)},Kr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.streamId&&Object.hasOwnProperty.call(e,"streamId")&&t.uint32(10).string(e.streamId),null!=e.streamToken&&Object.hasOwnProperty.call(e,"streamToken")&&t.uint32(18).bytes(e.streamToken),null!=e.writeResults&&e.writeResults.length)for(var o=0;o<e.writeResults.length;++o)f.google.firestore.v1beta1.WriteResult.encode(e.writeResults[o],t.uint32(26).fork(),r+1).ldelim();return null!=e.commitTime&&Object.hasOwnProperty.call(e,"commitTime")&&f.google.protobuf.Timestamp.encode(e.commitTime,t.uint32(34).fork(),r+1).ldelim(),t},Kr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Kr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.WriteResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.streamId=e.string();break;case 2:i.streamToken=e.bytes();break;case 3:i.writeResults&&i.writeResults.length||(i.writeResults=[]),i.writeResults.push(f.google.firestore.v1beta1.WriteResult.decode(e,e.uint32(),void 0,o+1));break;case 4:i.commitTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Kr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Kr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.streamId&&Object.hasOwnProperty.call(e,"streamId")&&!p.isString(e.streamId))return"streamId: string expected";if(null!=e.streamToken&&Object.hasOwnProperty.call(e,"streamToken")&&!(e.streamToken&&"number"==typeof e.streamToken.length||p.isString(e.streamToken)))return"streamToken: buffer expected";if(null!=e.writeResults&&Object.hasOwnProperty.call(e,"writeResults")){if(!Array.isArray(e.writeResults))return"writeResults: array expected";for(var r=0;r<e.writeResults.length;++r)if(o=f.google.firestore.v1beta1.WriteResult.verify(e.writeResults[r],t+1))return"writeResults."+o}var o;if(null!=e.commitTime&&Object.hasOwnProperty.call(e,"commitTime")&&(o=f.google.protobuf.Timestamp.verify(e.commitTime,t+1)))return"commitTime."+o;return null},Kr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.WriteResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.WriteResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.WriteResponse;if(null!=e.streamId&&(r.streamId=String(e.streamId)),null!=e.streamToken&&("string"==typeof e.streamToken?p.base64.decode(e.streamToken,r.streamToken=p.newBuffer(p.base64.length(e.streamToken)),0):0<=e.streamToken.length&&(r.streamToken=e.streamToken)),e.writeResults){if(!Array.isArray(e.writeResults))throw TypeError(".google.firestore.v1beta1.WriteResponse.writeResults: array expected");r.writeResults=[];for(var o=0;o<e.writeResults.length;++o){if(!p.isObject(e.writeResults[o]))throw TypeError(".google.firestore.v1beta1.WriteResponse.writeResults: object expected");r.writeResults[o]=f.google.firestore.v1beta1.WriteResult.fromObject(e.writeResults[o],t+1)}}if(null!=e.commitTime){if(!p.isObject(e.commitTime))throw TypeError(".google.firestore.v1beta1.WriteResponse.commitTime: object expected");r.commitTime=f.google.protobuf.Timestamp.fromObject(e.commitTime,t+1)}return r},Kr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.writeResults=[]),t.defaults&&(o.streamId="",t.bytes===String?o.streamToken="":(o.streamToken=[],t.bytes!==Array&&(o.streamToken=p.newBuffer(o.streamToken))),o.commitTime=null),null!=e.streamId&&Object.hasOwnProperty.call(e,"streamId")&&(o.streamId=e.streamId),null!=e.streamToken&&Object.hasOwnProperty.call(e,"streamToken")&&(o.streamToken=t.bytes===String?p.base64.encode(e.streamToken,0,e.streamToken.length):t.bytes===Array?Array.prototype.slice.call(e.streamToken):e.streamToken),e.writeResults&&e.writeResults.length){o.writeResults=[];for(var n=0;n<e.writeResults.length;++n)o.writeResults[n]=f.google.firestore.v1beta1.WriteResult.toObject(e.writeResults[n],t,r+1)}return null!=e.commitTime&&Object.hasOwnProperty.call(e,"commitTime")&&(o.commitTime=f.google.protobuf.Timestamp.toObject(e.commitTime,t,r+1)),o},Kr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Kr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.WriteResponse"},Kr),r.ListenRequest=(Xr.prototype.database="",Xr.prototype.addTarget=null,Xr.prototype.removeTarget=null,Xr.prototype.labels=p.emptyObject,Object.defineProperty(Xr.prototype,"targetChange",{get:p.oneOfGetter(e=["addTarget","removeTarget"]),set:p.oneOfSetter(e)}),Xr.create=function(e){return new Xr(e)},Xr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.addTarget&&Object.hasOwnProperty.call(e,"addTarget")&&f.google.firestore.v1beta1.Target.encode(e.addTarget,t.uint32(18).fork(),r+1).ldelim(),null!=e.removeTarget&&Object.hasOwnProperty.call(e,"removeTarget")&&t.uint32(24).int32(e.removeTarget),null!=e.labels&&Object.hasOwnProperty.call(e,"labels"))for(var o=Object.keys(e.labels),n=0;n<o.length;++n)t.uint32(34).fork().uint32(10).string(o[n]).uint32(18).string(e.labels[o[n]]).ldelim();return t},Xr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Xr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.ListenRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.addTarget=f.google.firestore.v1beta1.Target.decode(e,e.uint32(),void 0,o+1);break;case 3:i.removeTarget=e.int32();break;case 4:i.labels===p.emptyObject&&(i.labels={});for(var s=e.uint32()+e.pos,l="",c="";e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=e.string();break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.labels,l),i.labels[l]=c;break;default:e.skipType(7&a,o)}}return i},Xr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Xr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r={};if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.addTarget&&Object.hasOwnProperty.call(e,"addTarget")){t=f.google.firestore.v1beta1.Target.verify(e.addTarget,t+(r.targetChange=1));if(t)return"addTarget."+t}if(null!=e.removeTarget&&Object.hasOwnProperty.call(e,"removeTarget")){if(1===r.targetChange)return"targetChange: multiple values";if(r.targetChange=1,!p.isInteger(e.removeTarget))return"removeTarget: integer expected"}if(null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){if(!p.isObject(e.labels))return"labels: object expected";for(var o=Object.keys(e.labels),n=0;n<o.length;++n)if(!p.isString(e.labels[o[n]]))return"labels: string{k:string} expected"}return null},Xr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.ListenRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.ListenRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.ListenRequest;if(null!=e.database&&(r.database=String(e.database)),null!=e.addTarget){if(!p.isObject(e.addTarget))throw TypeError(".google.firestore.v1beta1.ListenRequest.addTarget: object expected");r.addTarget=f.google.firestore.v1beta1.Target.fromObject(e.addTarget,t+1)}if(null!=e.removeTarget&&(r.removeTarget=0|e.removeTarget),e.labels){if(!p.isObject(e.labels))throw TypeError(".google.firestore.v1beta1.ListenRequest.labels: object expected");r.labels={};for(var o=Object.keys(e.labels),n=0;n<o.length;++n)"__proto__"===o[n]&&p.makeProp(r.labels,o[n]),r.labels[o[n]]=String(e.labels[o[n]])}return r},Xr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.objects||t.defaults)&&(n.labels={}),t.defaults&&(n.database=""),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(n.database=e.database),null!=e.addTarget&&Object.hasOwnProperty.call(e,"addTarget")&&(n.addTarget=f.google.firestore.v1beta1.Target.toObject(e.addTarget,t,r+1),t.oneofs)&&(n.targetChange="addTarget"),null!=e.removeTarget&&Object.hasOwnProperty.call(e,"removeTarget")&&(n.removeTarget=e.removeTarget,t.oneofs)&&(n.targetChange="removeTarget"),e.labels&&(o=Object.keys(e.labels)).length){n.labels={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.labels,o[i]),n.labels[o[i]]=e.labels[o[i]]}return n},Xr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Xr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.ListenRequest"},Xr),r.ListenResponse=(Zr.prototype.targetChange=null,Zr.prototype.documentChange=null,Zr.prototype.documentDelete=null,Zr.prototype.documentRemove=null,Zr.prototype.filter=null,Object.defineProperty(Zr.prototype,"responseType",{get:p.oneOfGetter(e=["targetChange","documentChange","documentDelete","documentRemove","filter"]),set:p.oneOfSetter(e)}),Zr.create=function(e){return new Zr(e)},Zr.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.targetChange&&Object.hasOwnProperty.call(e,"targetChange")&&f.google.firestore.v1beta1.TargetChange.encode(e.targetChange,t.uint32(18).fork(),r+1).ldelim(),null!=e.documentChange&&Object.hasOwnProperty.call(e,"documentChange")&&f.google.firestore.v1beta1.DocumentChange.encode(e.documentChange,t.uint32(26).fork(),r+1).ldelim(),null!=e.documentDelete&&Object.hasOwnProperty.call(e,"documentDelete")&&f.google.firestore.v1beta1.DocumentDelete.encode(e.documentDelete,t.uint32(34).fork(),r+1).ldelim(),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&f.google.firestore.v1beta1.ExistenceFilter.encode(e.filter,t.uint32(42).fork(),r+1).ldelim(),null!=e.documentRemove&&Object.hasOwnProperty.call(e,"documentRemove")&&f.google.firestore.v1beta1.DocumentRemove.encode(e.documentRemove,t.uint32(50).fork(),r+1).ldelim(),t},Zr.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Zr.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.ListenResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 2:i.targetChange=f.google.firestore.v1beta1.TargetChange.decode(e,e.uint32(),void 0,o+1);break;case 3:i.documentChange=f.google.firestore.v1beta1.DocumentChange.decode(e,e.uint32(),void 0,o+1);break;case 4:i.documentDelete=f.google.firestore.v1beta1.DocumentDelete.decode(e,e.uint32(),void 0,o+1);break;case 6:i.documentRemove=f.google.firestore.v1beta1.DocumentRemove.decode(e,e.uint32(),void 0,o+1);break;case 5:i.filter=f.google.firestore.v1beta1.ExistenceFilter.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Zr.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Zr.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.targetChange&&Object.hasOwnProperty.call(e,"targetChange")&&(r=f.google.firestore.v1beta1.TargetChange.verify(e.targetChange,t+(o.responseType=1))))return"targetChange."+r;if(null!=e.documentChange&&Object.hasOwnProperty.call(e,"documentChange")){if(1===o.responseType)return"responseType: multiple values";if(r=f.google.firestore.v1beta1.DocumentChange.verify(e.documentChange,t+(o.responseType=1)))return"documentChange."+r}if(null!=e.documentDelete&&Object.hasOwnProperty.call(e,"documentDelete")){if(1===o.responseType)return"responseType: multiple values";if(r=f.google.firestore.v1beta1.DocumentDelete.verify(e.documentDelete,t+(o.responseType=1)))return"documentDelete."+r}if(null!=e.documentRemove&&Object.hasOwnProperty.call(e,"documentRemove")){if(1===o.responseType)return"responseType: multiple values";if(r=f.google.firestore.v1beta1.DocumentRemove.verify(e.documentRemove,t+(o.responseType=1)))return"documentRemove."+r}if(null!=e.filter&&Object.hasOwnProperty.call(e,"filter")){if(1===o.responseType)return"responseType: multiple values";if(r=f.google.firestore.v1beta1.ExistenceFilter.verify(e.filter,t+(o.responseType=1)))return"filter."+r}return null},Zr.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.ListenResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.ListenResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.ListenResponse;if(null!=e.targetChange){if(!p.isObject(e.targetChange))throw TypeError(".google.firestore.v1beta1.ListenResponse.targetChange: object expected");r.targetChange=f.google.firestore.v1beta1.TargetChange.fromObject(e.targetChange,t+1)}if(null!=e.documentChange){if(!p.isObject(e.documentChange))throw TypeError(".google.firestore.v1beta1.ListenResponse.documentChange: object expected");r.documentChange=f.google.firestore.v1beta1.DocumentChange.fromObject(e.documentChange,t+1)}if(null!=e.documentDelete){if(!p.isObject(e.documentDelete))throw TypeError(".google.firestore.v1beta1.ListenResponse.documentDelete: object expected");r.documentDelete=f.google.firestore.v1beta1.DocumentDelete.fromObject(e.documentDelete,t+1)}if(null!=e.documentRemove){if(!p.isObject(e.documentRemove))throw TypeError(".google.firestore.v1beta1.ListenResponse.documentRemove: object expected");r.documentRemove=f.google.firestore.v1beta1.DocumentRemove.fromObject(e.documentRemove,t+1)}if(null!=e.filter){if(!p.isObject(e.filter))throw TypeError(".google.firestore.v1beta1.ListenResponse.filter: object expected");r.filter=f.google.firestore.v1beta1.ExistenceFilter.fromObject(e.filter,t+1)}return r},Zr.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return null!=e.targetChange&&Object.hasOwnProperty.call(e,"targetChange")&&(o.targetChange=f.google.firestore.v1beta1.TargetChange.toObject(e.targetChange,t,r+1),t.oneofs)&&(o.responseType="targetChange"),null!=e.documentChange&&Object.hasOwnProperty.call(e,"documentChange")&&(o.documentChange=f.google.firestore.v1beta1.DocumentChange.toObject(e.documentChange,t,r+1),t.oneofs)&&(o.responseType="documentChange"),null!=e.documentDelete&&Object.hasOwnProperty.call(e,"documentDelete")&&(o.documentDelete=f.google.firestore.v1beta1.DocumentDelete.toObject(e.documentDelete,t,r+1),t.oneofs)&&(o.responseType="documentDelete"),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&(o.filter=f.google.firestore.v1beta1.ExistenceFilter.toObject(e.filter,t,r+1),t.oneofs)&&(o.responseType="filter"),null!=e.documentRemove&&Object.hasOwnProperty.call(e,"documentRemove")&&(o.documentRemove=f.google.firestore.v1beta1.DocumentRemove.toObject(e.documentRemove,t,r+1),t.oneofs)&&(o.responseType="documentRemove"),o},Zr.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Zr.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.ListenResponse"},Zr),r.Target=(k.prototype.query=null,k.prototype.documents=null,k.prototype.resumeToken=null,k.prototype.readTime=null,k.prototype.targetId=0,k.prototype.once=!1,Object.defineProperty(k.prototype,"targetType",{get:p.oneOfGetter(e=["query","documents"]),set:p.oneOfSetter(e)}),Object.defineProperty(k.prototype,"resumeType",{get:p.oneOfGetter(e=["resumeToken","readTime"]),set:p.oneOfSetter(e)}),k.create=function(e){return new k(e)},k.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.query&&Object.hasOwnProperty.call(e,"query")&&f.google.firestore.v1beta1.Target.QueryTarget.encode(e.query,t.uint32(18).fork(),r+1).ldelim(),null!=e.documents&&Object.hasOwnProperty.call(e,"documents")&&f.google.firestore.v1beta1.Target.DocumentsTarget.encode(e.documents,t.uint32(26).fork(),r+1).ldelim(),null!=e.resumeToken&&Object.hasOwnProperty.call(e,"resumeToken")&&t.uint32(34).bytes(e.resumeToken),null!=e.targetId&&Object.hasOwnProperty.call(e,"targetId")&&t.uint32(40).int32(e.targetId),null!=e.once&&Object.hasOwnProperty.call(e,"once")&&t.uint32(48).bool(e.once),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(90).fork(),r+1).ldelim(),t},k.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},k.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.Target;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 2:i.query=f.google.firestore.v1beta1.Target.QueryTarget.decode(e,e.uint32(),void 0,o+1);break;case 3:i.documents=f.google.firestore.v1beta1.Target.DocumentsTarget.decode(e,e.uint32(),void 0,o+1);break;case 4:i.resumeToken=e.bytes();break;case 11:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 5:i.targetId=e.int32();break;case 6:i.once=e.bool();break;default:e.skipType(7&a,o)}}return i},k.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},k.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.query&&Object.hasOwnProperty.call(e,"query")&&(r=f.google.firestore.v1beta1.Target.QueryTarget.verify(e.query,t+(o.targetType=1))))return"query."+r;if(null!=e.documents&&Object.hasOwnProperty.call(e,"documents")){if(1===o.targetType)return"targetType: multiple values";if(r=f.google.firestore.v1beta1.Target.DocumentsTarget.verify(e.documents,t+(o.targetType=1)))return"documents."+r}if(null!=e.resumeToken&&Object.hasOwnProperty.call(e,"resumeToken")&&(o.resumeType=1,!(e.resumeToken&&"number"==typeof e.resumeToken.length||p.isString(e.resumeToken))))return"resumeToken: buffer expected";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){if(1===o.resumeType)return"resumeType: multiple values";if(r=f.google.protobuf.Timestamp.verify(e.readTime,t+(o.resumeType=1)))return"readTime."+r}return null!=e.targetId&&Object.hasOwnProperty.call(e,"targetId")&&!p.isInteger(e.targetId)?"targetId: integer expected":null!=e.once&&Object.hasOwnProperty.call(e,"once")&&"boolean"!=typeof e.once?"once: boolean expected":null},k.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.Target)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.Target: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.Target;if(null!=e.query){if(!p.isObject(e.query))throw TypeError(".google.firestore.v1beta1.Target.query: object expected");r.query=f.google.firestore.v1beta1.Target.QueryTarget.fromObject(e.query,t+1)}if(null!=e.documents){if(!p.isObject(e.documents))throw TypeError(".google.firestore.v1beta1.Target.documents: object expected");r.documents=f.google.firestore.v1beta1.Target.DocumentsTarget.fromObject(e.documents,t+1)}if(null!=e.resumeToken&&("string"==typeof e.resumeToken?p.base64.decode(e.resumeToken,r.resumeToken=p.newBuffer(p.base64.length(e.resumeToken)),0):0<=e.resumeToken.length&&(r.resumeToken=e.resumeToken)),null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1beta1.Target.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return null!=e.targetId&&(r.targetId=0|e.targetId),null!=e.once&&(r.once=Boolean(e.once)),r},k.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.targetId=0,o.once=!1),null!=e.query&&Object.hasOwnProperty.call(e,"query")&&(o.query=f.google.firestore.v1beta1.Target.QueryTarget.toObject(e.query,t,r+1),t.oneofs)&&(o.targetType="query"),null!=e.documents&&Object.hasOwnProperty.call(e,"documents")&&(o.documents=f.google.firestore.v1beta1.Target.DocumentsTarget.toObject(e.documents,t,r+1),t.oneofs)&&(o.targetType="documents"),null!=e.resumeToken&&Object.hasOwnProperty.call(e,"resumeToken")&&(o.resumeToken=t.bytes===String?p.base64.encode(e.resumeToken,0,e.resumeToken.length):t.bytes===Array?Array.prototype.slice.call(e.resumeToken):e.resumeToken,t.oneofs)&&(o.resumeType="resumeToken"),null!=e.targetId&&Object.hasOwnProperty.call(e,"targetId")&&(o.targetId=e.targetId),null!=e.once&&Object.hasOwnProperty.call(e,"once")&&(o.once=e.once),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1),t.oneofs)&&(o.resumeType="readTime"),o},k.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},k.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.Target"},k.DocumentsTarget=($r.prototype.documents=p.emptyArray,$r.create=function(e){return new $r(e)},$r.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.documents&&e.documents.length)for(var o=0;o<e.documents.length;++o)t.uint32(18).string(e.documents[o]);return t},$r.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},$r.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.Target.DocumentsTarget;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==2?(i.documents&&i.documents.length||(i.documents=[]),i.documents.push(e.string())):e.skipType(7&a,o)}return i},$r.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},$r.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.documents&&Object.hasOwnProperty.call(e,"documents")){if(!Array.isArray(e.documents))return"documents: array expected";for(var r=0;r<e.documents.length;++r)if(!p.isString(e.documents[r]))return"documents: string[] expected"}return null},$r.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.Target.DocumentsTarget)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.Target.DocumentsTarget: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.Target.DocumentsTarget;if(e.documents){if(!Array.isArray(e.documents))throw TypeError(".google.firestore.v1beta1.Target.DocumentsTarget.documents: array expected");r.documents=[];for(var o=0;o<e.documents.length;++o)r.documents[o]=String(e.documents[o])}return r},$r.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.documents=[]),e.documents&&e.documents.length){o.documents=[];for(var n=0;n<e.documents.length;++n)o.documents[n]=e.documents[n]}return o},$r.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},$r.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.Target.DocumentsTarget"},$r),k.QueryTarget=(eo.prototype.parent="",eo.prototype.structuredQuery=null,Object.defineProperty(eo.prototype,"queryType",{get:p.oneOfGetter(e=["structuredQuery"]),set:p.oneOfSetter(e)}),eo.create=function(e){return new eo(e)},eo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&f.google.firestore.v1beta1.StructuredQuery.encode(e.structuredQuery,t.uint32(18).fork(),r+1).ldelim(),t},eo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},eo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.Target.QueryTarget;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.structuredQuery=f.google.firestore.v1beta1.StructuredQuery.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},eo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},eo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent))return"parent: string expected";if(null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")){e=f.google.firestore.v1beta1.StructuredQuery.verify(e.structuredQuery,t+1);if(e)return"structuredQuery."+e}return null},eo.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.Target.QueryTarget)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.Target.QueryTarget: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.Target.QueryTarget;if(null!=e.parent&&(r.parent=String(e.parent)),null!=e.structuredQuery){if(!p.isObject(e.structuredQuery))throw TypeError(".google.firestore.v1beta1.Target.QueryTarget.structuredQuery: object expected");r.structuredQuery=f.google.firestore.v1beta1.StructuredQuery.fromObject(e.structuredQuery,t+1)}return r},eo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.parent=""),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(o.parent=e.parent),null!=e.structuredQuery&&Object.hasOwnProperty.call(e,"structuredQuery")&&(o.structuredQuery=f.google.firestore.v1beta1.StructuredQuery.toObject(e.structuredQuery,t,r+1),t.oneofs)&&(o.queryType="structuredQuery"),o},eo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},eo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.Target.QueryTarget"},eo),k),r.TargetChange=(to.prototype.targetChangeType=0,to.prototype.targetIds=p.emptyArray,to.prototype.cause=null,to.prototype.resumeToken=p.newBuffer([]),to.prototype.readTime=null,to.create=function(e){return new to(e)},to.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.targetChangeType&&Object.hasOwnProperty.call(e,"targetChangeType")&&t.uint32(8).int32(e.targetChangeType),null!=e.targetIds&&e.targetIds.length){t.uint32(18).fork();for(var o=0;o<e.targetIds.length;++o)t.int32(e.targetIds[o]);t.ldelim()}return null!=e.cause&&Object.hasOwnProperty.call(e,"cause")&&f.google.rpc.Status.encode(e.cause,t.uint32(26).fork(),r+1).ldelim(),null!=e.resumeToken&&Object.hasOwnProperty.call(e,"resumeToken")&&t.uint32(34).bytes(e.resumeToken),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(50).fork(),r+1).ldelim(),t},to.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},to.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.TargetChange;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.targetChangeType=e.int32();break;case 2:if(i.targetIds&&i.targetIds.length||(i.targetIds=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.targetIds.push(e.int32());else i.targetIds.push(e.int32());break;case 3:i.cause=f.google.rpc.Status.decode(e,e.uint32(),void 0,o+1);break;case 4:i.resumeToken=e.bytes();break;case 6:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},to.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},to.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.targetChangeType&&Object.hasOwnProperty.call(e,"targetChangeType"))switch(e.targetChangeType){default:return"targetChangeType: enum value expected";case 0:case 1:case 2:case 3:case 4:}if(null!=e.targetIds&&Object.hasOwnProperty.call(e,"targetIds")){if(!Array.isArray(e.targetIds))return"targetIds: array expected";for(var r=0;r<e.targetIds.length;++r)if(!p.isInteger(e.targetIds[r]))return"targetIds: integer[] expected"}var o;if(null!=e.cause&&Object.hasOwnProperty.call(e,"cause")&&(o=f.google.rpc.Status.verify(e.cause,t+1)))return"cause."+o;if(null!=e.resumeToken&&Object.hasOwnProperty.call(e,"resumeToken")&&!(e.resumeToken&&"number"==typeof e.resumeToken.length||p.isString(e.resumeToken)))return"resumeToken: buffer expected";if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o=f.google.protobuf.Timestamp.verify(e.readTime,t+1)))return"readTime."+o;return null},to.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.TargetChange)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.TargetChange: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.TargetChange;switch(e.targetChangeType){default:"number"==typeof e.targetChangeType&&(r.targetChangeType=e.targetChangeType);break;case"NO_CHANGE":case 0:r.targetChangeType=0;break;case"ADD":case 1:r.targetChangeType=1;break;case"REMOVE":case 2:r.targetChangeType=2;break;case"CURRENT":case 3:r.targetChangeType=3;break;case"RESET":case 4:r.targetChangeType=4}if(e.targetIds){if(!Array.isArray(e.targetIds))throw TypeError(".google.firestore.v1beta1.TargetChange.targetIds: array expected");r.targetIds=[];for(var o=0;o<e.targetIds.length;++o)r.targetIds[o]=0|e.targetIds[o]}if(null!=e.cause){if(!p.isObject(e.cause))throw TypeError(".google.firestore.v1beta1.TargetChange.cause: object expected");r.cause=f.google.rpc.Status.fromObject(e.cause,t+1)}if(null!=e.resumeToken&&("string"==typeof e.resumeToken?p.base64.decode(e.resumeToken,r.resumeToken=p.newBuffer(p.base64.length(e.resumeToken)),0):0<=e.resumeToken.length&&(r.resumeToken=e.resumeToken)),null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1beta1.TargetChange.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},to.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.targetIds=[]),t.defaults&&(o.targetChangeType=t.enums===String?"NO_CHANGE":0,o.cause=null,t.bytes===String?o.resumeToken="":(o.resumeToken=[],t.bytes!==Array&&(o.resumeToken=p.newBuffer(o.resumeToken))),o.readTime=null),null!=e.targetChangeType&&Object.hasOwnProperty.call(e,"targetChangeType")&&(o.targetChangeType=t.enums!==String||void 0===f.google.firestore.v1beta1.TargetChange.TargetChangeType[e.targetChangeType]?e.targetChangeType:f.google.firestore.v1beta1.TargetChange.TargetChangeType[e.targetChangeType]),e.targetIds&&e.targetIds.length){o.targetIds=[];for(var n=0;n<e.targetIds.length;++n)o.targetIds[n]=e.targetIds[n]}return null!=e.cause&&Object.hasOwnProperty.call(e,"cause")&&(o.cause=f.google.rpc.Status.toObject(e.cause,t,r+1)),null!=e.resumeToken&&Object.hasOwnProperty.call(e,"resumeToken")&&(o.resumeToken=t.bytes===String?p.base64.encode(e.resumeToken,0,e.resumeToken.length):t.bytes===Array?Array.prototype.slice.call(e.resumeToken):e.resumeToken),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1)),o},to.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},to.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.TargetChange"},to.TargetChangeType=(e={},(t=Object.create(e))[e[0]="NO_CHANGE"]=0,t[e[1]="ADD"]=1,t[e[2]="REMOVE"]=2,t[e[3]="CURRENT"]=3,t[e[4]="RESET"]=4,t),to),r.ListCollectionIdsRequest=(ro.prototype.parent="",ro.prototype.pageSize=0,ro.prototype.pageToken="",ro.create=function(e){return new ro(e)},ro.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&t.uint32(16).int32(e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&t.uint32(26).string(e.pageToken),t},ro.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ro.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.ListCollectionIdsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.parent=e.string();break;case 2:i.pageSize=e.int32();break;case 3:i.pageToken=e.string();break;default:e.skipType(7&a,o)}}return i},ro.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ro.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&!p.isString(e.parent)?"parent: string expected":null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&!p.isInteger(e.pageSize)?"pageSize: integer expected":null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&!p.isString(e.pageToken)?"pageToken: string expected":null},ro.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.ListCollectionIdsRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.ListCollectionIdsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.v1beta1.ListCollectionIdsRequest;return null!=e.parent&&(t.parent=String(e.parent)),null!=e.pageSize&&(t.pageSize=0|e.pageSize),null!=e.pageToken&&(t.pageToken=String(e.pageToken)),t},ro.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.parent="",r.pageSize=0,r.pageToken=""),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&(r.parent=e.parent),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&(r.pageSize=e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&(r.pageToken=e.pageToken),r},ro.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ro.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.ListCollectionIdsRequest"},ro),r.ListCollectionIdsResponse=(oo.prototype.collectionIds=p.emptyArray,oo.prototype.nextPageToken="",oo.create=function(e){return new oo(e)},oo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.collectionIds&&e.collectionIds.length)for(var o=0;o<e.collectionIds.length;++o)t.uint32(10).string(e.collectionIds[o]);return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(18).string(e.nextPageToken),t},oo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},oo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.ListCollectionIdsResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.collectionIds&&i.collectionIds.length||(i.collectionIds=[]),i.collectionIds.push(e.string());break;case 2:i.nextPageToken=e.string();break;default:e.skipType(7&a,o)}}return i},oo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},oo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.collectionIds&&Object.hasOwnProperty.call(e,"collectionIds")){if(!Array.isArray(e.collectionIds))return"collectionIds: array expected";for(var r=0;r<e.collectionIds.length;++r)if(!p.isString(e.collectionIds[r]))return"collectionIds: string[] expected"}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&!p.isString(e.nextPageToken)?"nextPageToken: string expected":null},oo.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.ListCollectionIdsResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.ListCollectionIdsResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.ListCollectionIdsResponse;if(e.collectionIds){if(!Array.isArray(e.collectionIds))throw TypeError(".google.firestore.v1beta1.ListCollectionIdsResponse.collectionIds: array expected");r.collectionIds=[];for(var o=0;o<e.collectionIds.length;++o)r.collectionIds[o]=String(e.collectionIds[o])}return null!=e.nextPageToken&&(r.nextPageToken=String(e.nextPageToken)),r},oo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.collectionIds=[]),t.defaults&&(o.nextPageToken=""),e.collectionIds&&e.collectionIds.length){o.collectionIds=[];for(var n=0;n<e.collectionIds.length;++n)o.collectionIds[n]=e.collectionIds[n]}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&(o.nextPageToken=e.nextPageToken),o},oo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},oo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.ListCollectionIdsResponse"},oo),r.BatchWriteRequest=(no.prototype.database="",no.prototype.writes=p.emptyArray,no.prototype.labels=p.emptyObject,no.create=function(e){return new no(e)},no.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&t.uint32(10).string(e.database),null!=e.writes&&e.writes.length)for(var o=0;o<e.writes.length;++o)f.google.firestore.v1beta1.Write.encode(e.writes[o],t.uint32(18).fork(),r+1).ldelim();if(null!=e.labels&&Object.hasOwnProperty.call(e,"labels"))for(var n=Object.keys(e.labels),o=0;o<n.length;++o)t.uint32(26).fork().uint32(10).string(n[o]).uint32(18).string(e.labels[n[o]]).ldelim();return t},no.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},no.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.BatchWriteRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.database=e.string();break;case 2:i.writes&&i.writes.length||(i.writes=[]),i.writes.push(f.google.firestore.v1beta1.Write.decode(e,e.uint32(),void 0,o+1));break;case 3:i.labels===p.emptyObject&&(i.labels={});for(var s=e.uint32()+e.pos,l="",c="";e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=e.string();break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.labels,l),i.labels[l]=c;break;default:e.skipType(7&a,o)}}return i},no.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},no.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.database&&Object.hasOwnProperty.call(e,"database")&&!p.isString(e.database))return"database: string expected";if(null!=e.writes&&Object.hasOwnProperty.call(e,"writes")){if(!Array.isArray(e.writes))return"writes: array expected";for(var r=0;r<e.writes.length;++r){var o=f.google.firestore.v1beta1.Write.verify(e.writes[r],t+1);if(o)return"writes."+o}}if(null!=e.labels&&Object.hasOwnProperty.call(e,"labels")){if(!p.isObject(e.labels))return"labels: object expected";for(var n=Object.keys(e.labels),r=0;r<n.length;++r)if(!p.isString(e.labels[n[r]]))return"labels: string{k:string} expected"}return null},no.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.BatchWriteRequest)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.BatchWriteRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.BatchWriteRequest;if(null!=e.database&&(r.database=String(e.database)),e.writes){if(!Array.isArray(e.writes))throw TypeError(".google.firestore.v1beta1.BatchWriteRequest.writes: array expected");r.writes=[];for(var o=0;o<e.writes.length;++o){if(!p.isObject(e.writes[o]))throw TypeError(".google.firestore.v1beta1.BatchWriteRequest.writes: object expected");r.writes[o]=f.google.firestore.v1beta1.Write.fromObject(e.writes[o],t+1)}}if(e.labels){if(!p.isObject(e.labels))throw TypeError(".google.firestore.v1beta1.BatchWriteRequest.labels: object expected");r.labels={};for(var n=Object.keys(e.labels),o=0;o<n.length;++o)"__proto__"===n[o]&&p.makeProp(r.labels,n[o]),r.labels[n[o]]=String(e.labels[n[o]])}return r},no.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.arrays||t.defaults)&&(n.writes=[]),(t.objects||t.defaults)&&(n.labels={}),t.defaults&&(n.database=""),null!=e.database&&Object.hasOwnProperty.call(e,"database")&&(n.database=e.database),e.writes&&e.writes.length){n.writes=[];for(var i=0;i<e.writes.length;++i)n.writes[i]=f.google.firestore.v1beta1.Write.toObject(e.writes[i],t,r+1)}if(e.labels&&(o=Object.keys(e.labels)).length){n.labels={};for(i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.labels,o[i]),n.labels[o[i]]=e.labels[o[i]]}return n},no.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},no.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.BatchWriteRequest"},no),r.BatchWriteResponse=(io.prototype.writeResults=p.emptyArray,io.prototype.status=p.emptyArray,io.create=function(e){return new io(e)},io.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.writeResults&&e.writeResults.length)for(var o=0;o<e.writeResults.length;++o)f.google.firestore.v1beta1.WriteResult.encode(e.writeResults[o],t.uint32(10).fork(),r+1).ldelim();if(null!=e.status&&e.status.length)for(o=0;o<e.status.length;++o)f.google.rpc.Status.encode(e.status[o],t.uint32(18).fork(),r+1).ldelim();return t},io.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},io.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.BatchWriteResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.writeResults&&i.writeResults.length||(i.writeResults=[]),i.writeResults.push(f.google.firestore.v1beta1.WriteResult.decode(e,e.uint32(),void 0,o+1));break;case 2:i.status&&i.status.length||(i.status=[]),i.status.push(f.google.rpc.Status.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},io.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},io.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.writeResults&&Object.hasOwnProperty.call(e,"writeResults")){if(!Array.isArray(e.writeResults))return"writeResults: array expected";for(var r=0;r<e.writeResults.length;++r)if(o=f.google.firestore.v1beta1.WriteResult.verify(e.writeResults[r],t+1))return"writeResults."+o}if(null!=e.status&&Object.hasOwnProperty.call(e,"status")){if(!Array.isArray(e.status))return"status: array expected";for(var o,r=0;r<e.status.length;++r)if(o=f.google.rpc.Status.verify(e.status[r],t+1))return"status."+o}return null},io.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.BatchWriteResponse)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.BatchWriteResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.BatchWriteResponse;if(e.writeResults){if(!Array.isArray(e.writeResults))throw TypeError(".google.firestore.v1beta1.BatchWriteResponse.writeResults: array expected");r.writeResults=[];for(var o=0;o<e.writeResults.length;++o){if(!p.isObject(e.writeResults[o]))throw TypeError(".google.firestore.v1beta1.BatchWriteResponse.writeResults: object expected");r.writeResults[o]=f.google.firestore.v1beta1.WriteResult.fromObject(e.writeResults[o],t+1)}}if(e.status){if(!Array.isArray(e.status))throw TypeError(".google.firestore.v1beta1.BatchWriteResponse.status: array expected");r.status=[];for(o=0;o<e.status.length;++o){if(!p.isObject(e.status[o]))throw TypeError(".google.firestore.v1beta1.BatchWriteResponse.status: object expected");r.status[o]=f.google.rpc.Status.fromObject(e.status[o],t+1)}}return r},io.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.writeResults=[],o.status=[]),e.writeResults&&e.writeResults.length){o.writeResults=[];for(var n=0;n<e.writeResults.length;++n)o.writeResults[n]=f.google.firestore.v1beta1.WriteResult.toObject(e.writeResults[n],t,r+1)}if(e.status&&e.status.length){o.status=[];for(n=0;n<e.status.length;++n)o.status[n]=f.google.rpc.Status.toObject(e.status[n],t,r+1)}return o},io.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},io.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.BatchWriteResponse"},io),r.StructuredQuery=(S.prototype.select=null,S.prototype.from=p.emptyArray,S.prototype.where=null,S.prototype.orderBy=p.emptyArray,S.prototype.startAt=null,S.prototype.endAt=null,S.prototype.offset=0,S.prototype.limit=null,S.create=function(e){return new S(e)},S.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.select&&Object.hasOwnProperty.call(e,"select")&&f.google.firestore.v1beta1.StructuredQuery.Projection.encode(e.select,t.uint32(10).fork(),r+1).ldelim(),null!=e.from&&e.from.length)for(var o=0;o<e.from.length;++o)f.google.firestore.v1beta1.StructuredQuery.CollectionSelector.encode(e.from[o],t.uint32(18).fork(),r+1).ldelim();if(null!=e.where&&Object.hasOwnProperty.call(e,"where")&&f.google.firestore.v1beta1.StructuredQuery.Filter.encode(e.where,t.uint32(26).fork(),r+1).ldelim(),null!=e.orderBy&&e.orderBy.length)for(o=0;o<e.orderBy.length;++o)f.google.firestore.v1beta1.StructuredQuery.Order.encode(e.orderBy[o],t.uint32(34).fork(),r+1).ldelim();return null!=e.limit&&Object.hasOwnProperty.call(e,"limit")&&f.google.protobuf.Int32Value.encode(e.limit,t.uint32(42).fork(),r+1).ldelim(),null!=e.offset&&Object.hasOwnProperty.call(e,"offset")&&t.uint32(48).int32(e.offset),null!=e.startAt&&Object.hasOwnProperty.call(e,"startAt")&&f.google.firestore.v1beta1.Cursor.encode(e.startAt,t.uint32(58).fork(),r+1).ldelim(),null!=e.endAt&&Object.hasOwnProperty.call(e,"endAt")&&f.google.firestore.v1beta1.Cursor.encode(e.endAt,t.uint32(66).fork(),r+1).ldelim(),t},S.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},S.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.StructuredQuery;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.select=f.google.firestore.v1beta1.StructuredQuery.Projection.decode(e,e.uint32(),void 0,o+1);break;case 2:i.from&&i.from.length||(i.from=[]),i.from.push(f.google.firestore.v1beta1.StructuredQuery.CollectionSelector.decode(e,e.uint32(),void 0,o+1));break;case 3:i.where=f.google.firestore.v1beta1.StructuredQuery.Filter.decode(e,e.uint32(),void 0,o+1);break;case 4:i.orderBy&&i.orderBy.length||(i.orderBy=[]),i.orderBy.push(f.google.firestore.v1beta1.StructuredQuery.Order.decode(e,e.uint32(),void 0,o+1));break;case 7:i.startAt=f.google.firestore.v1beta1.Cursor.decode(e,e.uint32(),void 0,o+1);break;case 8:i.endAt=f.google.firestore.v1beta1.Cursor.decode(e,e.uint32(),void 0,o+1);break;case 6:i.offset=e.int32();break;case 5:i.limit=f.google.protobuf.Int32Value.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},S.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},S.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.select&&Object.hasOwnProperty.call(e,"select")&&(o=f.google.firestore.v1beta1.StructuredQuery.Projection.verify(e.select,t+1)))return"select."+o;if(null!=e.from&&Object.hasOwnProperty.call(e,"from")){if(!Array.isArray(e.from))return"from: array expected";for(var r=0;r<e.from.length;++r)if(o=f.google.firestore.v1beta1.StructuredQuery.CollectionSelector.verify(e.from[r],t+1))return"from."+o}if(null!=e.where&&Object.hasOwnProperty.call(e,"where")&&(o=f.google.firestore.v1beta1.StructuredQuery.Filter.verify(e.where,t+1)))return"where."+o;if(null!=e.orderBy&&Object.hasOwnProperty.call(e,"orderBy")){if(!Array.isArray(e.orderBy))return"orderBy: array expected";for(var o,r=0;r<e.orderBy.length;++r)if(o=f.google.firestore.v1beta1.StructuredQuery.Order.verify(e.orderBy[r],t+1))return"orderBy."+o}if(null!=e.startAt&&Object.hasOwnProperty.call(e,"startAt")&&(o=f.google.firestore.v1beta1.Cursor.verify(e.startAt,t+1)))return"startAt."+o;if(null!=e.endAt&&Object.hasOwnProperty.call(e,"endAt")&&(o=f.google.firestore.v1beta1.Cursor.verify(e.endAt,t+1)))return"endAt."+o;if(null!=e.offset&&Object.hasOwnProperty.call(e,"offset")&&!p.isInteger(e.offset))return"offset: integer expected";if(null!=e.limit&&Object.hasOwnProperty.call(e,"limit")&&(o=f.google.protobuf.Int32Value.verify(e.limit,t+1)))return"limit."+o;return null},S.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.StructuredQuery)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.StructuredQuery: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.StructuredQuery;if(null!=e.select){if(!p.isObject(e.select))throw TypeError(".google.firestore.v1beta1.StructuredQuery.select: object expected");r.select=f.google.firestore.v1beta1.StructuredQuery.Projection.fromObject(e.select,t+1)}if(e.from){if(!Array.isArray(e.from))throw TypeError(".google.firestore.v1beta1.StructuredQuery.from: array expected");r.from=[];for(var o=0;o<e.from.length;++o){if(!p.isObject(e.from[o]))throw TypeError(".google.firestore.v1beta1.StructuredQuery.from: object expected");r.from[o]=f.google.firestore.v1beta1.StructuredQuery.CollectionSelector.fromObject(e.from[o],t+1)}}if(null!=e.where){if(!p.isObject(e.where))throw TypeError(".google.firestore.v1beta1.StructuredQuery.where: object expected");r.where=f.google.firestore.v1beta1.StructuredQuery.Filter.fromObject(e.where,t+1)}if(e.orderBy){if(!Array.isArray(e.orderBy))throw TypeError(".google.firestore.v1beta1.StructuredQuery.orderBy: array expected");r.orderBy=[];for(o=0;o<e.orderBy.length;++o){if(!p.isObject(e.orderBy[o]))throw TypeError(".google.firestore.v1beta1.StructuredQuery.orderBy: object expected");r.orderBy[o]=f.google.firestore.v1beta1.StructuredQuery.Order.fromObject(e.orderBy[o],t+1)}}if(null!=e.startAt){if(!p.isObject(e.startAt))throw TypeError(".google.firestore.v1beta1.StructuredQuery.startAt: object expected");r.startAt=f.google.firestore.v1beta1.Cursor.fromObject(e.startAt,t+1)}if(null!=e.endAt){if(!p.isObject(e.endAt))throw TypeError(".google.firestore.v1beta1.StructuredQuery.endAt: object expected");r.endAt=f.google.firestore.v1beta1.Cursor.fromObject(e.endAt,t+1)}if(null!=e.offset&&(r.offset=0|e.offset),null!=e.limit){if(!p.isObject(e.limit))throw TypeError(".google.firestore.v1beta1.StructuredQuery.limit: object expected");r.limit=f.google.protobuf.Int32Value.fromObject(e.limit,t+1)}return r},S.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.from=[],o.orderBy=[]),t.defaults&&(o.select=null,o.where=null,o.limit=null,o.offset=0,o.startAt=null,o.endAt=null),null!=e.select&&Object.hasOwnProperty.call(e,"select")&&(o.select=f.google.firestore.v1beta1.StructuredQuery.Projection.toObject(e.select,t,r+1)),e.from&&e.from.length){o.from=[];for(var n=0;n<e.from.length;++n)o.from[n]=f.google.firestore.v1beta1.StructuredQuery.CollectionSelector.toObject(e.from[n],t,r+1)}if(null!=e.where&&Object.hasOwnProperty.call(e,"where")&&(o.where=f.google.firestore.v1beta1.StructuredQuery.Filter.toObject(e.where,t,r+1)),e.orderBy&&e.orderBy.length){o.orderBy=[];for(n=0;n<e.orderBy.length;++n)o.orderBy[n]=f.google.firestore.v1beta1.StructuredQuery.Order.toObject(e.orderBy[n],t,r+1)}return null!=e.limit&&Object.hasOwnProperty.call(e,"limit")&&(o.limit=f.google.protobuf.Int32Value.toObject(e.limit,t,r+1)),null!=e.offset&&Object.hasOwnProperty.call(e,"offset")&&(o.offset=e.offset),null!=e.startAt&&Object.hasOwnProperty.call(e,"startAt")&&(o.startAt=f.google.firestore.v1beta1.Cursor.toObject(e.startAt,t,r+1)),null!=e.endAt&&Object.hasOwnProperty.call(e,"endAt")&&(o.endAt=f.google.firestore.v1beta1.Cursor.toObject(e.endAt,t,r+1)),o},S.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},S.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.StructuredQuery"},S.CollectionSelector=(ao.prototype.collectionId="",ao.prototype.allDescendants=!1,ao.create=function(e){return new ao(e)},ao.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&t.uint32(18).string(e.collectionId),null!=e.allDescendants&&Object.hasOwnProperty.call(e,"allDescendants")&&t.uint32(24).bool(e.allDescendants),t},ao.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ao.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.StructuredQuery.CollectionSelector;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 2:i.collectionId=e.string();break;case 3:i.allDescendants=e.bool();break;default:e.skipType(7&a,o)}}return i},ao.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ao.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&!p.isString(e.collectionId)?"collectionId: string expected":null!=e.allDescendants&&Object.hasOwnProperty.call(e,"allDescendants")&&"boolean"!=typeof e.allDescendants?"allDescendants: boolean expected":null},ao.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.StructuredQuery.CollectionSelector)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.StructuredQuery.CollectionSelector: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.v1beta1.StructuredQuery.CollectionSelector;return null!=e.collectionId&&(t.collectionId=String(e.collectionId)),null!=e.allDescendants&&(t.allDescendants=Boolean(e.allDescendants)),t},ao.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.collectionId="",r.allDescendants=!1),null!=e.collectionId&&Object.hasOwnProperty.call(e,"collectionId")&&(r.collectionId=e.collectionId),null!=e.allDescendants&&Object.hasOwnProperty.call(e,"allDescendants")&&(r.allDescendants=e.allDescendants),r},ao.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ao.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.StructuredQuery.CollectionSelector"},ao),S.Filter=(so.prototype.compositeFilter=null,so.prototype.fieldFilter=null,so.prototype.unaryFilter=null,Object.defineProperty(so.prototype,"filterType",{get:p.oneOfGetter(e=["compositeFilter","fieldFilter","unaryFilter"]),set:p.oneOfSetter(e)}),so.create=function(e){return new so(e)},so.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.compositeFilter&&Object.hasOwnProperty.call(e,"compositeFilter")&&f.google.firestore.v1beta1.StructuredQuery.CompositeFilter.encode(e.compositeFilter,t.uint32(10).fork(),r+1).ldelim(),null!=e.fieldFilter&&Object.hasOwnProperty.call(e,"fieldFilter")&&f.google.firestore.v1beta1.StructuredQuery.FieldFilter.encode(e.fieldFilter,t.uint32(18).fork(),r+1).ldelim(),null!=e.unaryFilter&&Object.hasOwnProperty.call(e,"unaryFilter")&&f.google.firestore.v1beta1.StructuredQuery.UnaryFilter.encode(e.unaryFilter,t.uint32(26).fork(),r+1).ldelim(),t},so.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},so.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.StructuredQuery.Filter;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.compositeFilter=f.google.firestore.v1beta1.StructuredQuery.CompositeFilter.decode(e,e.uint32(),void 0,o+1);break;case 2:i.fieldFilter=f.google.firestore.v1beta1.StructuredQuery.FieldFilter.decode(e,e.uint32(),void 0,o+1);break;case 3:i.unaryFilter=f.google.firestore.v1beta1.StructuredQuery.UnaryFilter.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},so.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},so.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.compositeFilter&&Object.hasOwnProperty.call(e,"compositeFilter")&&(r=f.google.firestore.v1beta1.StructuredQuery.CompositeFilter.verify(e.compositeFilter,t+(o.filterType=1))))return"compositeFilter."+r;if(null!=e.fieldFilter&&Object.hasOwnProperty.call(e,"fieldFilter")){if(1===o.filterType)return"filterType: multiple values";if(r=f.google.firestore.v1beta1.StructuredQuery.FieldFilter.verify(e.fieldFilter,t+(o.filterType=1)))return"fieldFilter."+r}if(null!=e.unaryFilter&&Object.hasOwnProperty.call(e,"unaryFilter")){if(1===o.filterType)return"filterType: multiple values";if(r=f.google.firestore.v1beta1.StructuredQuery.UnaryFilter.verify(e.unaryFilter,t+(o.filterType=1)))return"unaryFilter."+r}return null},so.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.StructuredQuery.Filter)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.StructuredQuery.Filter: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.StructuredQuery.Filter;if(null!=e.compositeFilter){if(!p.isObject(e.compositeFilter))throw TypeError(".google.firestore.v1beta1.StructuredQuery.Filter.compositeFilter: object expected");r.compositeFilter=f.google.firestore.v1beta1.StructuredQuery.CompositeFilter.fromObject(e.compositeFilter,t+1)}if(null!=e.fieldFilter){if(!p.isObject(e.fieldFilter))throw TypeError(".google.firestore.v1beta1.StructuredQuery.Filter.fieldFilter: object expected");r.fieldFilter=f.google.firestore.v1beta1.StructuredQuery.FieldFilter.fromObject(e.fieldFilter,t+1)}if(null!=e.unaryFilter){if(!p.isObject(e.unaryFilter))throw TypeError(".google.firestore.v1beta1.StructuredQuery.Filter.unaryFilter: object expected");r.unaryFilter=f.google.firestore.v1beta1.StructuredQuery.UnaryFilter.fromObject(e.unaryFilter,t+1)}return r},so.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return null!=e.compositeFilter&&Object.hasOwnProperty.call(e,"compositeFilter")&&(o.compositeFilter=f.google.firestore.v1beta1.StructuredQuery.CompositeFilter.toObject(e.compositeFilter,t,r+1),t.oneofs)&&(o.filterType="compositeFilter"),null!=e.fieldFilter&&Object.hasOwnProperty.call(e,"fieldFilter")&&(o.fieldFilter=f.google.firestore.v1beta1.StructuredQuery.FieldFilter.toObject(e.fieldFilter,t,r+1),t.oneofs)&&(o.filterType="fieldFilter"),null!=e.unaryFilter&&Object.hasOwnProperty.call(e,"unaryFilter")&&(o.unaryFilter=f.google.firestore.v1beta1.StructuredQuery.UnaryFilter.toObject(e.unaryFilter,t,r+1),t.oneofs)&&(o.filterType="unaryFilter"),o},so.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},so.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.StructuredQuery.Filter"},so),S.CompositeFilter=(lo.prototype.op=0,lo.prototype.filters=p.emptyArray,lo.create=function(e){return new lo(e)},lo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.op&&Object.hasOwnProperty.call(e,"op")&&t.uint32(8).int32(e.op),null!=e.filters&&e.filters.length)for(var o=0;o<e.filters.length;++o)f.google.firestore.v1beta1.StructuredQuery.Filter.encode(e.filters[o],t.uint32(18).fork(),r+1).ldelim();return t},lo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},lo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.StructuredQuery.CompositeFilter;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.op=e.int32();break;case 2:i.filters&&i.filters.length||(i.filters=[]),i.filters.push(f.google.firestore.v1beta1.StructuredQuery.Filter.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},lo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},lo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.op&&Object.hasOwnProperty.call(e,"op"))switch(e.op){default:return"op: enum value expected";case 0:case 1:}if(null!=e.filters&&Object.hasOwnProperty.call(e,"filters")){if(!Array.isArray(e.filters))return"filters: array expected";for(var r=0;r<e.filters.length;++r){var o=f.google.firestore.v1beta1.StructuredQuery.Filter.verify(e.filters[r],t+1);if(o)return"filters."+o}}return null},lo.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.StructuredQuery.CompositeFilter)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.StructuredQuery.CompositeFilter: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.StructuredQuery.CompositeFilter;switch(e.op){default:"number"==typeof e.op&&(r.op=e.op);break;case"OPERATOR_UNSPECIFIED":case 0:r.op=0;break;case"AND":case 1:r.op=1}if(e.filters){if(!Array.isArray(e.filters))throw TypeError(".google.firestore.v1beta1.StructuredQuery.CompositeFilter.filters: array expected");r.filters=[];for(var o=0;o<e.filters.length;++o){if(!p.isObject(e.filters[o]))throw TypeError(".google.firestore.v1beta1.StructuredQuery.CompositeFilter.filters: object expected");r.filters[o]=f.google.firestore.v1beta1.StructuredQuery.Filter.fromObject(e.filters[o],t+1)}}return r},lo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.filters=[]),t.defaults&&(o.op=t.enums===String?"OPERATOR_UNSPECIFIED":0),null!=e.op&&Object.hasOwnProperty.call(e,"op")&&(o.op=t.enums!==String||void 0===f.google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator[e.op]?e.op:f.google.firestore.v1beta1.StructuredQuery.CompositeFilter.Operator[e.op]),e.filters&&e.filters.length){o.filters=[];for(var n=0;n<e.filters.length;++n)o.filters[n]=f.google.firestore.v1beta1.StructuredQuery.Filter.toObject(e.filters[n],t,r+1)}return o},lo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},lo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.StructuredQuery.CompositeFilter"},lo.Operator=(e={},(t=Object.create(e))[e[0]="OPERATOR_UNSPECIFIED"]=0,t[e[1]="AND"]=1,t),lo),S.FieldFilter=(co.prototype.field=null,co.prototype.op=0,co.prototype.value=null,co.create=function(e){return new co(e)},co.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.field&&Object.hasOwnProperty.call(e,"field")&&f.google.firestore.v1beta1.StructuredQuery.FieldReference.encode(e.field,t.uint32(10).fork(),r+1).ldelim(),null!=e.op&&Object.hasOwnProperty.call(e,"op")&&t.uint32(16).int32(e.op),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&f.google.firestore.v1beta1.Value.encode(e.value,t.uint32(26).fork(),r+1).ldelim(),t},co.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},co.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.StructuredQuery.FieldFilter;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.field=f.google.firestore.v1beta1.StructuredQuery.FieldReference.decode(e,e.uint32(),void 0,o+1);break;case 2:i.op=e.int32();break;case 3:i.value=f.google.firestore.v1beta1.Value.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},co.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},co.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.field&&Object.hasOwnProperty.call(e,"field")&&(r=f.google.firestore.v1beta1.StructuredQuery.FieldReference.verify(e.field,t+1)))return"field."+r;if(null!=e.op&&Object.hasOwnProperty.call(e,"op"))switch(e.op){default:return"op: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:}if(null!=e.value&&Object.hasOwnProperty.call(e,"value")&&(r=f.google.firestore.v1beta1.Value.verify(e.value,t+1)))return"value."+r;return null},co.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.StructuredQuery.FieldFilter)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.StructuredQuery.FieldFilter: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.StructuredQuery.FieldFilter;if(null!=e.field){if(!p.isObject(e.field))throw TypeError(".google.firestore.v1beta1.StructuredQuery.FieldFilter.field: object expected");r.field=f.google.firestore.v1beta1.StructuredQuery.FieldReference.fromObject(e.field,t+1)}switch(e.op){default:"number"==typeof e.op&&(r.op=e.op);break;case"OPERATOR_UNSPECIFIED":case 0:r.op=0;break;case"LESS_THAN":case 1:r.op=1;break;case"LESS_THAN_OR_EQUAL":case 2:r.op=2;break;case"GREATER_THAN":case 3:r.op=3;break;case"GREATER_THAN_OR_EQUAL":case 4:r.op=4;break;case"EQUAL":case 5:r.op=5;break;case"NOT_EQUAL":case 6:r.op=6;break;case"ARRAY_CONTAINS":case 7:r.op=7;break;case"IN":case 8:r.op=8;break;case"ARRAY_CONTAINS_ANY":case 9:r.op=9;break;case"NOT_IN":case 10:r.op=10}if(null!=e.value){if(!p.isObject(e.value))throw TypeError(".google.firestore.v1beta1.StructuredQuery.FieldFilter.value: object expected");r.value=f.google.firestore.v1beta1.Value.fromObject(e.value,t+1)}return r},co.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.field=null,o.op=t.enums===String?"OPERATOR_UNSPECIFIED":0,o.value=null),null!=e.field&&Object.hasOwnProperty.call(e,"field")&&(o.field=f.google.firestore.v1beta1.StructuredQuery.FieldReference.toObject(e.field,t,r+1)),null!=e.op&&Object.hasOwnProperty.call(e,"op")&&(o.op=t.enums!==String||void 0===f.google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator[e.op]?e.op:f.google.firestore.v1beta1.StructuredQuery.FieldFilter.Operator[e.op]),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&(o.value=f.google.firestore.v1beta1.Value.toObject(e.value,t,r+1)),o},co.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},co.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.StructuredQuery.FieldFilter"},co.Operator=(e={},(t=Object.create(e))[e[0]="OPERATOR_UNSPECIFIED"]=0,t[e[1]="LESS_THAN"]=1,t[e[2]="LESS_THAN_OR_EQUAL"]=2,t[e[3]="GREATER_THAN"]=3,t[e[4]="GREATER_THAN_OR_EQUAL"]=4,t[e[5]="EQUAL"]=5,t[e[6]="NOT_EQUAL"]=6,t[e[7]="ARRAY_CONTAINS"]=7,t[e[8]="IN"]=8,t[e[9]="ARRAY_CONTAINS_ANY"]=9,t[e[10]="NOT_IN"]=10,t),co),S.UnaryFilter=(uo.prototype.op=0,uo.prototype.field=null,Object.defineProperty(uo.prototype,"operandType",{get:p.oneOfGetter(e=["field"]),set:p.oneOfSetter(e)}),uo.create=function(e){return new uo(e)},uo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.op&&Object.hasOwnProperty.call(e,"op")&&t.uint32(8).int32(e.op),null!=e.field&&Object.hasOwnProperty.call(e,"field")&&f.google.firestore.v1beta1.StructuredQuery.FieldReference.encode(e.field,t.uint32(18).fork(),r+1).ldelim(),t},uo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},uo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.StructuredQuery.UnaryFilter;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.op=e.int32();break;case 2:i.field=f.google.firestore.v1beta1.StructuredQuery.FieldReference.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},uo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},uo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.op&&Object.hasOwnProperty.call(e,"op"))switch(e.op){default:return"op: enum value expected";case 0:case 2:case 3:case 4:case 5:}if(null!=e.field&&Object.hasOwnProperty.call(e,"field")){e=f.google.firestore.v1beta1.StructuredQuery.FieldReference.verify(e.field,t+1);if(e)return"field."+e}return null},uo.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.StructuredQuery.UnaryFilter)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.StructuredQuery.UnaryFilter: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.StructuredQuery.UnaryFilter;switch(e.op){default:"number"==typeof e.op&&(r.op=e.op);break;case"OPERATOR_UNSPECIFIED":case 0:r.op=0;break;case"IS_NAN":case 2:r.op=2;break;case"IS_NULL":case 3:r.op=3;break;case"IS_NOT_NAN":case 4:r.op=4;break;case"IS_NOT_NULL":case 5:r.op=5}if(null!=e.field){if(!p.isObject(e.field))throw TypeError(".google.firestore.v1beta1.StructuredQuery.UnaryFilter.field: object expected");r.field=f.google.firestore.v1beta1.StructuredQuery.FieldReference.fromObject(e.field,t+1)}return r},uo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.op=t.enums===String?"OPERATOR_UNSPECIFIED":0),null!=e.op&&Object.hasOwnProperty.call(e,"op")&&(o.op=t.enums!==String||void 0===f.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator[e.op]?e.op:f.google.firestore.v1beta1.StructuredQuery.UnaryFilter.Operator[e.op]),null!=e.field&&Object.hasOwnProperty.call(e,"field")&&(o.field=f.google.firestore.v1beta1.StructuredQuery.FieldReference.toObject(e.field,t,r+1),t.oneofs)&&(o.operandType="field"),o},uo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},uo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.StructuredQuery.UnaryFilter"},uo.Operator=(e={},(t=Object.create(e))[e[0]="OPERATOR_UNSPECIFIED"]=0,t[e[2]="IS_NAN"]=2,t[e[3]="IS_NULL"]=3,t[e[4]="IS_NOT_NAN"]=4,t[e[5]="IS_NOT_NULL"]=5,t),uo),S.FieldReference=(po.prototype.fieldPath="",po.create=function(e){return new po(e)},po.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&t.uint32(18).string(e.fieldPath),t},po.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},po.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.StructuredQuery.FieldReference;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==2?i.fieldPath=e.string():e.skipType(7&a,o)}return i},po.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},po.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&!p.isString(e.fieldPath)?"fieldPath: string expected":null},po.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.StructuredQuery.FieldReference)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.StructuredQuery.FieldReference: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.v1beta1.StructuredQuery.FieldReference;return null!=e.fieldPath&&(t.fieldPath=String(e.fieldPath)),t},po.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.fieldPath=""),null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&(r.fieldPath=e.fieldPath),r},po.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},po.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.StructuredQuery.FieldReference"},po),S.Order=(fo.prototype.field=null,fo.prototype.direction=0,fo.create=function(e){return new fo(e)},fo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.field&&Object.hasOwnProperty.call(e,"field")&&f.google.firestore.v1beta1.StructuredQuery.FieldReference.encode(e.field,t.uint32(10).fork(),r+1).ldelim(),null!=e.direction&&Object.hasOwnProperty.call(e,"direction")&&t.uint32(16).int32(e.direction),t},fo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},fo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.StructuredQuery.Order;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.field=f.google.firestore.v1beta1.StructuredQuery.FieldReference.decode(e,e.uint32(),void 0,o+1);break;case 2:i.direction=e.int32();break;default:e.skipType(7&a,o)}}return i},fo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},fo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.field&&Object.hasOwnProperty.call(e,"field")){t=f.google.firestore.v1beta1.StructuredQuery.FieldReference.verify(e.field,t+1);if(t)return"field."+t}if(null!=e.direction&&Object.hasOwnProperty.call(e,"direction"))switch(e.direction){default:return"direction: enum value expected";case 0:case 1:case 2:}return null},fo.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.StructuredQuery.Order)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.StructuredQuery.Order: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.StructuredQuery.Order;if(null!=e.field){if(!p.isObject(e.field))throw TypeError(".google.firestore.v1beta1.StructuredQuery.Order.field: object expected");r.field=f.google.firestore.v1beta1.StructuredQuery.FieldReference.fromObject(e.field,t+1)}switch(e.direction){default:"number"==typeof e.direction&&(r.direction=e.direction);break;case"DIRECTION_UNSPECIFIED":case 0:r.direction=0;break;case"ASCENDING":case 1:r.direction=1;break;case"DESCENDING":case 2:r.direction=2}return r},fo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.field=null,o.direction=t.enums===String?"DIRECTION_UNSPECIFIED":0),null!=e.field&&Object.hasOwnProperty.call(e,"field")&&(o.field=f.google.firestore.v1beta1.StructuredQuery.FieldReference.toObject(e.field,t,r+1)),null!=e.direction&&Object.hasOwnProperty.call(e,"direction")&&(o.direction=t.enums!==String||void 0===f.google.firestore.v1beta1.StructuredQuery.Direction[e.direction]?e.direction:f.google.firestore.v1beta1.StructuredQuery.Direction[e.direction]),o},fo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},fo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.StructuredQuery.Order"},fo),S.Projection=(go.prototype.fields=p.emptyArray,go.create=function(e){return new go(e)},go.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.fields&&e.fields.length)for(var o=0;o<e.fields.length;++o)f.google.firestore.v1beta1.StructuredQuery.FieldReference.encode(e.fields[o],t.uint32(18).fork(),r+1).ldelim();return t},go.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},go.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.StructuredQuery.Projection;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==2?(i.fields&&i.fields.length||(i.fields=[]),i.fields.push(f.google.firestore.v1beta1.StructuredQuery.FieldReference.decode(e,e.uint32(),void 0,o+1))):e.skipType(7&a,o)}return i},go.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},go.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.fields&&Object.hasOwnProperty.call(e,"fields")){if(!Array.isArray(e.fields))return"fields: array expected";for(var r=0;r<e.fields.length;++r){var o=f.google.firestore.v1beta1.StructuredQuery.FieldReference.verify(e.fields[r],t+1);if(o)return"fields."+o}}return null},go.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.StructuredQuery.Projection)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.StructuredQuery.Projection: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.StructuredQuery.Projection;if(e.fields){if(!Array.isArray(e.fields))throw TypeError(".google.firestore.v1beta1.StructuredQuery.Projection.fields: array expected");r.fields=[];for(var o=0;o<e.fields.length;++o){if(!p.isObject(e.fields[o]))throw TypeError(".google.firestore.v1beta1.StructuredQuery.Projection.fields: object expected");r.fields[o]=f.google.firestore.v1beta1.StructuredQuery.FieldReference.fromObject(e.fields[o],t+1)}}return r},go.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.fields=[]),e.fields&&e.fields.length){o.fields=[];for(var n=0;n<e.fields.length;++n)o.fields[n]=f.google.firestore.v1beta1.StructuredQuery.FieldReference.toObject(e.fields[n],t,r+1)}return o},go.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},go.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.StructuredQuery.Projection"},go),S.Direction=(e={},(t=Object.create(e))[e[0]="DIRECTION_UNSPECIFIED"]=0,t[e[1]="ASCENDING"]=1,t[e[2]="DESCENDING"]=2,t),S),r.Cursor=(mo.prototype.values=p.emptyArray,mo.prototype.before=!1,mo.create=function(e){return new mo(e)},mo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.values&&e.values.length)for(var o=0;o<e.values.length;++o)f.google.firestore.v1beta1.Value.encode(e.values[o],t.uint32(10).fork(),r+1).ldelim();return null!=e.before&&Object.hasOwnProperty.call(e,"before")&&t.uint32(16).bool(e.before),t},mo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},mo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.Cursor;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.values&&i.values.length||(i.values=[]),i.values.push(f.google.firestore.v1beta1.Value.decode(e,e.uint32(),void 0,o+1));break;case 2:i.before=e.bool();break;default:e.skipType(7&a,o)}}return i},mo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},mo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.values&&Object.hasOwnProperty.call(e,"values")){if(!Array.isArray(e.values))return"values: array expected";for(var r=0;r<e.values.length;++r){var o=f.google.firestore.v1beta1.Value.verify(e.values[r],t+1);if(o)return"values."+o}}return null!=e.before&&Object.hasOwnProperty.call(e,"before")&&"boolean"!=typeof e.before?"before: boolean expected":null},mo.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.Cursor)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.Cursor: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.Cursor;if(e.values){if(!Array.isArray(e.values))throw TypeError(".google.firestore.v1beta1.Cursor.values: array expected");r.values=[];for(var o=0;o<e.values.length;++o){if(!p.isObject(e.values[o]))throw TypeError(".google.firestore.v1beta1.Cursor.values: object expected");r.values[o]=f.google.firestore.v1beta1.Value.fromObject(e.values[o],t+1)}}return null!=e.before&&(r.before=Boolean(e.before)),r},mo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.values=[]),t.defaults&&(o.before=!1),e.values&&e.values.length){o.values=[];for(var n=0;n<e.values.length;++n)o.values[n]=f.google.firestore.v1beta1.Value.toObject(e.values[n],t,r+1)}return null!=e.before&&Object.hasOwnProperty.call(e,"before")&&(o.before=e.before),o},mo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},mo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.Cursor"},mo),r.Write=(bo.prototype.update=null,bo.prototype.delete=null,bo.prototype.transform=null,bo.prototype.updateMask=null,bo.prototype.updateTransforms=p.emptyArray,bo.prototype.currentDocument=null,Object.defineProperty(bo.prototype,"operation",{get:p.oneOfGetter(e=["update","delete","transform"]),set:p.oneOfSetter(e)}),bo.create=function(e){return new bo(e)},bo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.update&&Object.hasOwnProperty.call(e,"update")&&f.google.firestore.v1beta1.Document.encode(e.update,t.uint32(10).fork(),r+1).ldelim(),null!=e.delete&&Object.hasOwnProperty.call(e,"delete")&&t.uint32(18).string(e.delete),null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&f.google.firestore.v1beta1.DocumentMask.encode(e.updateMask,t.uint32(26).fork(),r+1).ldelim(),null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&f.google.firestore.v1beta1.Precondition.encode(e.currentDocument,t.uint32(34).fork(),r+1).ldelim(),null!=e.transform&&Object.hasOwnProperty.call(e,"transform")&&f.google.firestore.v1beta1.DocumentTransform.encode(e.transform,t.uint32(50).fork(),r+1).ldelim(),null!=e.updateTransforms&&e.updateTransforms.length)for(var o=0;o<e.updateTransforms.length;++o)f.google.firestore.v1beta1.DocumentTransform.FieldTransform.encode(e.updateTransforms[o],t.uint32(58).fork(),r+1).ldelim();return t},bo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},bo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.Write;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.update=f.google.firestore.v1beta1.Document.decode(e,e.uint32(),void 0,o+1);break;case 2:i.delete=e.string();break;case 6:i.transform=f.google.firestore.v1beta1.DocumentTransform.decode(e,e.uint32(),void 0,o+1);break;case 3:i.updateMask=f.google.firestore.v1beta1.DocumentMask.decode(e,e.uint32(),void 0,o+1);break;case 7:i.updateTransforms&&i.updateTransforms.length||(i.updateTransforms=[]),i.updateTransforms.push(f.google.firestore.v1beta1.DocumentTransform.FieldTransform.decode(e,e.uint32(),void 0,o+1));break;case 4:i.currentDocument=f.google.firestore.v1beta1.Precondition.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},bo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},bo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r={};if(null!=e.update&&Object.hasOwnProperty.call(e,"update")&&(o=f.google.firestore.v1beta1.Document.verify(e.update,t+(r.operation=1))))return"update."+o;if(null!=e.delete&&Object.hasOwnProperty.call(e,"delete")){if(1===r.operation)return"operation: multiple values";if(r.operation=1,!p.isString(e.delete))return"delete: string expected"}if(null!=e.transform&&Object.hasOwnProperty.call(e,"transform")){if(1===r.operation)return"operation: multiple values";if(o=f.google.firestore.v1beta1.DocumentTransform.verify(e.transform,t+(r.operation=1)))return"transform."+o}if(null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&(o=f.google.firestore.v1beta1.DocumentMask.verify(e.updateMask,t+1)))return"updateMask."+o;if(null!=e.updateTransforms&&Object.hasOwnProperty.call(e,"updateTransforms")){if(!Array.isArray(e.updateTransforms))return"updateTransforms: array expected";for(var o,n=0;n<e.updateTransforms.length;++n)if(o=f.google.firestore.v1beta1.DocumentTransform.FieldTransform.verify(e.updateTransforms[n],t+1))return"updateTransforms."+o}if(null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&(o=f.google.firestore.v1beta1.Precondition.verify(e.currentDocument,t+1)))return"currentDocument."+o;return null},bo.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.Write)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.Write: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.Write;if(null!=e.update){if(!p.isObject(e.update))throw TypeError(".google.firestore.v1beta1.Write.update: object expected");r.update=f.google.firestore.v1beta1.Document.fromObject(e.update,t+1)}if(null!=e.delete&&(r.delete=String(e.delete)),null!=e.transform){if(!p.isObject(e.transform))throw TypeError(".google.firestore.v1beta1.Write.transform: object expected");r.transform=f.google.firestore.v1beta1.DocumentTransform.fromObject(e.transform,t+1)}if(null!=e.updateMask){if(!p.isObject(e.updateMask))throw TypeError(".google.firestore.v1beta1.Write.updateMask: object expected");r.updateMask=f.google.firestore.v1beta1.DocumentMask.fromObject(e.updateMask,t+1)}if(e.updateTransforms){if(!Array.isArray(e.updateTransforms))throw TypeError(".google.firestore.v1beta1.Write.updateTransforms: array expected");r.updateTransforms=[];for(var o=0;o<e.updateTransforms.length;++o){if(!p.isObject(e.updateTransforms[o]))throw TypeError(".google.firestore.v1beta1.Write.updateTransforms: object expected");r.updateTransforms[o]=f.google.firestore.v1beta1.DocumentTransform.FieldTransform.fromObject(e.updateTransforms[o],t+1)}}if(null!=e.currentDocument){if(!p.isObject(e.currentDocument))throw TypeError(".google.firestore.v1beta1.Write.currentDocument: object expected");r.currentDocument=f.google.firestore.v1beta1.Precondition.fromObject(e.currentDocument,t+1)}return r},bo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.updateTransforms=[]),t.defaults&&(o.updateMask=null,o.currentDocument=null),null!=e.update&&Object.hasOwnProperty.call(e,"update")&&(o.update=f.google.firestore.v1beta1.Document.toObject(e.update,t,r+1),t.oneofs)&&(o.operation="update"),null!=e.delete&&Object.hasOwnProperty.call(e,"delete")&&(o.delete=e.delete,t.oneofs)&&(o.operation="delete"),null!=e.updateMask&&Object.hasOwnProperty.call(e,"updateMask")&&(o.updateMask=f.google.firestore.v1beta1.DocumentMask.toObject(e.updateMask,t,r+1)),null!=e.currentDocument&&Object.hasOwnProperty.call(e,"currentDocument")&&(o.currentDocument=f.google.firestore.v1beta1.Precondition.toObject(e.currentDocument,t,r+1)),null!=e.transform&&Object.hasOwnProperty.call(e,"transform")&&(o.transform=f.google.firestore.v1beta1.DocumentTransform.toObject(e.transform,t,r+1),t.oneofs)&&(o.operation="transform"),e.updateTransforms&&e.updateTransforms.length){o.updateTransforms=[];for(var n=0;n<e.updateTransforms.length;++n)o.updateTransforms[n]=f.google.firestore.v1beta1.DocumentTransform.FieldTransform.toObject(e.updateTransforms[n],t,r+1)}return o},bo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},bo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.Write"},bo),r.DocumentTransform=(yo.prototype.document="",yo.prototype.fieldTransforms=p.emptyArray,yo.create=function(e){return new yo(e)},yo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&t.uint32(10).string(e.document),null!=e.fieldTransforms&&e.fieldTransforms.length)for(var o=0;o<e.fieldTransforms.length;++o)f.google.firestore.v1beta1.DocumentTransform.FieldTransform.encode(e.fieldTransforms[o],t.uint32(18).fork(),r+1).ldelim();return t},yo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},yo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.DocumentTransform;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.document=e.string();break;case 2:i.fieldTransforms&&i.fieldTransforms.length||(i.fieldTransforms=[]),i.fieldTransforms.push(f.google.firestore.v1beta1.DocumentTransform.FieldTransform.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},yo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},yo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&!p.isString(e.document))return"document: string expected";if(null!=e.fieldTransforms&&Object.hasOwnProperty.call(e,"fieldTransforms")){if(!Array.isArray(e.fieldTransforms))return"fieldTransforms: array expected";for(var r=0;r<e.fieldTransforms.length;++r){var o=f.google.firestore.v1beta1.DocumentTransform.FieldTransform.verify(e.fieldTransforms[r],t+1);if(o)return"fieldTransforms."+o}}return null},yo.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.DocumentTransform)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.DocumentTransform: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.DocumentTransform;if(null!=e.document&&(r.document=String(e.document)),e.fieldTransforms){if(!Array.isArray(e.fieldTransforms))throw TypeError(".google.firestore.v1beta1.DocumentTransform.fieldTransforms: array expected");r.fieldTransforms=[];for(var o=0;o<e.fieldTransforms.length;++o){if(!p.isObject(e.fieldTransforms[o]))throw TypeError(".google.firestore.v1beta1.DocumentTransform.fieldTransforms: object expected");r.fieldTransforms[o]=f.google.firestore.v1beta1.DocumentTransform.FieldTransform.fromObject(e.fieldTransforms[o],t+1)}}return r},yo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.fieldTransforms=[]),t.defaults&&(o.document=""),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(o.document=e.document),e.fieldTransforms&&e.fieldTransforms.length){o.fieldTransforms=[];for(var n=0;n<e.fieldTransforms.length;++n)o.fieldTransforms[n]=f.google.firestore.v1beta1.DocumentTransform.FieldTransform.toObject(e.fieldTransforms[n],t,r+1)}return o},yo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},yo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.DocumentTransform"},yo.FieldTransform=(ho.prototype.fieldPath="",ho.prototype.setToServerValue=null,ho.prototype.increment=null,ho.prototype.maximum=null,ho.prototype.minimum=null,ho.prototype.appendMissingElements=null,ho.prototype.removeAllFromArray=null,Object.defineProperty(ho.prototype,"transformType",{get:p.oneOfGetter(t=["setToServerValue","increment","maximum","minimum","appendMissingElements","removeAllFromArray"]),set:p.oneOfSetter(t)}),ho.create=function(e){return new ho(e)},ho.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&t.uint32(10).string(e.fieldPath),null!=e.setToServerValue&&Object.hasOwnProperty.call(e,"setToServerValue")&&t.uint32(16).int32(e.setToServerValue),null!=e.increment&&Object.hasOwnProperty.call(e,"increment")&&f.google.firestore.v1beta1.Value.encode(e.increment,t.uint32(26).fork(),r+1).ldelim(),null!=e.maximum&&Object.hasOwnProperty.call(e,"maximum")&&f.google.firestore.v1beta1.Value.encode(e.maximum,t.uint32(34).fork(),r+1).ldelim(),null!=e.minimum&&Object.hasOwnProperty.call(e,"minimum")&&f.google.firestore.v1beta1.Value.encode(e.minimum,t.uint32(42).fork(),r+1).ldelim(),null!=e.appendMissingElements&&Object.hasOwnProperty.call(e,"appendMissingElements")&&f.google.firestore.v1beta1.ArrayValue.encode(e.appendMissingElements,t.uint32(50).fork(),r+1).ldelim(),null!=e.removeAllFromArray&&Object.hasOwnProperty.call(e,"removeAllFromArray")&&f.google.firestore.v1beta1.ArrayValue.encode(e.removeAllFromArray,t.uint32(58).fork(),r+1).ldelim(),t},ho.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ho.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.DocumentTransform.FieldTransform;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.fieldPath=e.string();break;case 2:i.setToServerValue=e.int32();break;case 3:i.increment=f.google.firestore.v1beta1.Value.decode(e,e.uint32(),void 0,o+1);break;case 4:i.maximum=f.google.firestore.v1beta1.Value.decode(e,e.uint32(),void 0,o+1);break;case 5:i.minimum=f.google.firestore.v1beta1.Value.decode(e,e.uint32(),void 0,o+1);break;case 6:i.appendMissingElements=f.google.firestore.v1beta1.ArrayValue.decode(e,e.uint32(),void 0,o+1);break;case 7:i.removeAllFromArray=f.google.firestore.v1beta1.ArrayValue.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},ho.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ho.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&!p.isString(e.fieldPath))return"fieldPath: string expected";if(null!=e.setToServerValue&&Object.hasOwnProperty.call(e,"setToServerValue"))switch(o.transformType=1,e.setToServerValue){default:return"setToServerValue: enum value expected";case 0:case 1:}if(null!=e.increment&&Object.hasOwnProperty.call(e,"increment")){if(1===o.transformType)return"transformType: multiple values";if(r=f.google.firestore.v1beta1.Value.verify(e.increment,t+(o.transformType=1)))return"increment."+r}if(null!=e.maximum&&Object.hasOwnProperty.call(e,"maximum")){if(1===o.transformType)return"transformType: multiple values";if(r=f.google.firestore.v1beta1.Value.verify(e.maximum,t+(o.transformType=1)))return"maximum."+r}if(null!=e.minimum&&Object.hasOwnProperty.call(e,"minimum")){if(1===o.transformType)return"transformType: multiple values";if(r=f.google.firestore.v1beta1.Value.verify(e.minimum,t+(o.transformType=1)))return"minimum."+r}if(null!=e.appendMissingElements&&Object.hasOwnProperty.call(e,"appendMissingElements")){if(1===o.transformType)return"transformType: multiple values";if(r=f.google.firestore.v1beta1.ArrayValue.verify(e.appendMissingElements,t+(o.transformType=1)))return"appendMissingElements."+r}if(null!=e.removeAllFromArray&&Object.hasOwnProperty.call(e,"removeAllFromArray")){if(1===o.transformType)return"transformType: multiple values";if(r=f.google.firestore.v1beta1.ArrayValue.verify(e.removeAllFromArray,t+(o.transformType=1)))return"removeAllFromArray."+r}return null},ho.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.DocumentTransform.FieldTransform)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.DocumentTransform.FieldTransform: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.DocumentTransform.FieldTransform;switch(null!=e.fieldPath&&(r.fieldPath=String(e.fieldPath)),e.setToServerValue){default:"number"==typeof e.setToServerValue&&(r.setToServerValue=e.setToServerValue);break;case"SERVER_VALUE_UNSPECIFIED":case 0:r.setToServerValue=0;break;case"REQUEST_TIME":case 1:r.setToServerValue=1}if(null!=e.increment){if(!p.isObject(e.increment))throw TypeError(".google.firestore.v1beta1.DocumentTransform.FieldTransform.increment: object expected");r.increment=f.google.firestore.v1beta1.Value.fromObject(e.increment,t+1)}if(null!=e.maximum){if(!p.isObject(e.maximum))throw TypeError(".google.firestore.v1beta1.DocumentTransform.FieldTransform.maximum: object expected");r.maximum=f.google.firestore.v1beta1.Value.fromObject(e.maximum,t+1)}if(null!=e.minimum){if(!p.isObject(e.minimum))throw TypeError(".google.firestore.v1beta1.DocumentTransform.FieldTransform.minimum: object expected");r.minimum=f.google.firestore.v1beta1.Value.fromObject(e.minimum,t+1)}if(null!=e.appendMissingElements){if(!p.isObject(e.appendMissingElements))throw TypeError(".google.firestore.v1beta1.DocumentTransform.FieldTransform.appendMissingElements: object expected");r.appendMissingElements=f.google.firestore.v1beta1.ArrayValue.fromObject(e.appendMissingElements,t+1)}if(null!=e.removeAllFromArray){if(!p.isObject(e.removeAllFromArray))throw TypeError(".google.firestore.v1beta1.DocumentTransform.FieldTransform.removeAllFromArray: object expected");r.removeAllFromArray=f.google.firestore.v1beta1.ArrayValue.fromObject(e.removeAllFromArray,t+1)}return r},ho.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.fieldPath=""),null!=e.fieldPath&&Object.hasOwnProperty.call(e,"fieldPath")&&(o.fieldPath=e.fieldPath),null!=e.setToServerValue&&Object.hasOwnProperty.call(e,"setToServerValue")&&(o.setToServerValue=t.enums!==String||void 0===f.google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue[e.setToServerValue]?e.setToServerValue:f.google.firestore.v1beta1.DocumentTransform.FieldTransform.ServerValue[e.setToServerValue],t.oneofs)&&(o.transformType="setToServerValue"),null!=e.increment&&Object.hasOwnProperty.call(e,"increment")&&(o.increment=f.google.firestore.v1beta1.Value.toObject(e.increment,t,r+1),t.oneofs)&&(o.transformType="increment"),null!=e.maximum&&Object.hasOwnProperty.call(e,"maximum")&&(o.maximum=f.google.firestore.v1beta1.Value.toObject(e.maximum,t,r+1),t.oneofs)&&(o.transformType="maximum"),null!=e.minimum&&Object.hasOwnProperty.call(e,"minimum")&&(o.minimum=f.google.firestore.v1beta1.Value.toObject(e.minimum,t,r+1),t.oneofs)&&(o.transformType="minimum"),null!=e.appendMissingElements&&Object.hasOwnProperty.call(e,"appendMissingElements")&&(o.appendMissingElements=f.google.firestore.v1beta1.ArrayValue.toObject(e.appendMissingElements,t,r+1),t.oneofs)&&(o.transformType="appendMissingElements"),null!=e.removeAllFromArray&&Object.hasOwnProperty.call(e,"removeAllFromArray")&&(o.removeAllFromArray=f.google.firestore.v1beta1.ArrayValue.toObject(e.removeAllFromArray,t,r+1),t.oneofs)&&(o.transformType="removeAllFromArray"),o},ho.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ho.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.DocumentTransform.FieldTransform"},ho.ServerValue=(t={},(e=Object.create(t))[t[0]="SERVER_VALUE_UNSPECIFIED"]=0,e[t[1]="REQUEST_TIME"]=1,e),ho),yo),r.WriteResult=(Oo.prototype.updateTime=null,Oo.prototype.transformResults=p.emptyArray,Oo.create=function(e){return new Oo(e)},Oo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&f.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(10).fork(),r+1).ldelim(),null!=e.transformResults&&e.transformResults.length)for(var o=0;o<e.transformResults.length;++o)f.google.firestore.v1beta1.Value.encode(e.transformResults[o],t.uint32(18).fork(),r+1).ldelim();return t},Oo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Oo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.WriteResult;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.updateTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;case 2:i.transformResults&&i.transformResults.length||(i.transformResults=[]),i.transformResults.push(f.google.firestore.v1beta1.Value.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},Oo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Oo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(r=f.google.protobuf.Timestamp.verify(e.updateTime,t+1)))return"updateTime."+r;if(null!=e.transformResults&&Object.hasOwnProperty.call(e,"transformResults")){if(!Array.isArray(e.transformResults))return"transformResults: array expected";for(var r,o=0;o<e.transformResults.length;++o)if(r=f.google.firestore.v1beta1.Value.verify(e.transformResults[o],t+1))return"transformResults."+r}return null},Oo.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.WriteResult)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.WriteResult: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.WriteResult;if(null!=e.updateTime){if(!p.isObject(e.updateTime))throw TypeError(".google.firestore.v1beta1.WriteResult.updateTime: object expected");r.updateTime=f.google.protobuf.Timestamp.fromObject(e.updateTime,t+1)}if(e.transformResults){if(!Array.isArray(e.transformResults))throw TypeError(".google.firestore.v1beta1.WriteResult.transformResults: array expected");r.transformResults=[];for(var o=0;o<e.transformResults.length;++o){if(!p.isObject(e.transformResults[o]))throw TypeError(".google.firestore.v1beta1.WriteResult.transformResults: object expected");r.transformResults[o]=f.google.firestore.v1beta1.Value.fromObject(e.transformResults[o],t+1)}}return r},Oo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.transformResults=[]),t.defaults&&(o.updateTime=null),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&(o.updateTime=f.google.protobuf.Timestamp.toObject(e.updateTime,t,r+1)),e.transformResults&&e.transformResults.length){o.transformResults=[];for(var n=0;n<e.transformResults.length;++n)o.transformResults[n]=f.google.firestore.v1beta1.Value.toObject(e.transformResults[n],t,r+1)}return o},Oo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Oo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.WriteResult"},Oo),r.DocumentChange=(vo.prototype.document=null,vo.prototype.targetIds=p.emptyArray,vo.prototype.removedTargetIds=p.emptyArray,vo.create=function(e){return new vo(e)},vo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&f.google.firestore.v1beta1.Document.encode(e.document,t.uint32(10).fork(),r+1).ldelim(),null!=e.targetIds&&e.targetIds.length){t.uint32(42).fork();for(var o=0;o<e.targetIds.length;++o)t.int32(e.targetIds[o]);t.ldelim()}if(null!=e.removedTargetIds&&e.removedTargetIds.length){t.uint32(50).fork();for(o=0;o<e.removedTargetIds.length;++o)t.int32(e.removedTargetIds[o]);t.ldelim()}return t},vo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},vo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.DocumentChange;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.document=f.google.firestore.v1beta1.Document.decode(e,e.uint32(),void 0,o+1);break;case 5:if(i.targetIds&&i.targetIds.length||(i.targetIds=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.targetIds.push(e.int32());else i.targetIds.push(e.int32());break;case 6:if(i.removedTargetIds&&i.removedTargetIds.length||(i.removedTargetIds=[]),2==(7&a))for(s=e.uint32()+e.pos;e.pos<s;)i.removedTargetIds.push(e.int32());else i.removedTargetIds.push(e.int32());break;default:e.skipType(7&a,o)}}return i},vo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},vo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.document&&Object.hasOwnProperty.call(e,"document")){t=f.google.firestore.v1beta1.Document.verify(e.document,t+1);if(t)return"document."+t}if(null!=e.targetIds&&Object.hasOwnProperty.call(e,"targetIds")){if(!Array.isArray(e.targetIds))return"targetIds: array expected";for(var r=0;r<e.targetIds.length;++r)if(!p.isInteger(e.targetIds[r]))return"targetIds: integer[] expected"}if(null!=e.removedTargetIds&&Object.hasOwnProperty.call(e,"removedTargetIds")){if(!Array.isArray(e.removedTargetIds))return"removedTargetIds: array expected";for(r=0;r<e.removedTargetIds.length;++r)if(!p.isInteger(e.removedTargetIds[r]))return"removedTargetIds: integer[] expected"}return null},vo.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.DocumentChange)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.DocumentChange: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.DocumentChange;if(null!=e.document){if(!p.isObject(e.document))throw TypeError(".google.firestore.v1beta1.DocumentChange.document: object expected");r.document=f.google.firestore.v1beta1.Document.fromObject(e.document,t+1)}if(e.targetIds){if(!Array.isArray(e.targetIds))throw TypeError(".google.firestore.v1beta1.DocumentChange.targetIds: array expected");r.targetIds=[];for(var o=0;o<e.targetIds.length;++o)r.targetIds[o]=0|e.targetIds[o]}if(e.removedTargetIds){if(!Array.isArray(e.removedTargetIds))throw TypeError(".google.firestore.v1beta1.DocumentChange.removedTargetIds: array expected");r.removedTargetIds=[];for(o=0;o<e.removedTargetIds.length;++o)r.removedTargetIds[o]=0|e.removedTargetIds[o]}return r},vo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.targetIds=[],o.removedTargetIds=[]),t.defaults&&(o.document=null),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(o.document=f.google.firestore.v1beta1.Document.toObject(e.document,t,r+1)),e.targetIds&&e.targetIds.length){o.targetIds=[];for(var n=0;n<e.targetIds.length;++n)o.targetIds[n]=e.targetIds[n]}if(e.removedTargetIds&&e.removedTargetIds.length){o.removedTargetIds=[];for(n=0;n<e.removedTargetIds.length;++n)o.removedTargetIds[n]=e.removedTargetIds[n]}return o},vo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},vo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.DocumentChange"},vo),r.DocumentDelete=(jo.prototype.document="",jo.prototype.removedTargetIds=p.emptyArray,jo.prototype.readTime=null,jo.create=function(e){return new jo(e)},jo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&t.uint32(10).string(e.document),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(34).fork(),r+1).ldelim(),null!=e.removedTargetIds&&e.removedTargetIds.length){t.uint32(50).fork();for(var o=0;o<e.removedTargetIds.length;++o)t.int32(e.removedTargetIds[o]);t.ldelim()}return t},jo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},jo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.DocumentDelete;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.document=e.string();break;case 6:if(i.removedTargetIds&&i.removedTargetIds.length||(i.removedTargetIds=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.removedTargetIds.push(e.int32());else i.removedTargetIds.push(e.int32());break;case 4:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},jo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},jo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&!p.isString(e.document))return"document: string expected";if(null!=e.removedTargetIds&&Object.hasOwnProperty.call(e,"removedTargetIds")){if(!Array.isArray(e.removedTargetIds))return"removedTargetIds: array expected";for(var r=0;r<e.removedTargetIds.length;++r)if(!p.isInteger(e.removedTargetIds[r]))return"removedTargetIds: integer[] expected"}if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){t=f.google.protobuf.Timestamp.verify(e.readTime,t+1);if(t)return"readTime."+t}return null},jo.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.DocumentDelete)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.DocumentDelete: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.DocumentDelete;if(null!=e.document&&(r.document=String(e.document)),e.removedTargetIds){if(!Array.isArray(e.removedTargetIds))throw TypeError(".google.firestore.v1beta1.DocumentDelete.removedTargetIds: array expected");r.removedTargetIds=[];for(var o=0;o<e.removedTargetIds.length;++o)r.removedTargetIds[o]=0|e.removedTargetIds[o]}if(null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1beta1.DocumentDelete.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},jo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.removedTargetIds=[]),t.defaults&&(o.document="",o.readTime=null),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(o.document=e.document),null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1)),e.removedTargetIds&&e.removedTargetIds.length){o.removedTargetIds=[];for(var n=0;n<e.removedTargetIds.length;++n)o.removedTargetIds[n]=e.removedTargetIds[n]}return o},jo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},jo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.DocumentDelete"},jo),r.DocumentRemove=(wo.prototype.document="",wo.prototype.removedTargetIds=p.emptyArray,wo.prototype.readTime=null,wo.create=function(e){return new wo(e)},wo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&t.uint32(10).string(e.document),null!=e.removedTargetIds&&e.removedTargetIds.length){t.uint32(18).fork();for(var o=0;o<e.removedTargetIds.length;++o)t.int32(e.removedTargetIds[o]);t.ldelim()}return null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&f.google.protobuf.Timestamp.encode(e.readTime,t.uint32(34).fork(),r+1).ldelim(),t},wo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},wo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.DocumentRemove;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.document=e.string();break;case 2:if(i.removedTargetIds&&i.removedTargetIds.length||(i.removedTargetIds=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.removedTargetIds.push(e.int32());else i.removedTargetIds.push(e.int32());break;case 4:i.readTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},wo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},wo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.document&&Object.hasOwnProperty.call(e,"document")&&!p.isString(e.document))return"document: string expected";if(null!=e.removedTargetIds&&Object.hasOwnProperty.call(e,"removedTargetIds")){if(!Array.isArray(e.removedTargetIds))return"removedTargetIds: array expected";for(var r=0;r<e.removedTargetIds.length;++r)if(!p.isInteger(e.removedTargetIds[r]))return"removedTargetIds: integer[] expected"}if(null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")){t=f.google.protobuf.Timestamp.verify(e.readTime,t+1);if(t)return"readTime."+t}return null},wo.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.DocumentRemove)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.DocumentRemove: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.DocumentRemove;if(null!=e.document&&(r.document=String(e.document)),e.removedTargetIds){if(!Array.isArray(e.removedTargetIds))throw TypeError(".google.firestore.v1beta1.DocumentRemove.removedTargetIds: array expected");r.removedTargetIds=[];for(var o=0;o<e.removedTargetIds.length;++o)r.removedTargetIds[o]=0|e.removedTargetIds[o]}if(null!=e.readTime){if(!p.isObject(e.readTime))throw TypeError(".google.firestore.v1beta1.DocumentRemove.readTime: object expected");r.readTime=f.google.protobuf.Timestamp.fromObject(e.readTime,t+1)}return r},wo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.removedTargetIds=[]),t.defaults&&(o.document="",o.readTime=null),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&(o.document=e.document),e.removedTargetIds&&e.removedTargetIds.length){o.removedTargetIds=[];for(var n=0;n<e.removedTargetIds.length;++n)o.removedTargetIds[n]=e.removedTargetIds[n]}return null!=e.readTime&&Object.hasOwnProperty.call(e,"readTime")&&(o.readTime=f.google.protobuf.Timestamp.toObject(e.readTime,t,r+1)),o},wo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},wo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.DocumentRemove"},wo),r.ExistenceFilter=(xo.prototype.targetId=0,xo.prototype.count=0,xo.create=function(e){return new xo(e)},xo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.targetId&&Object.hasOwnProperty.call(e,"targetId")&&t.uint32(8).int32(e.targetId),null!=e.count&&Object.hasOwnProperty.call(e,"count")&&t.uint32(16).int32(e.count),t},xo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},xo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.ExistenceFilter;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.targetId=e.int32();break;case 2:i.count=e.int32();break;default:e.skipType(7&a,o)}}return i},xo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},xo.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.targetId&&Object.hasOwnProperty.call(e,"targetId")&&!p.isInteger(e.targetId)?"targetId: integer expected":null!=e.count&&Object.hasOwnProperty.call(e,"count")&&!p.isInteger(e.count)?"count: integer expected":null},xo.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.ExistenceFilter)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.ExistenceFilter: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.firestore.v1beta1.ExistenceFilter;return null!=e.targetId&&(t.targetId=0|e.targetId),null!=e.count&&(t.count=0|e.count),t},xo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.targetId=0,r.count=0),null!=e.targetId&&Object.hasOwnProperty.call(e,"targetId")&&(r.targetId=e.targetId),null!=e.count&&Object.hasOwnProperty.call(e,"count")&&(r.count=e.count),r},xo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},xo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.ExistenceFilter"},xo),r.UndeliverableFirstGenEvent=(To.prototype.message="",To.prototype.reason=0,To.prototype.documentName="",To.prototype.documentChangeType=0,To.prototype.functionName=p.emptyArray,To.prototype.triggeredTime=null,To.create=function(e){return new To(e)},To.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.message&&Object.hasOwnProperty.call(e,"message")&&t.uint32(10).string(e.message),null!=e.reason&&Object.hasOwnProperty.call(e,"reason")&&t.uint32(16).int32(e.reason),null!=e.documentName&&Object.hasOwnProperty.call(e,"documentName")&&t.uint32(26).string(e.documentName),null!=e.documentChangeType&&Object.hasOwnProperty.call(e,"documentChangeType")&&t.uint32(32).int32(e.documentChangeType),null!=e.functionName&&e.functionName.length)for(var o=0;o<e.functionName.length;++o)t.uint32(42).string(e.functionName[o]);return null!=e.triggeredTime&&Object.hasOwnProperty.call(e,"triggeredTime")&&f.google.protobuf.Timestamp.encode(e.triggeredTime,t.uint32(50).fork(),r+1).ldelim(),t},To.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},To.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.firestore.v1beta1.UndeliverableFirstGenEvent;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.message=e.string();break;case 2:i.reason=e.int32();break;case 3:i.documentName=e.string();break;case 4:i.documentChangeType=e.int32();break;case 5:i.functionName&&i.functionName.length||(i.functionName=[]),i.functionName.push(e.string());break;case 6:i.triggeredTime=f.google.protobuf.Timestamp.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},To.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},To.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.message&&Object.hasOwnProperty.call(e,"message")&&!p.isString(e.message))return"message: string expected";if(null!=e.reason&&Object.hasOwnProperty.call(e,"reason"))switch(e.reason){default:return"reason: enum value expected";case 0:case 1:}if(null!=e.documentName&&Object.hasOwnProperty.call(e,"documentName")&&!p.isString(e.documentName))return"documentName: string expected";if(null!=e.documentChangeType&&Object.hasOwnProperty.call(e,"documentChangeType"))switch(e.documentChangeType){default:return"documentChangeType: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.functionName&&Object.hasOwnProperty.call(e,"functionName")){if(!Array.isArray(e.functionName))return"functionName: array expected";for(var r=0;r<e.functionName.length;++r)if(!p.isString(e.functionName[r]))return"functionName: string[] expected"}if(null!=e.triggeredTime&&Object.hasOwnProperty.call(e,"triggeredTime")){t=f.google.protobuf.Timestamp.verify(e.triggeredTime,t+1);if(t)return"triggeredTime."+t}return null},To.fromObject=function(e,t){if(e instanceof f.google.firestore.v1beta1.UndeliverableFirstGenEvent)return e;if(!p.isObject(e))throw TypeError(".google.firestore.v1beta1.UndeliverableFirstGenEvent: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.firestore.v1beta1.UndeliverableFirstGenEvent;switch(null!=e.message&&(r.message=String(e.message)),e.reason){default:"number"==typeof e.reason&&(r.reason=e.reason);break;case"REASON_UNSPECIFIED":case 0:r.reason=0;break;case"EXCEEDING_SIZE_LIMIT":case 1:r.reason=1}switch(null!=e.documentName&&(r.documentName=String(e.documentName)),e.documentChangeType){default:"number"==typeof e.documentChangeType&&(r.documentChangeType=e.documentChangeType);break;case"DOCUMENT_CHANGE_TYPE_UNSPECIFIED":case 0:r.documentChangeType=0;break;case"CREATE":case 1:r.documentChangeType=1;break;case"DELETE":case 2:r.documentChangeType=2;break;case"UPDATE":case 3:r.documentChangeType=3}if(e.functionName){if(!Array.isArray(e.functionName))throw TypeError(".google.firestore.v1beta1.UndeliverableFirstGenEvent.functionName: array expected");r.functionName=[];for(var o=0;o<e.functionName.length;++o)r.functionName[o]=String(e.functionName[o])}if(null!=e.triggeredTime){if(!p.isObject(e.triggeredTime))throw TypeError(".google.firestore.v1beta1.UndeliverableFirstGenEvent.triggeredTime: object expected");r.triggeredTime=f.google.protobuf.Timestamp.fromObject(e.triggeredTime,t+1)}return r},To.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.functionName=[]),t.defaults&&(o.message="",o.reason=t.enums===String?"REASON_UNSPECIFIED":0,o.documentName="",o.documentChangeType=t.enums===String?"DOCUMENT_CHANGE_TYPE_UNSPECIFIED":0,o.triggeredTime=null),null!=e.message&&Object.hasOwnProperty.call(e,"message")&&(o.message=e.message),null!=e.reason&&Object.hasOwnProperty.call(e,"reason")&&(o.reason=t.enums!==String||void 0===f.google.firestore.v1beta1.UndeliverableFirstGenEvent.Reason[e.reason]?e.reason:f.google.firestore.v1beta1.UndeliverableFirstGenEvent.Reason[e.reason]),null!=e.documentName&&Object.hasOwnProperty.call(e,"documentName")&&(o.documentName=e.documentName),null!=e.documentChangeType&&Object.hasOwnProperty.call(e,"documentChangeType")&&(o.documentChangeType=t.enums!==String||void 0===f.google.firestore.v1beta1.UndeliverableFirstGenEvent.DocumentChangeType[e.documentChangeType]?e.documentChangeType:f.google.firestore.v1beta1.UndeliverableFirstGenEvent.DocumentChangeType[e.documentChangeType]),e.functionName&&e.functionName.length){o.functionName=[];for(var n=0;n<e.functionName.length;++n)o.functionName[n]=e.functionName[n]}return null!=e.triggeredTime&&Object.hasOwnProperty.call(e,"triggeredTime")&&(o.triggeredTime=f.google.protobuf.Timestamp.toObject(e.triggeredTime,t,r+1)),o},To.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},To.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.firestore.v1beta1.UndeliverableFirstGenEvent"},To.Reason=(t={},(e=Object.create(t))[t[0]="REASON_UNSPECIFIED"]=0,e[t[1]="EXCEEDING_SIZE_LIMIT"]=1,e),To.DocumentChangeType=(t={},(e=Object.create(t))[t[0]="DOCUMENT_CHANGE_TYPE_UNSPECIFIED"]=0,e[t[1]="CREATE"]=1,e[t[2]="DELETE"]=2,e[t[3]="UPDATE"]=3,e),To),r),n),A.api=((i={}).FieldBehavior=(t={},(e=Object.create(t))[t[0]="FIELD_BEHAVIOR_UNSPECIFIED"]=0,e[t[1]="OPTIONAL"]=1,e[t[2]="REQUIRED"]=2,e[t[3]="OUTPUT_ONLY"]=3,e[t[4]="INPUT_ONLY"]=4,e[t[5]="IMMUTABLE"]=5,e[t[6]="UNORDERED_LIST"]=6,e[t[7]="NON_EMPTY_DEFAULT"]=7,e[t[8]="IDENTIFIER"]=8,e),i.ResourceDescriptor=(ko.prototype.type="",ko.prototype.pattern=p.emptyArray,ko.prototype.nameField="",ko.prototype.history=0,ko.prototype.plural="",ko.prototype.singular="",ko.prototype.style=p.emptyArray,ko.create=function(e){return new ko(e)},ko.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(10).string(e.type),null!=e.pattern&&e.pattern.length)for(var o=0;o<e.pattern.length;++o)t.uint32(18).string(e.pattern[o]);if(null!=e.nameField&&Object.hasOwnProperty.call(e,"nameField")&&t.uint32(26).string(e.nameField),null!=e.history&&Object.hasOwnProperty.call(e,"history")&&t.uint32(32).int32(e.history),null!=e.plural&&Object.hasOwnProperty.call(e,"plural")&&t.uint32(42).string(e.plural),null!=e.singular&&Object.hasOwnProperty.call(e,"singular")&&t.uint32(50).string(e.singular),null!=e.style&&e.style.length){t.uint32(82).fork();for(o=0;o<e.style.length;++o)t.int32(e.style[o]);t.ldelim()}return t},ko.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ko.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.ResourceDescriptor;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.type=e.string();break;case 2:i.pattern&&i.pattern.length||(i.pattern=[]),i.pattern.push(e.string());break;case 3:i.nameField=e.string();break;case 4:i.history=e.int32();break;case 5:i.plural=e.string();break;case 6:i.singular=e.string();break;case 10:if(i.style&&i.style.length||(i.style=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.style.push(e.int32());else i.style.push(e.int32());break;default:e.skipType(7&a,o)}}return i},ko.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ko.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.type&&Object.hasOwnProperty.call(e,"type")&&!p.isString(e.type))return"type: string expected";if(null!=e.pattern&&Object.hasOwnProperty.call(e,"pattern")){if(!Array.isArray(e.pattern))return"pattern: array expected";for(var r=0;r<e.pattern.length;++r)if(!p.isString(e.pattern[r]))return"pattern: string[] expected"}if(null!=e.nameField&&Object.hasOwnProperty.call(e,"nameField")&&!p.isString(e.nameField))return"nameField: string expected";if(null!=e.history&&Object.hasOwnProperty.call(e,"history"))switch(e.history){default:return"history: enum value expected";case 0:case 1:case 2:}if(null!=e.plural&&Object.hasOwnProperty.call(e,"plural")&&!p.isString(e.plural))return"plural: string expected";if(null!=e.singular&&Object.hasOwnProperty.call(e,"singular")&&!p.isString(e.singular))return"singular: string expected";if(null!=e.style&&Object.hasOwnProperty.call(e,"style")){if(!Array.isArray(e.style))return"style: array expected";for(r=0;r<e.style.length;++r)switch(e.style[r]){default:return"style: enum value[] expected";case 0:case 1:}}return null},ko.fromObject=function(e,t){if(e instanceof f.google.api.ResourceDescriptor)return e;if(!p.isObject(e))throw TypeError(".google.api.ResourceDescriptor: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.ResourceDescriptor;if(null!=e.type&&(r.type=String(e.type)),e.pattern){if(!Array.isArray(e.pattern))throw TypeError(".google.api.ResourceDescriptor.pattern: array expected");r.pattern=[];for(var o=0;o<e.pattern.length;++o)r.pattern[o]=String(e.pattern[o])}switch(null!=e.nameField&&(r.nameField=String(e.nameField)),e.history){default:"number"==typeof e.history&&(r.history=e.history);break;case"HISTORY_UNSPECIFIED":case 0:r.history=0;break;case"ORIGINALLY_SINGLE_PATTERN":case 1:r.history=1;break;case"FUTURE_MULTI_PATTERN":case 2:r.history=2}if(null!=e.plural&&(r.plural=String(e.plural)),null!=e.singular&&(r.singular=String(e.singular)),e.style){if(!Array.isArray(e.style))throw TypeError(".google.api.ResourceDescriptor.style: array expected");r.style=[];for(o=0;o<e.style.length;++o)switch(e.style[o]){default:if("number"==typeof e.style[o]){r.style[o]=e.style[o];break}case"STYLE_UNSPECIFIED":case 0:r.style[o]=0;break;case"DECLARATIVE_FRIENDLY":case 1:r.style[o]=1}}return r},ko.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.pattern=[],o.style=[]),t.defaults&&(o.type="",o.nameField="",o.history=t.enums===String?"HISTORY_UNSPECIFIED":0,o.plural="",o.singular=""),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&(o.type=e.type),e.pattern&&e.pattern.length){o.pattern=[];for(var n=0;n<e.pattern.length;++n)o.pattern[n]=e.pattern[n]}if(null!=e.nameField&&Object.hasOwnProperty.call(e,"nameField")&&(o.nameField=e.nameField),null!=e.history&&Object.hasOwnProperty.call(e,"history")&&(o.history=t.enums!==String||void 0===f.google.api.ResourceDescriptor.History[e.history]?e.history:f.google.api.ResourceDescriptor.History[e.history]),null!=e.plural&&Object.hasOwnProperty.call(e,"plural")&&(o.plural=e.plural),null!=e.singular&&Object.hasOwnProperty.call(e,"singular")&&(o.singular=e.singular),e.style&&e.style.length){o.style=[];for(n=0;n<e.style.length;++n)o.style[n]=t.enums!==String||void 0===f.google.api.ResourceDescriptor.Style[e.style[n]]?e.style[n]:f.google.api.ResourceDescriptor.Style[e.style[n]]}return o},ko.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ko.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.ResourceDescriptor"},ko.History=(t={},(e=Object.create(t))[t[0]="HISTORY_UNSPECIFIED"]=0,e[t[1]="ORIGINALLY_SINGLE_PATTERN"]=1,e[t[2]="FUTURE_MULTI_PATTERN"]=2,e),ko.Style=(t={},(e=Object.create(t))[t[0]="STYLE_UNSPECIFIED"]=0,e[t[1]="DECLARATIVE_FRIENDLY"]=1,e),ko),i.ResourceReference=(So.prototype.type="",So.prototype.childType="",So.create=function(e){return new So(e)},So.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(10).string(e.type),null!=e.childType&&Object.hasOwnProperty.call(e,"childType")&&t.uint32(18).string(e.childType),t},So.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},So.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.ResourceReference;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.type=e.string();break;case 2:i.childType=e.string();break;default:e.skipType(7&a,o)}}return i},So.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},So.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.type&&Object.hasOwnProperty.call(e,"type")&&!p.isString(e.type)?"type: string expected":null!=e.childType&&Object.hasOwnProperty.call(e,"childType")&&!p.isString(e.childType)?"childType: string expected":null},So.fromObject=function(e,t){if(e instanceof f.google.api.ResourceReference)return e;if(!p.isObject(e))throw TypeError(".google.api.ResourceReference: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.api.ResourceReference;return null!=e.type&&(t.type=String(e.type)),null!=e.childType&&(t.childType=String(e.childType)),t},So.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.type="",r.childType=""),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&(r.type=e.type),null!=e.childType&&Object.hasOwnProperty.call(e,"childType")&&(r.childType=e.childType),r},So.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},So.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.ResourceReference"},So),i.Http=(Po.prototype.rules=p.emptyArray,Po.prototype.fullyDecodeReservedExpansion=!1,Po.create=function(e){return new Po(e)},Po.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.rules&&e.rules.length)for(var o=0;o<e.rules.length;++o)f.google.api.HttpRule.encode(e.rules[o],t.uint32(10).fork(),r+1).ldelim();return null!=e.fullyDecodeReservedExpansion&&Object.hasOwnProperty.call(e,"fullyDecodeReservedExpansion")&&t.uint32(16).bool(e.fullyDecodeReservedExpansion),t},Po.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Po.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.Http;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.rules&&i.rules.length||(i.rules=[]),i.rules.push(f.google.api.HttpRule.decode(e,e.uint32(),void 0,o+1));break;case 2:i.fullyDecodeReservedExpansion=e.bool();break;default:e.skipType(7&a,o)}}return i},Po.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Po.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.rules&&Object.hasOwnProperty.call(e,"rules")){if(!Array.isArray(e.rules))return"rules: array expected";for(var r=0;r<e.rules.length;++r){var o=f.google.api.HttpRule.verify(e.rules[r],t+1);if(o)return"rules."+o}}return null!=e.fullyDecodeReservedExpansion&&Object.hasOwnProperty.call(e,"fullyDecodeReservedExpansion")&&"boolean"!=typeof e.fullyDecodeReservedExpansion?"fullyDecodeReservedExpansion: boolean expected":null},Po.fromObject=function(e,t){if(e instanceof f.google.api.Http)return e;if(!p.isObject(e))throw TypeError(".google.api.Http: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.Http;if(e.rules){if(!Array.isArray(e.rules))throw TypeError(".google.api.Http.rules: array expected");r.rules=[];for(var o=0;o<e.rules.length;++o){if(!p.isObject(e.rules[o]))throw TypeError(".google.api.Http.rules: object expected");r.rules[o]=f.google.api.HttpRule.fromObject(e.rules[o],t+1)}}return null!=e.fullyDecodeReservedExpansion&&(r.fullyDecodeReservedExpansion=Boolean(e.fullyDecodeReservedExpansion)),r},Po.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.rules=[]),t.defaults&&(o.fullyDecodeReservedExpansion=!1),e.rules&&e.rules.length){o.rules=[];for(var n=0;n<e.rules.length;++n)o.rules[n]=f.google.api.HttpRule.toObject(e.rules[n],t,r+1)}return null!=e.fullyDecodeReservedExpansion&&Object.hasOwnProperty.call(e,"fullyDecodeReservedExpansion")&&(o.fullyDecodeReservedExpansion=e.fullyDecodeReservedExpansion),o},Po.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Po.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.Http"},Po),i.HttpRule=(P.prototype.selector="",P.prototype.get=null,P.prototype.put=null,P.prototype.post=null,P.prototype.delete=null,P.prototype.patch=null,P.prototype.custom=null,P.prototype.body="",P.prototype.responseBody="",P.prototype.additionalBindings=p.emptyArray,Object.defineProperty(P.prototype,"pattern",{get:p.oneOfGetter(t=["get","put","post","delete","patch","custom"]),set:p.oneOfSetter(t)}),P.create=function(e){return new P(e)},P.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.selector&&Object.hasOwnProperty.call(e,"selector")&&t.uint32(10).string(e.selector),null!=e.get&&Object.hasOwnProperty.call(e,"get")&&t.uint32(18).string(e.get),null!=e.put&&Object.hasOwnProperty.call(e,"put")&&t.uint32(26).string(e.put),null!=e.post&&Object.hasOwnProperty.call(e,"post")&&t.uint32(34).string(e.post),null!=e.delete&&Object.hasOwnProperty.call(e,"delete")&&t.uint32(42).string(e.delete),null!=e.patch&&Object.hasOwnProperty.call(e,"patch")&&t.uint32(50).string(e.patch),null!=e.body&&Object.hasOwnProperty.call(e,"body")&&t.uint32(58).string(e.body),null!=e.custom&&Object.hasOwnProperty.call(e,"custom")&&f.google.api.CustomHttpPattern.encode(e.custom,t.uint32(66).fork(),r+1).ldelim(),null!=e.additionalBindings&&e.additionalBindings.length)for(var o=0;o<e.additionalBindings.length;++o)f.google.api.HttpRule.encode(e.additionalBindings[o],t.uint32(90).fork(),r+1).ldelim();return null!=e.responseBody&&Object.hasOwnProperty.call(e,"responseBody")&&t.uint32(98).string(e.responseBody),t},P.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},P.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.HttpRule;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.selector=e.string();break;case 2:i.get=e.string();break;case 3:i.put=e.string();break;case 4:i.post=e.string();break;case 5:i.delete=e.string();break;case 6:i.patch=e.string();break;case 8:i.custom=f.google.api.CustomHttpPattern.decode(e,e.uint32(),void 0,o+1);break;case 7:i.body=e.string();break;case 12:i.responseBody=e.string();break;case 11:i.additionalBindings&&i.additionalBindings.length||(i.additionalBindings=[]),i.additionalBindings.push(f.google.api.HttpRule.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},P.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},P.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r={};if(null!=e.selector&&Object.hasOwnProperty.call(e,"selector")&&!p.isString(e.selector))return"selector: string expected";if(null!=e.get&&Object.hasOwnProperty.call(e,"get")&&(r.pattern=1,!p.isString(e.get)))return"get: string expected";if(null!=e.put&&Object.hasOwnProperty.call(e,"put")){if(1===r.pattern)return"pattern: multiple values";if(r.pattern=1,!p.isString(e.put))return"put: string expected"}if(null!=e.post&&Object.hasOwnProperty.call(e,"post")){if(1===r.pattern)return"pattern: multiple values";if(r.pattern=1,!p.isString(e.post))return"post: string expected"}if(null!=e.delete&&Object.hasOwnProperty.call(e,"delete")){if(1===r.pattern)return"pattern: multiple values";if(r.pattern=1,!p.isString(e.delete))return"delete: string expected"}if(null!=e.patch&&Object.hasOwnProperty.call(e,"patch")){if(1===r.pattern)return"pattern: multiple values";if(r.pattern=1,!p.isString(e.patch))return"patch: string expected"}if(null!=e.custom&&Object.hasOwnProperty.call(e,"custom")){if(1===r.pattern)return"pattern: multiple values";if(o=f.google.api.CustomHttpPattern.verify(e.custom,t+(r.pattern=1)))return"custom."+o}if(null!=e.body&&Object.hasOwnProperty.call(e,"body")&&!p.isString(e.body))return"body: string expected";if(null!=e.responseBody&&Object.hasOwnProperty.call(e,"responseBody")&&!p.isString(e.responseBody))return"responseBody: string expected";if(null!=e.additionalBindings&&Object.hasOwnProperty.call(e,"additionalBindings")){if(!Array.isArray(e.additionalBindings))return"additionalBindings: array expected";for(var o,n=0;n<e.additionalBindings.length;++n)if(o=f.google.api.HttpRule.verify(e.additionalBindings[n],t+1))return"additionalBindings."+o}return null},P.fromObject=function(e,t){if(e instanceof f.google.api.HttpRule)return e;if(!p.isObject(e))throw TypeError(".google.api.HttpRule: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.HttpRule;if(null!=e.selector&&(r.selector=String(e.selector)),null!=e.get&&(r.get=String(e.get)),null!=e.put&&(r.put=String(e.put)),null!=e.post&&(r.post=String(e.post)),null!=e.delete&&(r.delete=String(e.delete)),null!=e.patch&&(r.patch=String(e.patch)),null!=e.custom){if(!p.isObject(e.custom))throw TypeError(".google.api.HttpRule.custom: object expected");r.custom=f.google.api.CustomHttpPattern.fromObject(e.custom,t+1)}if(null!=e.body&&(r.body=String(e.body)),null!=e.responseBody&&(r.responseBody=String(e.responseBody)),e.additionalBindings){if(!Array.isArray(e.additionalBindings))throw TypeError(".google.api.HttpRule.additionalBindings: array expected");r.additionalBindings=[];for(var o=0;o<e.additionalBindings.length;++o){if(!p.isObject(e.additionalBindings[o]))throw TypeError(".google.api.HttpRule.additionalBindings: object expected");r.additionalBindings[o]=f.google.api.HttpRule.fromObject(e.additionalBindings[o],t+1)}}return r},P.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.additionalBindings=[]),t.defaults&&(o.selector="",o.body="",o.responseBody=""),null!=e.selector&&Object.hasOwnProperty.call(e,"selector")&&(o.selector=e.selector),null!=e.get&&Object.hasOwnProperty.call(e,"get")&&(o.get=e.get,t.oneofs)&&(o.pattern="get"),null!=e.put&&Object.hasOwnProperty.call(e,"put")&&(o.put=e.put,t.oneofs)&&(o.pattern="put"),null!=e.post&&Object.hasOwnProperty.call(e,"post")&&(o.post=e.post,t.oneofs)&&(o.pattern="post"),null!=e.delete&&Object.hasOwnProperty.call(e,"delete")&&(o.delete=e.delete,t.oneofs)&&(o.pattern="delete"),null!=e.patch&&Object.hasOwnProperty.call(e,"patch")&&(o.patch=e.patch,t.oneofs)&&(o.pattern="patch"),null!=e.body&&Object.hasOwnProperty.call(e,"body")&&(o.body=e.body),null!=e.custom&&Object.hasOwnProperty.call(e,"custom")&&(o.custom=f.google.api.CustomHttpPattern.toObject(e.custom,t,r+1),t.oneofs)&&(o.pattern="custom"),e.additionalBindings&&e.additionalBindings.length){o.additionalBindings=[];for(var n=0;n<e.additionalBindings.length;++n)o.additionalBindings[n]=f.google.api.HttpRule.toObject(e.additionalBindings[n],t,r+1)}return null!=e.responseBody&&Object.hasOwnProperty.call(e,"responseBody")&&(o.responseBody=e.responseBody),o},P.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},P.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.HttpRule"},P),i.CustomHttpPattern=(Eo.prototype.kind="",Eo.prototype.path="",Eo.create=function(e){return new Eo(e)},Eo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.kind&&Object.hasOwnProperty.call(e,"kind")&&t.uint32(10).string(e.kind),null!=e.path&&Object.hasOwnProperty.call(e,"path")&&t.uint32(18).string(e.path),t},Eo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Eo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.CustomHttpPattern;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.kind=e.string();break;case 2:i.path=e.string();break;default:e.skipType(7&a,o)}}return i},Eo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Eo.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.kind&&Object.hasOwnProperty.call(e,"kind")&&!p.isString(e.kind)?"kind: string expected":null!=e.path&&Object.hasOwnProperty.call(e,"path")&&!p.isString(e.path)?"path: string expected":null},Eo.fromObject=function(e,t){if(e instanceof f.google.api.CustomHttpPattern)return e;if(!p.isObject(e))throw TypeError(".google.api.CustomHttpPattern: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.api.CustomHttpPattern;return null!=e.kind&&(t.kind=String(e.kind)),null!=e.path&&(t.path=String(e.path)),t},Eo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.kind="",r.path=""),null!=e.kind&&Object.hasOwnProperty.call(e,"kind")&&(r.kind=e.kind),null!=e.path&&Object.hasOwnProperty.call(e,"path")&&(r.path=e.path),r},Eo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Eo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.CustomHttpPattern"},Eo),i.CommonLanguageSettings=(Do.prototype.referenceDocsUri="",Do.prototype.destinations=p.emptyArray,Do.prototype.selectiveGapicGeneration=null,Do.create=function(e){return new Do(e)},Do.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.referenceDocsUri&&Object.hasOwnProperty.call(e,"referenceDocsUri")&&t.uint32(10).string(e.referenceDocsUri),null!=e.destinations&&e.destinations.length){t.uint32(18).fork();for(var o=0;o<e.destinations.length;++o)t.int32(e.destinations[o]);t.ldelim()}return null!=e.selectiveGapicGeneration&&Object.hasOwnProperty.call(e,"selectiveGapicGeneration")&&f.google.api.SelectiveGapicGeneration.encode(e.selectiveGapicGeneration,t.uint32(26).fork(),r+1).ldelim(),t},Do.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Do.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.CommonLanguageSettings;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.referenceDocsUri=e.string();break;case 2:if(i.destinations&&i.destinations.length||(i.destinations=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.destinations.push(e.int32());else i.destinations.push(e.int32());break;case 3:i.selectiveGapicGeneration=f.google.api.SelectiveGapicGeneration.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Do.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Do.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.referenceDocsUri&&Object.hasOwnProperty.call(e,"referenceDocsUri")&&!p.isString(e.referenceDocsUri))return"referenceDocsUri: string expected";if(null!=e.destinations&&Object.hasOwnProperty.call(e,"destinations")){if(!Array.isArray(e.destinations))return"destinations: array expected";for(var r=0;r<e.destinations.length;++r)switch(e.destinations[r]){default:return"destinations: enum value[] expected";case 0:case 10:case 20:}}if(null!=e.selectiveGapicGeneration&&Object.hasOwnProperty.call(e,"selectiveGapicGeneration")){t=f.google.api.SelectiveGapicGeneration.verify(e.selectiveGapicGeneration,t+1);if(t)return"selectiveGapicGeneration."+t}return null},Do.fromObject=function(e,t){if(e instanceof f.google.api.CommonLanguageSettings)return e;if(!p.isObject(e))throw TypeError(".google.api.CommonLanguageSettings: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.CommonLanguageSettings;if(null!=e.referenceDocsUri&&(r.referenceDocsUri=String(e.referenceDocsUri)),e.destinations){if(!Array.isArray(e.destinations))throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected");r.destinations=[];for(var o=0;o<e.destinations.length;++o)switch(e.destinations[o]){default:if("number"==typeof e.destinations[o]){r.destinations[o]=e.destinations[o];break}case"CLIENT_LIBRARY_DESTINATION_UNSPECIFIED":case 0:r.destinations[o]=0;break;case"GITHUB":case 10:r.destinations[o]=10;break;case"PACKAGE_MANAGER":case 20:r.destinations[o]=20}}if(null!=e.selectiveGapicGeneration){if(!p.isObject(e.selectiveGapicGeneration))throw TypeError(".google.api.CommonLanguageSettings.selectiveGapicGeneration: object expected");r.selectiveGapicGeneration=f.google.api.SelectiveGapicGeneration.fromObject(e.selectiveGapicGeneration,t+1)}return r},Do.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.destinations=[]),t.defaults&&(o.referenceDocsUri="",o.selectiveGapicGeneration=null),null!=e.referenceDocsUri&&Object.hasOwnProperty.call(e,"referenceDocsUri")&&(o.referenceDocsUri=e.referenceDocsUri),e.destinations&&e.destinations.length){o.destinations=[];for(var n=0;n<e.destinations.length;++n)o.destinations[n]=t.enums!==String||void 0===f.google.api.ClientLibraryDestination[e.destinations[n]]?e.destinations[n]:f.google.api.ClientLibraryDestination[e.destinations[n]]}return null!=e.selectiveGapicGeneration&&Object.hasOwnProperty.call(e,"selectiveGapicGeneration")&&(o.selectiveGapicGeneration=f.google.api.SelectiveGapicGeneration.toObject(e.selectiveGapicGeneration,t,r+1)),o},Do.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Do.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.CommonLanguageSettings"},Do),i.ClientLibrarySettings=(E.prototype.version="",E.prototype.launchStage=0,E.prototype.restNumericEnums=!1,E.prototype.javaSettings=null,E.prototype.cppSettings=null,E.prototype.phpSettings=null,E.prototype.pythonSettings=null,E.prototype.nodeSettings=null,E.prototype.dotnetSettings=null,E.prototype.rubySettings=null,E.prototype.goSettings=null,E.create=function(e){return new E(e)},E.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.version&&Object.hasOwnProperty.call(e,"version")&&t.uint32(10).string(e.version),null!=e.launchStage&&Object.hasOwnProperty.call(e,"launchStage")&&t.uint32(16).int32(e.launchStage),null!=e.restNumericEnums&&Object.hasOwnProperty.call(e,"restNumericEnums")&&t.uint32(24).bool(e.restNumericEnums),null!=e.javaSettings&&Object.hasOwnProperty.call(e,"javaSettings")&&f.google.api.JavaSettings.encode(e.javaSettings,t.uint32(170).fork(),r+1).ldelim(),null!=e.cppSettings&&Object.hasOwnProperty.call(e,"cppSettings")&&f.google.api.CppSettings.encode(e.cppSettings,t.uint32(178).fork(),r+1).ldelim(),null!=e.phpSettings&&Object.hasOwnProperty.call(e,"phpSettings")&&f.google.api.PhpSettings.encode(e.phpSettings,t.uint32(186).fork(),r+1).ldelim(),null!=e.pythonSettings&&Object.hasOwnProperty.call(e,"pythonSettings")&&f.google.api.PythonSettings.encode(e.pythonSettings,t.uint32(194).fork(),r+1).ldelim(),null!=e.nodeSettings&&Object.hasOwnProperty.call(e,"nodeSettings")&&f.google.api.NodeSettings.encode(e.nodeSettings,t.uint32(202).fork(),r+1).ldelim(),null!=e.dotnetSettings&&Object.hasOwnProperty.call(e,"dotnetSettings")&&f.google.api.DotnetSettings.encode(e.dotnetSettings,t.uint32(210).fork(),r+1).ldelim(),null!=e.rubySettings&&Object.hasOwnProperty.call(e,"rubySettings")&&f.google.api.RubySettings.encode(e.rubySettings,t.uint32(218).fork(),r+1).ldelim(),null!=e.goSettings&&Object.hasOwnProperty.call(e,"goSettings")&&f.google.api.GoSettings.encode(e.goSettings,t.uint32(226).fork(),r+1).ldelim(),t},E.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},E.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.ClientLibrarySettings;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.version=e.string();break;case 2:i.launchStage=e.int32();break;case 3:i.restNumericEnums=e.bool();break;case 21:i.javaSettings=f.google.api.JavaSettings.decode(e,e.uint32(),void 0,o+1);break;case 22:i.cppSettings=f.google.api.CppSettings.decode(e,e.uint32(),void 0,o+1);break;case 23:i.phpSettings=f.google.api.PhpSettings.decode(e,e.uint32(),void 0,o+1);break;case 24:i.pythonSettings=f.google.api.PythonSettings.decode(e,e.uint32(),void 0,o+1);break;case 25:i.nodeSettings=f.google.api.NodeSettings.decode(e,e.uint32(),void 0,o+1);break;case 26:i.dotnetSettings=f.google.api.DotnetSettings.decode(e,e.uint32(),void 0,o+1);break;case 27:i.rubySettings=f.google.api.RubySettings.decode(e,e.uint32(),void 0,o+1);break;case 28:i.goSettings=f.google.api.GoSettings.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},E.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},E.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.version&&Object.hasOwnProperty.call(e,"version")&&!p.isString(e.version))return"version: string expected";if(null!=e.launchStage&&Object.hasOwnProperty.call(e,"launchStage"))switch(e.launchStage){default:return"launchStage: enum value expected";case 0:case 6:case 7:case 1:case 2:case 3:case 4:case 5:}if(null!=e.restNumericEnums&&Object.hasOwnProperty.call(e,"restNumericEnums")&&"boolean"!=typeof e.restNumericEnums)return"restNumericEnums: boolean expected";var r;if(null!=e.javaSettings&&Object.hasOwnProperty.call(e,"javaSettings")&&(r=f.google.api.JavaSettings.verify(e.javaSettings,t+1)))return"javaSettings."+r;if(null!=e.cppSettings&&Object.hasOwnProperty.call(e,"cppSettings")&&(r=f.google.api.CppSettings.verify(e.cppSettings,t+1)))return"cppSettings."+r;if(null!=e.phpSettings&&Object.hasOwnProperty.call(e,"phpSettings")&&(r=f.google.api.PhpSettings.verify(e.phpSettings,t+1)))return"phpSettings."+r;if(null!=e.pythonSettings&&Object.hasOwnProperty.call(e,"pythonSettings")&&(r=f.google.api.PythonSettings.verify(e.pythonSettings,t+1)))return"pythonSettings."+r;if(null!=e.nodeSettings&&Object.hasOwnProperty.call(e,"nodeSettings")&&(r=f.google.api.NodeSettings.verify(e.nodeSettings,t+1)))return"nodeSettings."+r;if(null!=e.dotnetSettings&&Object.hasOwnProperty.call(e,"dotnetSettings")&&(r=f.google.api.DotnetSettings.verify(e.dotnetSettings,t+1)))return"dotnetSettings."+r;if(null!=e.rubySettings&&Object.hasOwnProperty.call(e,"rubySettings")&&(r=f.google.api.RubySettings.verify(e.rubySettings,t+1)))return"rubySettings."+r;if(null!=e.goSettings&&Object.hasOwnProperty.call(e,"goSettings")&&(r=f.google.api.GoSettings.verify(e.goSettings,t+1)))return"goSettings."+r;return null},E.fromObject=function(e,t){if(e instanceof f.google.api.ClientLibrarySettings)return e;if(!p.isObject(e))throw TypeError(".google.api.ClientLibrarySettings: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.ClientLibrarySettings;switch(null!=e.version&&(r.version=String(e.version)),e.launchStage){default:"number"==typeof e.launchStage&&(r.launchStage=e.launchStage);break;case"LAUNCH_STAGE_UNSPECIFIED":case 0:r.launchStage=0;break;case"UNIMPLEMENTED":case 6:r.launchStage=6;break;case"PRELAUNCH":case 7:r.launchStage=7;break;case"EARLY_ACCESS":case 1:r.launchStage=1;break;case"ALPHA":case 2:r.launchStage=2;break;case"BETA":case 3:r.launchStage=3;break;case"GA":case 4:r.launchStage=4;break;case"DEPRECATED":case 5:r.launchStage=5}if(null!=e.restNumericEnums&&(r.restNumericEnums=Boolean(e.restNumericEnums)),null!=e.javaSettings){if(!p.isObject(e.javaSettings))throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected");r.javaSettings=f.google.api.JavaSettings.fromObject(e.javaSettings,t+1)}if(null!=e.cppSettings){if(!p.isObject(e.cppSettings))throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected");r.cppSettings=f.google.api.CppSettings.fromObject(e.cppSettings,t+1)}if(null!=e.phpSettings){if(!p.isObject(e.phpSettings))throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected");r.phpSettings=f.google.api.PhpSettings.fromObject(e.phpSettings,t+1)}if(null!=e.pythonSettings){if(!p.isObject(e.pythonSettings))throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected");r.pythonSettings=f.google.api.PythonSettings.fromObject(e.pythonSettings,t+1)}if(null!=e.nodeSettings){if(!p.isObject(e.nodeSettings))throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected");r.nodeSettings=f.google.api.NodeSettings.fromObject(e.nodeSettings,t+1)}if(null!=e.dotnetSettings){if(!p.isObject(e.dotnetSettings))throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected");r.dotnetSettings=f.google.api.DotnetSettings.fromObject(e.dotnetSettings,t+1)}if(null!=e.rubySettings){if(!p.isObject(e.rubySettings))throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected");r.rubySettings=f.google.api.RubySettings.fromObject(e.rubySettings,t+1)}if(null!=e.goSettings){if(!p.isObject(e.goSettings))throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected");r.goSettings=f.google.api.GoSettings.fromObject(e.goSettings,t+1)}return r},E.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.version="",o.launchStage=t.enums===String?"LAUNCH_STAGE_UNSPECIFIED":0,o.restNumericEnums=!1,o.javaSettings=null,o.cppSettings=null,o.phpSettings=null,o.pythonSettings=null,o.nodeSettings=null,o.dotnetSettings=null,o.rubySettings=null,o.goSettings=null),null!=e.version&&Object.hasOwnProperty.call(e,"version")&&(o.version=e.version),null!=e.launchStage&&Object.hasOwnProperty.call(e,"launchStage")&&(o.launchStage=t.enums!==String||void 0===f.google.api.LaunchStage[e.launchStage]?e.launchStage:f.google.api.LaunchStage[e.launchStage]),null!=e.restNumericEnums&&Object.hasOwnProperty.call(e,"restNumericEnums")&&(o.restNumericEnums=e.restNumericEnums),null!=e.javaSettings&&Object.hasOwnProperty.call(e,"javaSettings")&&(o.javaSettings=f.google.api.JavaSettings.toObject(e.javaSettings,t,r+1)),null!=e.cppSettings&&Object.hasOwnProperty.call(e,"cppSettings")&&(o.cppSettings=f.google.api.CppSettings.toObject(e.cppSettings,t,r+1)),null!=e.phpSettings&&Object.hasOwnProperty.call(e,"phpSettings")&&(o.phpSettings=f.google.api.PhpSettings.toObject(e.phpSettings,t,r+1)),null!=e.pythonSettings&&Object.hasOwnProperty.call(e,"pythonSettings")&&(o.pythonSettings=f.google.api.PythonSettings.toObject(e.pythonSettings,t,r+1)),null!=e.nodeSettings&&Object.hasOwnProperty.call(e,"nodeSettings")&&(o.nodeSettings=f.google.api.NodeSettings.toObject(e.nodeSettings,t,r+1)),null!=e.dotnetSettings&&Object.hasOwnProperty.call(e,"dotnetSettings")&&(o.dotnetSettings=f.google.api.DotnetSettings.toObject(e.dotnetSettings,t,r+1)),null!=e.rubySettings&&Object.hasOwnProperty.call(e,"rubySettings")&&(o.rubySettings=f.google.api.RubySettings.toObject(e.rubySettings,t,r+1)),null!=e.goSettings&&Object.hasOwnProperty.call(e,"goSettings")&&(o.goSettings=f.google.api.GoSettings.toObject(e.goSettings,t,r+1)),o},E.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},E.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.ClientLibrarySettings"},E),i.Publishing=(D.prototype.methodSettings=p.emptyArray,D.prototype.newIssueUri="",D.prototype.documentationUri="",D.prototype.apiShortName="",D.prototype.githubLabel="",D.prototype.codeownerGithubTeams=p.emptyArray,D.prototype.docTagPrefix="",D.prototype.organization=0,D.prototype.librarySettings=p.emptyArray,D.prototype.protoReferenceDocumentationUri="",D.prototype.restReferenceDocumentationUri="",D.create=function(e){return new D(e)},D.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.methodSettings&&e.methodSettings.length)for(var o=0;o<e.methodSettings.length;++o)f.google.api.MethodSettings.encode(e.methodSettings[o],t.uint32(18).fork(),r+1).ldelim();if(null!=e.newIssueUri&&Object.hasOwnProperty.call(e,"newIssueUri")&&t.uint32(810).string(e.newIssueUri),null!=e.documentationUri&&Object.hasOwnProperty.call(e,"documentationUri")&&t.uint32(818).string(e.documentationUri),null!=e.apiShortName&&Object.hasOwnProperty.call(e,"apiShortName")&&t.uint32(826).string(e.apiShortName),null!=e.githubLabel&&Object.hasOwnProperty.call(e,"githubLabel")&&t.uint32(834).string(e.githubLabel),null!=e.codeownerGithubTeams&&e.codeownerGithubTeams.length)for(o=0;o<e.codeownerGithubTeams.length;++o)t.uint32(842).string(e.codeownerGithubTeams[o]);if(null!=e.docTagPrefix&&Object.hasOwnProperty.call(e,"docTagPrefix")&&t.uint32(850).string(e.docTagPrefix),null!=e.organization&&Object.hasOwnProperty.call(e,"organization")&&t.uint32(856).int32(e.organization),null!=e.librarySettings&&e.librarySettings.length)for(o=0;o<e.librarySettings.length;++o)f.google.api.ClientLibrarySettings.encode(e.librarySettings[o],t.uint32(874).fork(),r+1).ldelim();return null!=e.protoReferenceDocumentationUri&&Object.hasOwnProperty.call(e,"protoReferenceDocumentationUri")&&t.uint32(882).string(e.protoReferenceDocumentationUri),null!=e.restReferenceDocumentationUri&&Object.hasOwnProperty.call(e,"restReferenceDocumentationUri")&&t.uint32(890).string(e.restReferenceDocumentationUri),t},D.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},D.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.Publishing;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 2:i.methodSettings&&i.methodSettings.length||(i.methodSettings=[]),i.methodSettings.push(f.google.api.MethodSettings.decode(e,e.uint32(),void 0,o+1));break;case 101:i.newIssueUri=e.string();break;case 102:i.documentationUri=e.string();break;case 103:i.apiShortName=e.string();break;case 104:i.githubLabel=e.string();break;case 105:i.codeownerGithubTeams&&i.codeownerGithubTeams.length||(i.codeownerGithubTeams=[]),i.codeownerGithubTeams.push(e.string());break;case 106:i.docTagPrefix=e.string();break;case 107:i.organization=e.int32();break;case 109:i.librarySettings&&i.librarySettings.length||(i.librarySettings=[]),i.librarySettings.push(f.google.api.ClientLibrarySettings.decode(e,e.uint32(),void 0,o+1));break;case 110:i.protoReferenceDocumentationUri=e.string();break;case 111:i.restReferenceDocumentationUri=e.string();break;default:e.skipType(7&a,o)}}return i},D.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},D.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.methodSettings&&Object.hasOwnProperty.call(e,"methodSettings")){if(!Array.isArray(e.methodSettings))return"methodSettings: array expected";for(var r=0;r<e.methodSettings.length;++r)if(o=f.google.api.MethodSettings.verify(e.methodSettings[r],t+1))return"methodSettings."+o}if(null!=e.newIssueUri&&Object.hasOwnProperty.call(e,"newIssueUri")&&!p.isString(e.newIssueUri))return"newIssueUri: string expected";if(null!=e.documentationUri&&Object.hasOwnProperty.call(e,"documentationUri")&&!p.isString(e.documentationUri))return"documentationUri: string expected";if(null!=e.apiShortName&&Object.hasOwnProperty.call(e,"apiShortName")&&!p.isString(e.apiShortName))return"apiShortName: string expected";if(null!=e.githubLabel&&Object.hasOwnProperty.call(e,"githubLabel")&&!p.isString(e.githubLabel))return"githubLabel: string expected";if(null!=e.codeownerGithubTeams&&Object.hasOwnProperty.call(e,"codeownerGithubTeams")){if(!Array.isArray(e.codeownerGithubTeams))return"codeownerGithubTeams: array expected";for(r=0;r<e.codeownerGithubTeams.length;++r)if(!p.isString(e.codeownerGithubTeams[r]))return"codeownerGithubTeams: string[] expected"}if(null!=e.docTagPrefix&&Object.hasOwnProperty.call(e,"docTagPrefix")&&!p.isString(e.docTagPrefix))return"docTagPrefix: string expected";if(null!=e.organization&&Object.hasOwnProperty.call(e,"organization"))switch(e.organization){default:return"organization: enum value expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}if(null!=e.librarySettings&&Object.hasOwnProperty.call(e,"librarySettings")){if(!Array.isArray(e.librarySettings))return"librarySettings: array expected";for(var o,r=0;r<e.librarySettings.length;++r)if(o=f.google.api.ClientLibrarySettings.verify(e.librarySettings[r],t+1))return"librarySettings."+o}return null!=e.protoReferenceDocumentationUri&&Object.hasOwnProperty.call(e,"protoReferenceDocumentationUri")&&!p.isString(e.protoReferenceDocumentationUri)?"protoReferenceDocumentationUri: string expected":null!=e.restReferenceDocumentationUri&&Object.hasOwnProperty.call(e,"restReferenceDocumentationUri")&&!p.isString(e.restReferenceDocumentationUri)?"restReferenceDocumentationUri: string expected":null},D.fromObject=function(e,t){if(e instanceof f.google.api.Publishing)return e;if(!p.isObject(e))throw TypeError(".google.api.Publishing: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.Publishing;if(e.methodSettings){if(!Array.isArray(e.methodSettings))throw TypeError(".google.api.Publishing.methodSettings: array expected");r.methodSettings=[];for(var o=0;o<e.methodSettings.length;++o){if(!p.isObject(e.methodSettings[o]))throw TypeError(".google.api.Publishing.methodSettings: object expected");r.methodSettings[o]=f.google.api.MethodSettings.fromObject(e.methodSettings[o],t+1)}}if(null!=e.newIssueUri&&(r.newIssueUri=String(e.newIssueUri)),null!=e.documentationUri&&(r.documentationUri=String(e.documentationUri)),null!=e.apiShortName&&(r.apiShortName=String(e.apiShortName)),null!=e.githubLabel&&(r.githubLabel=String(e.githubLabel)),e.codeownerGithubTeams){if(!Array.isArray(e.codeownerGithubTeams))throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected");r.codeownerGithubTeams=[];for(o=0;o<e.codeownerGithubTeams.length;++o)r.codeownerGithubTeams[o]=String(e.codeownerGithubTeams[o])}switch(null!=e.docTagPrefix&&(r.docTagPrefix=String(e.docTagPrefix)),e.organization){default:"number"==typeof e.organization&&(r.organization=e.organization);break;case"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED":case 0:r.organization=0;break;case"CLOUD":case 1:r.organization=1;break;case"ADS":case 2:r.organization=2;break;case"PHOTOS":case 3:r.organization=3;break;case"STREET_VIEW":case 4:r.organization=4;break;case"SHOPPING":case 5:r.organization=5;break;case"GEO":case 6:r.organization=6;break;case"GENERATIVE_AI":case 7:r.organization=7}if(e.librarySettings){if(!Array.isArray(e.librarySettings))throw TypeError(".google.api.Publishing.librarySettings: array expected");r.librarySettings=[];for(o=0;o<e.librarySettings.length;++o){if(!p.isObject(e.librarySettings[o]))throw TypeError(".google.api.Publishing.librarySettings: object expected");r.librarySettings[o]=f.google.api.ClientLibrarySettings.fromObject(e.librarySettings[o],t+1)}}return null!=e.protoReferenceDocumentationUri&&(r.protoReferenceDocumentationUri=String(e.protoReferenceDocumentationUri)),null!=e.restReferenceDocumentationUri&&(r.restReferenceDocumentationUri=String(e.restReferenceDocumentationUri)),r},D.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.methodSettings=[],o.codeownerGithubTeams=[],o.librarySettings=[]),t.defaults&&(o.newIssueUri="",o.documentationUri="",o.apiShortName="",o.githubLabel="",o.docTagPrefix="",o.organization=t.enums===String?"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED":0,o.protoReferenceDocumentationUri="",o.restReferenceDocumentationUri=""),e.methodSettings&&e.methodSettings.length){o.methodSettings=[];for(var n=0;n<e.methodSettings.length;++n)o.methodSettings[n]=f.google.api.MethodSettings.toObject(e.methodSettings[n],t,r+1)}if(null!=e.newIssueUri&&Object.hasOwnProperty.call(e,"newIssueUri")&&(o.newIssueUri=e.newIssueUri),null!=e.documentationUri&&Object.hasOwnProperty.call(e,"documentationUri")&&(o.documentationUri=e.documentationUri),null!=e.apiShortName&&Object.hasOwnProperty.call(e,"apiShortName")&&(o.apiShortName=e.apiShortName),null!=e.githubLabel&&Object.hasOwnProperty.call(e,"githubLabel")&&(o.githubLabel=e.githubLabel),e.codeownerGithubTeams&&e.codeownerGithubTeams.length){o.codeownerGithubTeams=[];for(n=0;n<e.codeownerGithubTeams.length;++n)o.codeownerGithubTeams[n]=e.codeownerGithubTeams[n]}if(null!=e.docTagPrefix&&Object.hasOwnProperty.call(e,"docTagPrefix")&&(o.docTagPrefix=e.docTagPrefix),null!=e.organization&&Object.hasOwnProperty.call(e,"organization")&&(o.organization=t.enums!==String||void 0===f.google.api.ClientLibraryOrganization[e.organization]?e.organization:f.google.api.ClientLibraryOrganization[e.organization]),e.librarySettings&&e.librarySettings.length){o.librarySettings=[];for(n=0;n<e.librarySettings.length;++n)o.librarySettings[n]=f.google.api.ClientLibrarySettings.toObject(e.librarySettings[n],t,r+1)}return null!=e.protoReferenceDocumentationUri&&Object.hasOwnProperty.call(e,"protoReferenceDocumentationUri")&&(o.protoReferenceDocumentationUri=e.protoReferenceDocumentationUri),null!=e.restReferenceDocumentationUri&&Object.hasOwnProperty.call(e,"restReferenceDocumentationUri")&&(o.restReferenceDocumentationUri=e.restReferenceDocumentationUri),o},D.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},D.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.Publishing"},D),i.JavaSettings=(Io.prototype.libraryPackage="",Io.prototype.serviceClassNames=p.emptyObject,Io.prototype.common=null,Io.create=function(e){return new Io(e)},Io.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.libraryPackage&&Object.hasOwnProperty.call(e,"libraryPackage")&&t.uint32(10).string(e.libraryPackage),null!=e.serviceClassNames&&Object.hasOwnProperty.call(e,"serviceClassNames"))for(var o=Object.keys(e.serviceClassNames),n=0;n<o.length;++n)t.uint32(18).fork().uint32(10).string(o[n]).uint32(18).string(e.serviceClassNames[o[n]]).ldelim();return null!=e.common&&Object.hasOwnProperty.call(e,"common")&&f.google.api.CommonLanguageSettings.encode(e.common,t.uint32(26).fork(),r+1).ldelim(),t},Io.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Io.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.JavaSettings;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.libraryPackage=e.string();break;case 2:i.serviceClassNames===p.emptyObject&&(i.serviceClassNames={});for(var s=e.uint32()+e.pos,l="",c="";e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=e.string();break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.serviceClassNames,l),i.serviceClassNames[l]=c;break;case 3:i.common=f.google.api.CommonLanguageSettings.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Io.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Io.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.libraryPackage&&Object.hasOwnProperty.call(e,"libraryPackage")&&!p.isString(e.libraryPackage))return"libraryPackage: string expected";if(null!=e.serviceClassNames&&Object.hasOwnProperty.call(e,"serviceClassNames")){if(!p.isObject(e.serviceClassNames))return"serviceClassNames: object expected";for(var r=Object.keys(e.serviceClassNames),o=0;o<r.length;++o)if(!p.isString(e.serviceClassNames[r[o]]))return"serviceClassNames: string{k:string} expected"}if(null!=e.common&&Object.hasOwnProperty.call(e,"common")){t=f.google.api.CommonLanguageSettings.verify(e.common,t+1);if(t)return"common."+t}return null},Io.fromObject=function(e,t){if(e instanceof f.google.api.JavaSettings)return e;if(!p.isObject(e))throw TypeError(".google.api.JavaSettings: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.JavaSettings;if(null!=e.libraryPackage&&(r.libraryPackage=String(e.libraryPackage)),e.serviceClassNames){if(!p.isObject(e.serviceClassNames))throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected");r.serviceClassNames={};for(var o=Object.keys(e.serviceClassNames),n=0;n<o.length;++n)"__proto__"===o[n]&&p.makeProp(r.serviceClassNames,o[n]),r.serviceClassNames[o[n]]=String(e.serviceClassNames[o[n]])}if(null!=e.common){if(!p.isObject(e.common))throw TypeError(".google.api.JavaSettings.common: object expected");r.common=f.google.api.CommonLanguageSettings.fromObject(e.common,t+1)}return r},Io.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.objects||t.defaults)&&(n.serviceClassNames={}),t.defaults&&(n.libraryPackage="",n.common=null),null!=e.libraryPackage&&Object.hasOwnProperty.call(e,"libraryPackage")&&(n.libraryPackage=e.libraryPackage),e.serviceClassNames&&(o=Object.keys(e.serviceClassNames)).length){n.serviceClassNames={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.serviceClassNames,o[i]),n.serviceClassNames[o[i]]=e.serviceClassNames[o[i]]}return null!=e.common&&Object.hasOwnProperty.call(e,"common")&&(n.common=f.google.api.CommonLanguageSettings.toObject(e.common,t,r+1)),n},Io.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Io.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.JavaSettings"},Io),i.CppSettings=(Ro.prototype.common=null,Ro.create=function(e){return new Ro(e)},Ro.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.common&&Object.hasOwnProperty.call(e,"common")&&f.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork(),r+1).ldelim(),t},Ro.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ro.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.CppSettings;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.common=f.google.api.CommonLanguageSettings.decode(e,e.uint32(),void 0,o+1):e.skipType(7&a,o)}return i},Ro.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ro.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.common&&Object.hasOwnProperty.call(e,"common")){e=f.google.api.CommonLanguageSettings.verify(e.common,t+1);if(e)return"common."+e}return null},Ro.fromObject=function(e,t){if(e instanceof f.google.api.CppSettings)return e;if(!p.isObject(e))throw TypeError(".google.api.CppSettings: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.CppSettings;if(null!=e.common){if(!p.isObject(e.common))throw TypeError(".google.api.CppSettings.common: object expected");r.common=f.google.api.CommonLanguageSettings.fromObject(e.common,t+1)}return r},Ro.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.common=null),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&(o.common=f.google.api.CommonLanguageSettings.toObject(e.common,t,r+1)),o},Ro.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ro.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.CppSettings"},Ro),i.PhpSettings=(Lo.prototype.common=null,Lo.create=function(e){return new Lo(e)},Lo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.common&&Object.hasOwnProperty.call(e,"common")&&f.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork(),r+1).ldelim(),t},Lo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Lo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.PhpSettings;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.common=f.google.api.CommonLanguageSettings.decode(e,e.uint32(),void 0,o+1):e.skipType(7&a,o)}return i},Lo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Lo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.common&&Object.hasOwnProperty.call(e,"common")){e=f.google.api.CommonLanguageSettings.verify(e.common,t+1);if(e)return"common."+e}return null},Lo.fromObject=function(e,t){if(e instanceof f.google.api.PhpSettings)return e;if(!p.isObject(e))throw TypeError(".google.api.PhpSettings: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.PhpSettings;if(null!=e.common){if(!p.isObject(e.common))throw TypeError(".google.api.PhpSettings.common: object expected");r.common=f.google.api.CommonLanguageSettings.fromObject(e.common,t+1)}return r},Lo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.common=null),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&(o.common=f.google.api.CommonLanguageSettings.toObject(e.common,t,r+1)),o},Lo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Lo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.PhpSettings"},Lo),i.PythonSettings=(_o.prototype.common=null,_o.prototype.experimentalFeatures=null,_o.create=function(e){return new _o(e)},_o.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.common&&Object.hasOwnProperty.call(e,"common")&&f.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork(),r+1).ldelim(),null!=e.experimentalFeatures&&Object.hasOwnProperty.call(e,"experimentalFeatures")&&f.google.api.PythonSettings.ExperimentalFeatures.encode(e.experimentalFeatures,t.uint32(18).fork(),r+1).ldelim(),t},_o.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},_o.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.PythonSettings;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.common=f.google.api.CommonLanguageSettings.decode(e,e.uint32(),void 0,o+1);break;case 2:i.experimentalFeatures=f.google.api.PythonSettings.ExperimentalFeatures.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},_o.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},_o.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.common&&Object.hasOwnProperty.call(e,"common")&&(r=f.google.api.CommonLanguageSettings.verify(e.common,t+1)))return"common."+r;if(null!=e.experimentalFeatures&&Object.hasOwnProperty.call(e,"experimentalFeatures")&&(r=f.google.api.PythonSettings.ExperimentalFeatures.verify(e.experimentalFeatures,t+1)))return"experimentalFeatures."+r;return null},_o.fromObject=function(e,t){if(e instanceof f.google.api.PythonSettings)return e;if(!p.isObject(e))throw TypeError(".google.api.PythonSettings: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.PythonSettings;if(null!=e.common){if(!p.isObject(e.common))throw TypeError(".google.api.PythonSettings.common: object expected");r.common=f.google.api.CommonLanguageSettings.fromObject(e.common,t+1)}if(null!=e.experimentalFeatures){if(!p.isObject(e.experimentalFeatures))throw TypeError(".google.api.PythonSettings.experimentalFeatures: object expected");r.experimentalFeatures=f.google.api.PythonSettings.ExperimentalFeatures.fromObject(e.experimentalFeatures,t+1)}return r},_o.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.common=null,o.experimentalFeatures=null),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&(o.common=f.google.api.CommonLanguageSettings.toObject(e.common,t,r+1)),null!=e.experimentalFeatures&&Object.hasOwnProperty.call(e,"experimentalFeatures")&&(o.experimentalFeatures=f.google.api.PythonSettings.ExperimentalFeatures.toObject(e.experimentalFeatures,t,r+1)),o},_o.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},_o.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.PythonSettings"},_o.ExperimentalFeatures=(Co.prototype.restAsyncIoEnabled=!1,Co.prototype.protobufPythonicTypesEnabled=!1,Co.prototype.unversionedPackageDisabled=!1,Co.create=function(e){return new Co(e)},Co.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.restAsyncIoEnabled&&Object.hasOwnProperty.call(e,"restAsyncIoEnabled")&&t.uint32(8).bool(e.restAsyncIoEnabled),null!=e.protobufPythonicTypesEnabled&&Object.hasOwnProperty.call(e,"protobufPythonicTypesEnabled")&&t.uint32(16).bool(e.protobufPythonicTypesEnabled),null!=e.unversionedPackageDisabled&&Object.hasOwnProperty.call(e,"unversionedPackageDisabled")&&t.uint32(24).bool(e.unversionedPackageDisabled),t},Co.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Co.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.PythonSettings.ExperimentalFeatures;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.restAsyncIoEnabled=e.bool();break;case 2:i.protobufPythonicTypesEnabled=e.bool();break;case 3:i.unversionedPackageDisabled=e.bool();break;default:e.skipType(7&a,o)}}return i},Co.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Co.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.restAsyncIoEnabled&&Object.hasOwnProperty.call(e,"restAsyncIoEnabled")&&"boolean"!=typeof e.restAsyncIoEnabled?"restAsyncIoEnabled: boolean expected":null!=e.protobufPythonicTypesEnabled&&Object.hasOwnProperty.call(e,"protobufPythonicTypesEnabled")&&"boolean"!=typeof e.protobufPythonicTypesEnabled?"protobufPythonicTypesEnabled: boolean expected":null!=e.unversionedPackageDisabled&&Object.hasOwnProperty.call(e,"unversionedPackageDisabled")&&"boolean"!=typeof e.unversionedPackageDisabled?"unversionedPackageDisabled: boolean expected":null},Co.fromObject=function(e,t){if(e instanceof f.google.api.PythonSettings.ExperimentalFeatures)return e;if(!p.isObject(e))throw TypeError(".google.api.PythonSettings.ExperimentalFeatures: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.api.PythonSettings.ExperimentalFeatures;return null!=e.restAsyncIoEnabled&&(t.restAsyncIoEnabled=Boolean(e.restAsyncIoEnabled)),null!=e.protobufPythonicTypesEnabled&&(t.protobufPythonicTypesEnabled=Boolean(e.protobufPythonicTypesEnabled)),null!=e.unversionedPackageDisabled&&(t.unversionedPackageDisabled=Boolean(e.unversionedPackageDisabled)),t},Co.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.restAsyncIoEnabled=!1,r.protobufPythonicTypesEnabled=!1,r.unversionedPackageDisabled=!1),null!=e.restAsyncIoEnabled&&Object.hasOwnProperty.call(e,"restAsyncIoEnabled")&&(r.restAsyncIoEnabled=e.restAsyncIoEnabled),null!=e.protobufPythonicTypesEnabled&&Object.hasOwnProperty.call(e,"protobufPythonicTypesEnabled")&&(r.protobufPythonicTypesEnabled=e.protobufPythonicTypesEnabled),null!=e.unversionedPackageDisabled&&Object.hasOwnProperty.call(e,"unversionedPackageDisabled")&&(r.unversionedPackageDisabled=e.unversionedPackageDisabled),r},Co.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Co.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.PythonSettings.ExperimentalFeatures"},Co),_o),i.NodeSettings=(No.prototype.common=null,No.create=function(e){return new No(e)},No.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.common&&Object.hasOwnProperty.call(e,"common")&&f.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork(),r+1).ldelim(),t},No.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},No.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.NodeSettings;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.common=f.google.api.CommonLanguageSettings.decode(e,e.uint32(),void 0,o+1):e.skipType(7&a,o)}return i},No.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},No.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.common&&Object.hasOwnProperty.call(e,"common")){e=f.google.api.CommonLanguageSettings.verify(e.common,t+1);if(e)return"common."+e}return null},No.fromObject=function(e,t){if(e instanceof f.google.api.NodeSettings)return e;if(!p.isObject(e))throw TypeError(".google.api.NodeSettings: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.NodeSettings;if(null!=e.common){if(!p.isObject(e.common))throw TypeError(".google.api.NodeSettings.common: object expected");r.common=f.google.api.CommonLanguageSettings.fromObject(e.common,t+1)}return r},No.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.common=null),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&(o.common=f.google.api.CommonLanguageSettings.toObject(e.common,t,r+1)),o},No.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},No.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.NodeSettings"},No),i.DotnetSettings=(Ao.prototype.common=null,Ao.prototype.renamedServices=p.emptyObject,Ao.prototype.renamedResources=p.emptyObject,Ao.prototype.ignoredResources=p.emptyArray,Ao.prototype.forcedNamespaceAliases=p.emptyArray,Ao.prototype.handwrittenSignatures=p.emptyArray,Ao.create=function(e){return new Ao(e)},Ao.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.common&&Object.hasOwnProperty.call(e,"common")&&f.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork(),r+1).ldelim(),null!=e.renamedServices&&Object.hasOwnProperty.call(e,"renamedServices"))for(var o=Object.keys(e.renamedServices),n=0;n<o.length;++n)t.uint32(18).fork().uint32(10).string(o[n]).uint32(18).string(e.renamedServices[o[n]]).ldelim();if(null!=e.renamedResources&&Object.hasOwnProperty.call(e,"renamedResources"))for(o=Object.keys(e.renamedResources),n=0;n<o.length;++n)t.uint32(26).fork().uint32(10).string(o[n]).uint32(18).string(e.renamedResources[o[n]]).ldelim();if(null!=e.ignoredResources&&e.ignoredResources.length)for(n=0;n<e.ignoredResources.length;++n)t.uint32(34).string(e.ignoredResources[n]);if(null!=e.forcedNamespaceAliases&&e.forcedNamespaceAliases.length)for(n=0;n<e.forcedNamespaceAliases.length;++n)t.uint32(42).string(e.forcedNamespaceAliases[n]);if(null!=e.handwrittenSignatures&&e.handwrittenSignatures.length)for(n=0;n<e.handwrittenSignatures.length;++n)t.uint32(50).string(e.handwrittenSignatures[n]);return t},Ao.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ao.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.DotnetSettings;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.common=f.google.api.CommonLanguageSettings.decode(e,e.uint32(),void 0,o+1);break;case 2:i.renamedServices===p.emptyObject&&(i.renamedServices={});for(var s=e.uint32()+e.pos,l="",c="";e.pos<s;)switch((u=e.uint32())>>>3){case 1:l=e.string();break;case 2:c=e.string();break;default:e.skipType(7&u,o)}"__proto__"===l&&p.makeProp(i.renamedServices,l),i.renamedServices[l]=c;break;case 3:i.renamedResources===p.emptyObject&&(i.renamedResources={});var u,s=e.uint32()+e.pos;for(c=l="";e.pos<s;)switch((u=e.uint32())>>>3){case 1:l=e.string();break;case 2:c=e.string();break;default:e.skipType(7&u,o)}"__proto__"===l&&p.makeProp(i.renamedResources,l),i.renamedResources[l]=c;break;case 4:i.ignoredResources&&i.ignoredResources.length||(i.ignoredResources=[]),i.ignoredResources.push(e.string());break;case 5:i.forcedNamespaceAliases&&i.forcedNamespaceAliases.length||(i.forcedNamespaceAliases=[]),i.forcedNamespaceAliases.push(e.string());break;case 6:i.handwrittenSignatures&&i.handwrittenSignatures.length||(i.handwrittenSignatures=[]),i.handwrittenSignatures.push(e.string());break;default:e.skipType(7&a,o)}}return i},Ao.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ao.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.common&&Object.hasOwnProperty.call(e,"common")){t=f.google.api.CommonLanguageSettings.verify(e.common,t+1);if(t)return"common."+t}if(null!=e.renamedServices&&Object.hasOwnProperty.call(e,"renamedServices")){if(!p.isObject(e.renamedServices))return"renamedServices: object expected";for(var r=Object.keys(e.renamedServices),o=0;o<r.length;++o)if(!p.isString(e.renamedServices[r[o]]))return"renamedServices: string{k:string} expected"}if(null!=e.renamedResources&&Object.hasOwnProperty.call(e,"renamedResources")){if(!p.isObject(e.renamedResources))return"renamedResources: object expected";for(r=Object.keys(e.renamedResources),o=0;o<r.length;++o)if(!p.isString(e.renamedResources[r[o]]))return"renamedResources: string{k:string} expected"}if(null!=e.ignoredResources&&Object.hasOwnProperty.call(e,"ignoredResources")){if(!Array.isArray(e.ignoredResources))return"ignoredResources: array expected";for(o=0;o<e.ignoredResources.length;++o)if(!p.isString(e.ignoredResources[o]))return"ignoredResources: string[] expected"}if(null!=e.forcedNamespaceAliases&&Object.hasOwnProperty.call(e,"forcedNamespaceAliases")){if(!Array.isArray(e.forcedNamespaceAliases))return"forcedNamespaceAliases: array expected";for(o=0;o<e.forcedNamespaceAliases.length;++o)if(!p.isString(e.forcedNamespaceAliases[o]))return"forcedNamespaceAliases: string[] expected"}if(null!=e.handwrittenSignatures&&Object.hasOwnProperty.call(e,"handwrittenSignatures")){if(!Array.isArray(e.handwrittenSignatures))return"handwrittenSignatures: array expected";for(o=0;o<e.handwrittenSignatures.length;++o)if(!p.isString(e.handwrittenSignatures[o]))return"handwrittenSignatures: string[] expected"}return null},Ao.fromObject=function(e,t){if(e instanceof f.google.api.DotnetSettings)return e;if(!p.isObject(e))throw TypeError(".google.api.DotnetSettings: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.DotnetSettings;if(null!=e.common){if(!p.isObject(e.common))throw TypeError(".google.api.DotnetSettings.common: object expected");r.common=f.google.api.CommonLanguageSettings.fromObject(e.common,t+1)}if(e.renamedServices){if(!p.isObject(e.renamedServices))throw TypeError(".google.api.DotnetSettings.renamedServices: object expected");r.renamedServices={};for(var o=Object.keys(e.renamedServices),n=0;n<o.length;++n)"__proto__"===o[n]&&p.makeProp(r.renamedServices,o[n]),r.renamedServices[o[n]]=String(e.renamedServices[o[n]])}if(e.renamedResources){if(!p.isObject(e.renamedResources))throw TypeError(".google.api.DotnetSettings.renamedResources: object expected");r.renamedResources={};for(o=Object.keys(e.renamedResources),n=0;n<o.length;++n)"__proto__"===o[n]&&p.makeProp(r.renamedResources,o[n]),r.renamedResources[o[n]]=String(e.renamedResources[o[n]])}if(e.ignoredResources){if(!Array.isArray(e.ignoredResources))throw TypeError(".google.api.DotnetSettings.ignoredResources: array expected");r.ignoredResources=[];for(n=0;n<e.ignoredResources.length;++n)r.ignoredResources[n]=String(e.ignoredResources[n])}if(e.forcedNamespaceAliases){if(!Array.isArray(e.forcedNamespaceAliases))throw TypeError(".google.api.DotnetSettings.forcedNamespaceAliases: array expected");r.forcedNamespaceAliases=[];for(n=0;n<e.forcedNamespaceAliases.length;++n)r.forcedNamespaceAliases[n]=String(e.forcedNamespaceAliases[n])}if(e.handwrittenSignatures){if(!Array.isArray(e.handwrittenSignatures))throw TypeError(".google.api.DotnetSettings.handwrittenSignatures: array expected");r.handwrittenSignatures=[];for(n=0;n<e.handwrittenSignatures.length;++n)r.handwrittenSignatures[n]=String(e.handwrittenSignatures[n])}return r},Ao.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.arrays||t.defaults)&&(n.ignoredResources=[],n.forcedNamespaceAliases=[],n.handwrittenSignatures=[]),(t.objects||t.defaults)&&(n.renamedServices={},n.renamedResources={}),t.defaults&&(n.common=null),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&(n.common=f.google.api.CommonLanguageSettings.toObject(e.common,t,r+1)),e.renamedServices&&(o=Object.keys(e.renamedServices)).length){n.renamedServices={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.renamedServices,o[i]),n.renamedServices[o[i]]=e.renamedServices[o[i]]}if(e.renamedResources&&(o=Object.keys(e.renamedResources)).length){n.renamedResources={};for(i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.renamedResources,o[i]),n.renamedResources[o[i]]=e.renamedResources[o[i]]}if(e.ignoredResources&&e.ignoredResources.length){n.ignoredResources=[];for(i=0;i<e.ignoredResources.length;++i)n.ignoredResources[i]=e.ignoredResources[i]}if(e.forcedNamespaceAliases&&e.forcedNamespaceAliases.length){n.forcedNamespaceAliases=[];for(i=0;i<e.forcedNamespaceAliases.length;++i)n.forcedNamespaceAliases[i]=e.forcedNamespaceAliases[i]}if(e.handwrittenSignatures&&e.handwrittenSignatures.length){n.handwrittenSignatures=[];for(i=0;i<e.handwrittenSignatures.length;++i)n.handwrittenSignatures[i]=e.handwrittenSignatures[i]}return n},Ao.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ao.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.DotnetSettings"},Ao),i.RubySettings=(Fo.prototype.common=null,Fo.create=function(e){return new Fo(e)},Fo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.common&&Object.hasOwnProperty.call(e,"common")&&f.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork(),r+1).ldelim(),t},Fo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Fo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.RubySettings;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.common=f.google.api.CommonLanguageSettings.decode(e,e.uint32(),void 0,o+1):e.skipType(7&a,o)}return i},Fo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Fo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.common&&Object.hasOwnProperty.call(e,"common")){e=f.google.api.CommonLanguageSettings.verify(e.common,t+1);if(e)return"common."+e}return null},Fo.fromObject=function(e,t){if(e instanceof f.google.api.RubySettings)return e;if(!p.isObject(e))throw TypeError(".google.api.RubySettings: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.RubySettings;if(null!=e.common){if(!p.isObject(e.common))throw TypeError(".google.api.RubySettings.common: object expected");r.common=f.google.api.CommonLanguageSettings.fromObject(e.common,t+1)}return r},Fo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.common=null),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&(o.common=f.google.api.CommonLanguageSettings.toObject(e.common,t,r+1)),o},Fo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Fo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.RubySettings"},Fo),i.GoSettings=(Vo.prototype.common=null,Vo.prototype.renamedServices=p.emptyObject,Vo.create=function(e){return new Vo(e)},Vo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.common&&Object.hasOwnProperty.call(e,"common")&&f.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork(),r+1).ldelim(),null!=e.renamedServices&&Object.hasOwnProperty.call(e,"renamedServices"))for(var o=Object.keys(e.renamedServices),n=0;n<o.length;++n)t.uint32(18).fork().uint32(10).string(o[n]).uint32(18).string(e.renamedServices[o[n]]).ldelim();return t},Vo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Vo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.GoSettings;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.common=f.google.api.CommonLanguageSettings.decode(e,e.uint32(),void 0,o+1);break;case 2:i.renamedServices===p.emptyObject&&(i.renamedServices={});for(var s=e.uint32()+e.pos,l="",c="";e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=e.string();break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.renamedServices,l),i.renamedServices[l]=c;break;default:e.skipType(7&a,o)}}return i},Vo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Vo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.common&&Object.hasOwnProperty.call(e,"common")){t=f.google.api.CommonLanguageSettings.verify(e.common,t+1);if(t)return"common."+t}if(null!=e.renamedServices&&Object.hasOwnProperty.call(e,"renamedServices")){if(!p.isObject(e.renamedServices))return"renamedServices: object expected";for(var r=Object.keys(e.renamedServices),o=0;o<r.length;++o)if(!p.isString(e.renamedServices[r[o]]))return"renamedServices: string{k:string} expected"}return null},Vo.fromObject=function(e,t){if(e instanceof f.google.api.GoSettings)return e;if(!p.isObject(e))throw TypeError(".google.api.GoSettings: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.GoSettings;if(null!=e.common){if(!p.isObject(e.common))throw TypeError(".google.api.GoSettings.common: object expected");r.common=f.google.api.CommonLanguageSettings.fromObject(e.common,t+1)}if(e.renamedServices){if(!p.isObject(e.renamedServices))throw TypeError(".google.api.GoSettings.renamedServices: object expected");r.renamedServices={};for(var o=Object.keys(e.renamedServices),n=0;n<o.length;++n)"__proto__"===o[n]&&p.makeProp(r.renamedServices,o[n]),r.renamedServices[o[n]]=String(e.renamedServices[o[n]])}return r},Vo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.objects||t.defaults)&&(n.renamedServices={}),t.defaults&&(n.common=null),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&(n.common=f.google.api.CommonLanguageSettings.toObject(e.common,t,r+1)),e.renamedServices&&(o=Object.keys(e.renamedServices)).length){n.renamedServices={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.renamedServices,o[i]),n.renamedServices[o[i]]=e.renamedServices[o[i]]}return n},Vo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Vo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.GoSettings"},Vo),i.MethodSettings=(Uo.prototype.selector="",Uo.prototype.longRunning=null,Uo.prototype.autoPopulatedFields=p.emptyArray,Uo.create=function(e){return new Uo(e)},Uo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.selector&&Object.hasOwnProperty.call(e,"selector")&&t.uint32(10).string(e.selector),null!=e.longRunning&&Object.hasOwnProperty.call(e,"longRunning")&&f.google.api.MethodSettings.LongRunning.encode(e.longRunning,t.uint32(18).fork(),r+1).ldelim(),null!=e.autoPopulatedFields&&e.autoPopulatedFields.length)for(var o=0;o<e.autoPopulatedFields.length;++o)t.uint32(26).string(e.autoPopulatedFields[o]);return t},Uo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Uo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.MethodSettings;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.selector=e.string();break;case 2:i.longRunning=f.google.api.MethodSettings.LongRunning.decode(e,e.uint32(),void 0,o+1);break;case 3:i.autoPopulatedFields&&i.autoPopulatedFields.length||(i.autoPopulatedFields=[]),i.autoPopulatedFields.push(e.string());break;default:e.skipType(7&a,o)}}return i},Uo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Uo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.selector&&Object.hasOwnProperty.call(e,"selector")&&!p.isString(e.selector))return"selector: string expected";if(null!=e.longRunning&&Object.hasOwnProperty.call(e,"longRunning")){t=f.google.api.MethodSettings.LongRunning.verify(e.longRunning,t+1);if(t)return"longRunning."+t}if(null!=e.autoPopulatedFields&&Object.hasOwnProperty.call(e,"autoPopulatedFields")){if(!Array.isArray(e.autoPopulatedFields))return"autoPopulatedFields: array expected";for(var r=0;r<e.autoPopulatedFields.length;++r)if(!p.isString(e.autoPopulatedFields[r]))return"autoPopulatedFields: string[] expected"}return null},Uo.fromObject=function(e,t){if(e instanceof f.google.api.MethodSettings)return e;if(!p.isObject(e))throw TypeError(".google.api.MethodSettings: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.MethodSettings;if(null!=e.selector&&(r.selector=String(e.selector)),null!=e.longRunning){if(!p.isObject(e.longRunning))throw TypeError(".google.api.MethodSettings.longRunning: object expected");r.longRunning=f.google.api.MethodSettings.LongRunning.fromObject(e.longRunning,t+1)}if(e.autoPopulatedFields){if(!Array.isArray(e.autoPopulatedFields))throw TypeError(".google.api.MethodSettings.autoPopulatedFields: array expected");r.autoPopulatedFields=[];for(var o=0;o<e.autoPopulatedFields.length;++o)r.autoPopulatedFields[o]=String(e.autoPopulatedFields[o])}return r},Uo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.autoPopulatedFields=[]),t.defaults&&(o.selector="",o.longRunning=null),null!=e.selector&&Object.hasOwnProperty.call(e,"selector")&&(o.selector=e.selector),null!=e.longRunning&&Object.hasOwnProperty.call(e,"longRunning")&&(o.longRunning=f.google.api.MethodSettings.LongRunning.toObject(e.longRunning,t,r+1)),e.autoPopulatedFields&&e.autoPopulatedFields.length){o.autoPopulatedFields=[];for(var n=0;n<e.autoPopulatedFields.length;++n)o.autoPopulatedFields[n]=e.autoPopulatedFields[n]}return o},Uo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Uo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.MethodSettings"},Uo.LongRunning=(Bo.prototype.initialPollDelay=null,Bo.prototype.pollDelayMultiplier=0,Bo.prototype.maxPollDelay=null,Bo.prototype.totalPollTimeout=null,Bo.create=function(e){return new Bo(e)},Bo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.initialPollDelay&&Object.hasOwnProperty.call(e,"initialPollDelay")&&f.google.protobuf.Duration.encode(e.initialPollDelay,t.uint32(10).fork(),r+1).ldelim(),null!=e.pollDelayMultiplier&&Object.hasOwnProperty.call(e,"pollDelayMultiplier")&&t.uint32(21).float(e.pollDelayMultiplier),null!=e.maxPollDelay&&Object.hasOwnProperty.call(e,"maxPollDelay")&&f.google.protobuf.Duration.encode(e.maxPollDelay,t.uint32(26).fork(),r+1).ldelim(),null!=e.totalPollTimeout&&Object.hasOwnProperty.call(e,"totalPollTimeout")&&f.google.protobuf.Duration.encode(e.totalPollTimeout,t.uint32(34).fork(),r+1).ldelim(),t},Bo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Bo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.MethodSettings.LongRunning;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.initialPollDelay=f.google.protobuf.Duration.decode(e,e.uint32(),void 0,o+1);break;case 2:i.pollDelayMultiplier=e.float();break;case 3:i.maxPollDelay=f.google.protobuf.Duration.decode(e,e.uint32(),void 0,o+1);break;case 4:i.totalPollTimeout=f.google.protobuf.Duration.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Bo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Bo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r;if(null!=e.initialPollDelay&&Object.hasOwnProperty.call(e,"initialPollDelay")&&(r=f.google.protobuf.Duration.verify(e.initialPollDelay,t+1)))return"initialPollDelay."+r;if(null!=e.pollDelayMultiplier&&Object.hasOwnProperty.call(e,"pollDelayMultiplier")&&"number"!=typeof e.pollDelayMultiplier)return"pollDelayMultiplier: number expected";if(null!=e.maxPollDelay&&Object.hasOwnProperty.call(e,"maxPollDelay")&&(r=f.google.protobuf.Duration.verify(e.maxPollDelay,t+1)))return"maxPollDelay."+r;if(null!=e.totalPollTimeout&&Object.hasOwnProperty.call(e,"totalPollTimeout")&&(r=f.google.protobuf.Duration.verify(e.totalPollTimeout,t+1)))return"totalPollTimeout."+r;return null},Bo.fromObject=function(e,t){if(e instanceof f.google.api.MethodSettings.LongRunning)return e;if(!p.isObject(e))throw TypeError(".google.api.MethodSettings.LongRunning: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.MethodSettings.LongRunning;if(null!=e.initialPollDelay){if(!p.isObject(e.initialPollDelay))throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected");r.initialPollDelay=f.google.protobuf.Duration.fromObject(e.initialPollDelay,t+1)}if(null!=e.pollDelayMultiplier&&(r.pollDelayMultiplier=Number(e.pollDelayMultiplier)),null!=e.maxPollDelay){if(!p.isObject(e.maxPollDelay))throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected");r.maxPollDelay=f.google.protobuf.Duration.fromObject(e.maxPollDelay,t+1)}if(null!=e.totalPollTimeout){if(!p.isObject(e.totalPollTimeout))throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected");r.totalPollTimeout=f.google.protobuf.Duration.fromObject(e.totalPollTimeout,t+1)}return r},Bo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.initialPollDelay=null,o.pollDelayMultiplier=0,o.maxPollDelay=null,o.totalPollTimeout=null),null!=e.initialPollDelay&&Object.hasOwnProperty.call(e,"initialPollDelay")&&(o.initialPollDelay=f.google.protobuf.Duration.toObject(e.initialPollDelay,t,r+1)),null!=e.pollDelayMultiplier&&Object.hasOwnProperty.call(e,"pollDelayMultiplier")&&(o.pollDelayMultiplier=t.json&&!isFinite(e.pollDelayMultiplier)?String(e.pollDelayMultiplier):e.pollDelayMultiplier),null!=e.maxPollDelay&&Object.hasOwnProperty.call(e,"maxPollDelay")&&(o.maxPollDelay=f.google.protobuf.Duration.toObject(e.maxPollDelay,t,r+1)),null!=e.totalPollTimeout&&Object.hasOwnProperty.call(e,"totalPollTimeout")&&(o.totalPollTimeout=f.google.protobuf.Duration.toObject(e.totalPollTimeout,t,r+1)),o},Bo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Bo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.MethodSettings.LongRunning"},Bo),Uo),i.ClientLibraryOrganization=(e={},(t=Object.create(e))[e[0]="CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"]=0,t[e[1]="CLOUD"]=1,t[e[2]="ADS"]=2,t[e[3]="PHOTOS"]=3,t[e[4]="STREET_VIEW"]=4,t[e[5]="SHOPPING"]=5,t[e[6]="GEO"]=6,t[e[7]="GENERATIVE_AI"]=7,t),i.ClientLibraryDestination=(e={},(t=Object.create(e))[e[0]="CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"]=0,t[e[10]="GITHUB"]=10,t[e[20]="PACKAGE_MANAGER"]=20,t),i.SelectiveGapicGeneration=(Mo.prototype.methods=p.emptyArray,Mo.prototype.generateOmittedAsInternal=!1,Mo.create=function(e){return new Mo(e)},Mo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.methods&&e.methods.length)for(var o=0;o<e.methods.length;++o)t.uint32(10).string(e.methods[o]);return null!=e.generateOmittedAsInternal&&Object.hasOwnProperty.call(e,"generateOmittedAsInternal")&&t.uint32(16).bool(e.generateOmittedAsInternal),t},Mo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Mo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.SelectiveGapicGeneration;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.methods&&i.methods.length||(i.methods=[]),i.methods.push(e.string());break;case 2:i.generateOmittedAsInternal=e.bool();break;default:e.skipType(7&a,o)}}return i},Mo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Mo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.methods&&Object.hasOwnProperty.call(e,"methods")){if(!Array.isArray(e.methods))return"methods: array expected";for(var r=0;r<e.methods.length;++r)if(!p.isString(e.methods[r]))return"methods: string[] expected"}return null!=e.generateOmittedAsInternal&&Object.hasOwnProperty.call(e,"generateOmittedAsInternal")&&"boolean"!=typeof e.generateOmittedAsInternal?"generateOmittedAsInternal: boolean expected":null},Mo.fromObject=function(e,t){if(e instanceof f.google.api.SelectiveGapicGeneration)return e;if(!p.isObject(e))throw TypeError(".google.api.SelectiveGapicGeneration: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.SelectiveGapicGeneration;if(e.methods){if(!Array.isArray(e.methods))throw TypeError(".google.api.SelectiveGapicGeneration.methods: array expected");r.methods=[];for(var o=0;o<e.methods.length;++o)r.methods[o]=String(e.methods[o])}return null!=e.generateOmittedAsInternal&&(r.generateOmittedAsInternal=Boolean(e.generateOmittedAsInternal)),r},Mo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.methods=[]),t.defaults&&(o.generateOmittedAsInternal=!1),e.methods&&e.methods.length){o.methods=[];for(var n=0;n<e.methods.length;++n)o.methods[n]=e.methods[n]}return null!=e.generateOmittedAsInternal&&Object.hasOwnProperty.call(e,"generateOmittedAsInternal")&&(o.generateOmittedAsInternal=e.generateOmittedAsInternal),o},Mo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Mo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.SelectiveGapicGeneration"},Mo),i.LaunchStage=(e={},(t=Object.create(e))[e[0]="LAUNCH_STAGE_UNSPECIFIED"]=0,t[e[6]="UNIMPLEMENTED"]=6,t[e[7]="PRELAUNCH"]=7,t[e[1]="EARLY_ACCESS"]=1,t[e[2]="ALPHA"]=2,t[e[3]="BETA"]=3,t[e[4]="GA"]=4,t[e[5]="DEPRECATED"]=5,t),i.RoutingRule=(qo.prototype.routingParameters=p.emptyArray,qo.create=function(e){return new qo(e)},qo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.routingParameters&&e.routingParameters.length)for(var o=0;o<e.routingParameters.length;++o)f.google.api.RoutingParameter.encode(e.routingParameters[o],t.uint32(18).fork(),r+1).ldelim();return t},qo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},qo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.RoutingRule;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==2?(i.routingParameters&&i.routingParameters.length||(i.routingParameters=[]),i.routingParameters.push(f.google.api.RoutingParameter.decode(e,e.uint32(),void 0,o+1))):e.skipType(7&a,o)}return i},qo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},qo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.routingParameters&&Object.hasOwnProperty.call(e,"routingParameters")){if(!Array.isArray(e.routingParameters))return"routingParameters: array expected";for(var r=0;r<e.routingParameters.length;++r){var o=f.google.api.RoutingParameter.verify(e.routingParameters[r],t+1);if(o)return"routingParameters."+o}}return null},qo.fromObject=function(e,t){if(e instanceof f.google.api.RoutingRule)return e;if(!p.isObject(e))throw TypeError(".google.api.RoutingRule: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.api.RoutingRule;if(e.routingParameters){if(!Array.isArray(e.routingParameters))throw TypeError(".google.api.RoutingRule.routingParameters: array expected");r.routingParameters=[];for(var o=0;o<e.routingParameters.length;++o){if(!p.isObject(e.routingParameters[o]))throw TypeError(".google.api.RoutingRule.routingParameters: object expected");r.routingParameters[o]=f.google.api.RoutingParameter.fromObject(e.routingParameters[o],t+1)}}return r},qo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.routingParameters=[]),e.routingParameters&&e.routingParameters.length){o.routingParameters=[];for(var n=0;n<e.routingParameters.length;++n)o.routingParameters[n]=f.google.api.RoutingParameter.toObject(e.routingParameters[n],t,r+1)}return o},qo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},qo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.RoutingRule"},qo),i.RoutingParameter=(Qo.prototype.field="",Qo.prototype.pathTemplate="",Qo.create=function(e){return new Qo(e)},Qo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.field&&Object.hasOwnProperty.call(e,"field")&&t.uint32(10).string(e.field),null!=e.pathTemplate&&Object.hasOwnProperty.call(e,"pathTemplate")&&t.uint32(18).string(e.pathTemplate),t},Qo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Qo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.api.RoutingParameter;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.field=e.string();break;case 2:i.pathTemplate=e.string();break;default:e.skipType(7&a,o)}}return i},Qo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Qo.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.field&&Object.hasOwnProperty.call(e,"field")&&!p.isString(e.field)?"field: string expected":null!=e.pathTemplate&&Object.hasOwnProperty.call(e,"pathTemplate")&&!p.isString(e.pathTemplate)?"pathTemplate: string expected":null},Qo.fromObject=function(e,t){if(e instanceof f.google.api.RoutingParameter)return e;if(!p.isObject(e))throw TypeError(".google.api.RoutingParameter: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.api.RoutingParameter;return null!=e.field&&(t.field=String(e.field)),null!=e.pathTemplate&&(t.pathTemplate=String(e.pathTemplate)),t},Qo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.field="",r.pathTemplate=""),null!=e.field&&Object.hasOwnProperty.call(e,"field")&&(r.field=e.field),null!=e.pathTemplate&&Object.hasOwnProperty.call(e,"pathTemplate")&&(r.pathTemplate=e.pathTemplate),r},Qo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Qo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.api.RoutingParameter"},Qo),i),A.protobuf=((r={}).FileDescriptorSet=(Jo.prototype.file=p.emptyArray,Jo.create=function(e){return new Jo(e)},Jo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.file&&e.file.length)for(var o=0;o<e.file.length;++o)f.google.protobuf.FileDescriptorProto.encode(e.file[o],t.uint32(10).fork(),r+1).ldelim();return t},Jo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Jo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.FileDescriptorSet;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?(i.file&&i.file.length||(i.file=[]),i.file.push(f.google.protobuf.FileDescriptorProto.decode(e,e.uint32(),void 0,o+1))):e.skipType(7&a,o)}return i},Jo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Jo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.file&&Object.hasOwnProperty.call(e,"file")){if(!Array.isArray(e.file))return"file: array expected";for(var r=0;r<e.file.length;++r){var o=f.google.protobuf.FileDescriptorProto.verify(e.file[r],t+1);if(o)return"file."+o}}return null},Jo.fromObject=function(e,t){if(e instanceof f.google.protobuf.FileDescriptorSet)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.FileDescriptorSet: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.FileDescriptorSet;if(e.file){if(!Array.isArray(e.file))throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected");r.file=[];for(var o=0;o<e.file.length;++o){if(!p.isObject(e.file[o]))throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected");r.file[o]=f.google.protobuf.FileDescriptorProto.fromObject(e.file[o],t+1)}}return r},Jo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.file=[]),e.file&&e.file.length){o.file=[];for(var n=0;n<e.file.length;++n)o.file[n]=f.google.protobuf.FileDescriptorProto.toObject(e.file[n],t,r+1)}return o},Jo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Jo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.FileDescriptorSet"},Jo),r.Edition=(n={},(e=Object.create(n))[n[0]="EDITION_UNKNOWN"]=0,e[n[900]="EDITION_LEGACY"]=900,e[n[998]="EDITION_PROTO2"]=998,e[n[999]="EDITION_PROTO3"]=999,e[n[1e3]="EDITION_2023"]=1e3,e[n[1001]="EDITION_2024"]=1001,e[n[1]="EDITION_1_TEST_ONLY"]=1,e[n[2]="EDITION_2_TEST_ONLY"]=2,e[n[99997]="EDITION_99997_TEST_ONLY"]=99997,e[n[99998]="EDITION_99998_TEST_ONLY"]=99998,e[n[99999]="EDITION_99999_TEST_ONLY"]=99999,e[n[2147483647]="EDITION_MAX"]=2147483647,e),r.FileDescriptorProto=(I.prototype.name="",I.prototype.package="",I.prototype.dependency=p.emptyArray,I.prototype.publicDependency=p.emptyArray,I.prototype.weakDependency=p.emptyArray,I.prototype.optionDependency=p.emptyArray,I.prototype.messageType=p.emptyArray,I.prototype.enumType=p.emptyArray,I.prototype.service=p.emptyArray,I.prototype.extension=p.emptyArray,I.prototype.options=null,I.prototype.sourceCodeInfo=null,I.prototype.syntax="",I.prototype.edition=0,I.create=function(e){return new I(e)},I.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.package&&Object.hasOwnProperty.call(e,"package")&&t.uint32(18).string(e.package),null!=e.dependency&&e.dependency.length)for(var o=0;o<e.dependency.length;++o)t.uint32(26).string(e.dependency[o]);if(null!=e.messageType&&e.messageType.length)for(o=0;o<e.messageType.length;++o)f.google.protobuf.DescriptorProto.encode(e.messageType[o],t.uint32(34).fork(),r+1).ldelim();if(null!=e.enumType&&e.enumType.length)for(o=0;o<e.enumType.length;++o)f.google.protobuf.EnumDescriptorProto.encode(e.enumType[o],t.uint32(42).fork(),r+1).ldelim();if(null!=e.service&&e.service.length)for(o=0;o<e.service.length;++o)f.google.protobuf.ServiceDescriptorProto.encode(e.service[o],t.uint32(50).fork(),r+1).ldelim();if(null!=e.extension&&e.extension.length)for(o=0;o<e.extension.length;++o)f.google.protobuf.FieldDescriptorProto.encode(e.extension[o],t.uint32(58).fork(),r+1).ldelim();if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&f.google.protobuf.FileOptions.encode(e.options,t.uint32(66).fork(),r+1).ldelim(),null!=e.sourceCodeInfo&&Object.hasOwnProperty.call(e,"sourceCodeInfo")&&f.google.protobuf.SourceCodeInfo.encode(e.sourceCodeInfo,t.uint32(74).fork(),r+1).ldelim(),null!=e.publicDependency&&e.publicDependency.length)for(o=0;o<e.publicDependency.length;++o)t.uint32(80).int32(e.publicDependency[o]);if(null!=e.weakDependency&&e.weakDependency.length)for(o=0;o<e.weakDependency.length;++o)t.uint32(88).int32(e.weakDependency[o]);if(null!=e.syntax&&Object.hasOwnProperty.call(e,"syntax")&&t.uint32(98).string(e.syntax),null!=e.edition&&Object.hasOwnProperty.call(e,"edition")&&t.uint32(112).int32(e.edition),null!=e.optionDependency&&e.optionDependency.length)for(o=0;o<e.optionDependency.length;++o)t.uint32(122).string(e.optionDependency[o]);return t},I.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},I.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.FileDescriptorProto;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.package=e.string();break;case 3:i.dependency&&i.dependency.length||(i.dependency=[]),i.dependency.push(e.string());break;case 10:if(i.publicDependency&&i.publicDependency.length||(i.publicDependency=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.publicDependency.push(e.int32());else i.publicDependency.push(e.int32());break;case 11:if(i.weakDependency&&i.weakDependency.length||(i.weakDependency=[]),2==(7&a))for(s=e.uint32()+e.pos;e.pos<s;)i.weakDependency.push(e.int32());else i.weakDependency.push(e.int32());break;case 15:i.optionDependency&&i.optionDependency.length||(i.optionDependency=[]),i.optionDependency.push(e.string());break;case 4:i.messageType&&i.messageType.length||(i.messageType=[]),i.messageType.push(f.google.protobuf.DescriptorProto.decode(e,e.uint32(),void 0,o+1));break;case 5:i.enumType&&i.enumType.length||(i.enumType=[]),i.enumType.push(f.google.protobuf.EnumDescriptorProto.decode(e,e.uint32(),void 0,o+1));break;case 6:i.service&&i.service.length||(i.service=[]),i.service.push(f.google.protobuf.ServiceDescriptorProto.decode(e,e.uint32(),void 0,o+1));break;case 7:i.extension&&i.extension.length||(i.extension=[]),i.extension.push(f.google.protobuf.FieldDescriptorProto.decode(e,e.uint32(),void 0,o+1));break;case 8:i.options=f.google.protobuf.FileOptions.decode(e,e.uint32(),void 0,o+1);break;case 9:i.sourceCodeInfo=f.google.protobuf.SourceCodeInfo.decode(e,e.uint32(),void 0,o+1);break;case 12:i.syntax=e.string();break;case 14:i.edition=e.int32();break;default:e.skipType(7&a,o)}}return i},I.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},I.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.package&&Object.hasOwnProperty.call(e,"package")&&!p.isString(e.package))return"package: string expected";if(null!=e.dependency&&Object.hasOwnProperty.call(e,"dependency")){if(!Array.isArray(e.dependency))return"dependency: array expected";for(var r=0;r<e.dependency.length;++r)if(!p.isString(e.dependency[r]))return"dependency: string[] expected"}if(null!=e.publicDependency&&Object.hasOwnProperty.call(e,"publicDependency")){if(!Array.isArray(e.publicDependency))return"publicDependency: array expected";for(r=0;r<e.publicDependency.length;++r)if(!p.isInteger(e.publicDependency[r]))return"publicDependency: integer[] expected"}if(null!=e.weakDependency&&Object.hasOwnProperty.call(e,"weakDependency")){if(!Array.isArray(e.weakDependency))return"weakDependency: array expected";for(r=0;r<e.weakDependency.length;++r)if(!p.isInteger(e.weakDependency[r]))return"weakDependency: integer[] expected"}if(null!=e.optionDependency&&Object.hasOwnProperty.call(e,"optionDependency")){if(!Array.isArray(e.optionDependency))return"optionDependency: array expected";for(r=0;r<e.optionDependency.length;++r)if(!p.isString(e.optionDependency[r]))return"optionDependency: string[] expected"}if(null!=e.messageType&&Object.hasOwnProperty.call(e,"messageType")){if(!Array.isArray(e.messageType))return"messageType: array expected";for(r=0;r<e.messageType.length;++r)if(o=f.google.protobuf.DescriptorProto.verify(e.messageType[r],t+1))return"messageType."+o}if(null!=e.enumType&&Object.hasOwnProperty.call(e,"enumType")){if(!Array.isArray(e.enumType))return"enumType: array expected";for(r=0;r<e.enumType.length;++r)if(o=f.google.protobuf.EnumDescriptorProto.verify(e.enumType[r],t+1))return"enumType."+o}if(null!=e.service&&Object.hasOwnProperty.call(e,"service")){if(!Array.isArray(e.service))return"service: array expected";for(r=0;r<e.service.length;++r)if(o=f.google.protobuf.ServiceDescriptorProto.verify(e.service[r],t+1))return"service."+o}if(null!=e.extension&&Object.hasOwnProperty.call(e,"extension")){if(!Array.isArray(e.extension))return"extension: array expected";for(r=0;r<e.extension.length;++r)if(o=f.google.protobuf.FieldDescriptorProto.verify(e.extension[r],t+1))return"extension."+o}var o;if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o=f.google.protobuf.FileOptions.verify(e.options,t+1)))return"options."+o;if(null!=e.sourceCodeInfo&&Object.hasOwnProperty.call(e,"sourceCodeInfo")&&(o=f.google.protobuf.SourceCodeInfo.verify(e.sourceCodeInfo,t+1)))return"sourceCodeInfo."+o;if(null!=e.syntax&&Object.hasOwnProperty.call(e,"syntax")&&!p.isString(e.syntax))return"syntax: string expected";if(null!=e.edition&&Object.hasOwnProperty.call(e,"edition"))switch(e.edition){default:return"edition: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:}return null},I.fromObject=function(e,t){if(e instanceof f.google.protobuf.FileDescriptorProto)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.FileDescriptorProto: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.FileDescriptorProto;if(null!=e.name&&(r.name=String(e.name)),null!=e.package&&(r.package=String(e.package)),e.dependency){if(!Array.isArray(e.dependency))throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected");r.dependency=[];for(var o=0;o<e.dependency.length;++o)r.dependency[o]=String(e.dependency[o])}if(e.publicDependency){if(!Array.isArray(e.publicDependency))throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected");r.publicDependency=[];for(o=0;o<e.publicDependency.length;++o)r.publicDependency[o]=0|e.publicDependency[o]}if(e.weakDependency){if(!Array.isArray(e.weakDependency))throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected");r.weakDependency=[];for(o=0;o<e.weakDependency.length;++o)r.weakDependency[o]=0|e.weakDependency[o]}if(e.optionDependency){if(!Array.isArray(e.optionDependency))throw TypeError(".google.protobuf.FileDescriptorProto.optionDependency: array expected");r.optionDependency=[];for(o=0;o<e.optionDependency.length;++o)r.optionDependency[o]=String(e.optionDependency[o])}if(e.messageType){if(!Array.isArray(e.messageType))throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected");r.messageType=[];for(o=0;o<e.messageType.length;++o){if(!p.isObject(e.messageType[o]))throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected");r.messageType[o]=f.google.protobuf.DescriptorProto.fromObject(e.messageType[o],t+1)}}if(e.enumType){if(!Array.isArray(e.enumType))throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected");r.enumType=[];for(o=0;o<e.enumType.length;++o){if(!p.isObject(e.enumType[o]))throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected");r.enumType[o]=f.google.protobuf.EnumDescriptorProto.fromObject(e.enumType[o],t+1)}}if(e.service){if(!Array.isArray(e.service))throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected");r.service=[];for(o=0;o<e.service.length;++o){if(!p.isObject(e.service[o]))throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected");r.service[o]=f.google.protobuf.ServiceDescriptorProto.fromObject(e.service[o],t+1)}}if(e.extension){if(!Array.isArray(e.extension))throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected");r.extension=[];for(o=0;o<e.extension.length;++o){if(!p.isObject(e.extension[o]))throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected");r.extension[o]=f.google.protobuf.FieldDescriptorProto.fromObject(e.extension[o],t+1)}}if(null!=e.options){if(!p.isObject(e.options))throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected");r.options=f.google.protobuf.FileOptions.fromObject(e.options,t+1)}if(null!=e.sourceCodeInfo){if(!p.isObject(e.sourceCodeInfo))throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected");r.sourceCodeInfo=f.google.protobuf.SourceCodeInfo.fromObject(e.sourceCodeInfo,t+1)}switch(null!=e.syntax&&(r.syntax=String(e.syntax)),e.edition){default:"number"==typeof e.edition&&(r.edition=e.edition);break;case"EDITION_UNKNOWN":case 0:r.edition=0;break;case"EDITION_LEGACY":case 900:r.edition=900;break;case"EDITION_PROTO2":case 998:r.edition=998;break;case"EDITION_PROTO3":case 999:r.edition=999;break;case"EDITION_2023":case 1e3:r.edition=1e3;break;case"EDITION_2024":case 1001:r.edition=1001;break;case"EDITION_1_TEST_ONLY":case 1:r.edition=1;break;case"EDITION_2_TEST_ONLY":case 2:r.edition=2;break;case"EDITION_99997_TEST_ONLY":case 99997:r.edition=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:r.edition=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:r.edition=99999;break;case"EDITION_MAX":case 2147483647:r.edition=2147483647}return r},I.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.dependency=[],o.messageType=[],o.enumType=[],o.service=[],o.extension=[],o.publicDependency=[],o.weakDependency=[],o.optionDependency=[]),t.defaults&&(o.name="",o.package="",o.options=null,o.sourceCodeInfo=null,o.syntax="",o.edition=t.enums===String?"EDITION_UNKNOWN":0),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.package&&Object.hasOwnProperty.call(e,"package")&&(o.package=e.package),e.dependency&&e.dependency.length){o.dependency=[];for(var n=0;n<e.dependency.length;++n)o.dependency[n]=e.dependency[n]}if(e.messageType&&e.messageType.length){o.messageType=[];for(n=0;n<e.messageType.length;++n)o.messageType[n]=f.google.protobuf.DescriptorProto.toObject(e.messageType[n],t,r+1)}if(e.enumType&&e.enumType.length){o.enumType=[];for(n=0;n<e.enumType.length;++n)o.enumType[n]=f.google.protobuf.EnumDescriptorProto.toObject(e.enumType[n],t,r+1)}if(e.service&&e.service.length){o.service=[];for(n=0;n<e.service.length;++n)o.service[n]=f.google.protobuf.ServiceDescriptorProto.toObject(e.service[n],t,r+1)}if(e.extension&&e.extension.length){o.extension=[];for(n=0;n<e.extension.length;++n)o.extension[n]=f.google.protobuf.FieldDescriptorProto.toObject(e.extension[n],t,r+1)}if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o.options=f.google.protobuf.FileOptions.toObject(e.options,t,r+1)),null!=e.sourceCodeInfo&&Object.hasOwnProperty.call(e,"sourceCodeInfo")&&(o.sourceCodeInfo=f.google.protobuf.SourceCodeInfo.toObject(e.sourceCodeInfo,t,r+1)),e.publicDependency&&e.publicDependency.length){o.publicDependency=[];for(n=0;n<e.publicDependency.length;++n)o.publicDependency[n]=e.publicDependency[n]}if(e.weakDependency&&e.weakDependency.length){o.weakDependency=[];for(n=0;n<e.weakDependency.length;++n)o.weakDependency[n]=e.weakDependency[n]}if(null!=e.syntax&&Object.hasOwnProperty.call(e,"syntax")&&(o.syntax=e.syntax),null!=e.edition&&Object.hasOwnProperty.call(e,"edition")&&(o.edition=t.enums!==String||void 0===f.google.protobuf.Edition[e.edition]?e.edition:f.google.protobuf.Edition[e.edition]),e.optionDependency&&e.optionDependency.length){o.optionDependency=[];for(n=0;n<e.optionDependency.length;++n)o.optionDependency[n]=e.optionDependency[n]}return o},I.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},I.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.FileDescriptorProto"},I),r.DescriptorProto=(R.prototype.name="",R.prototype.field=p.emptyArray,R.prototype.extension=p.emptyArray,R.prototype.nestedType=p.emptyArray,R.prototype.enumType=p.emptyArray,R.prototype.extensionRange=p.emptyArray,R.prototype.oneofDecl=p.emptyArray,R.prototype.options=null,R.prototype.reservedRange=p.emptyArray,R.prototype.reservedName=p.emptyArray,R.prototype.visibility=0,R.create=function(e){return new R(e)},R.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.field&&e.field.length)for(var o=0;o<e.field.length;++o)f.google.protobuf.FieldDescriptorProto.encode(e.field[o],t.uint32(18).fork(),r+1).ldelim();if(null!=e.nestedType&&e.nestedType.length)for(o=0;o<e.nestedType.length;++o)f.google.protobuf.DescriptorProto.encode(e.nestedType[o],t.uint32(26).fork(),r+1).ldelim();if(null!=e.enumType&&e.enumType.length)for(o=0;o<e.enumType.length;++o)f.google.protobuf.EnumDescriptorProto.encode(e.enumType[o],t.uint32(34).fork(),r+1).ldelim();if(null!=e.extensionRange&&e.extensionRange.length)for(o=0;o<e.extensionRange.length;++o)f.google.protobuf.DescriptorProto.ExtensionRange.encode(e.extensionRange[o],t.uint32(42).fork(),r+1).ldelim();if(null!=e.extension&&e.extension.length)for(o=0;o<e.extension.length;++o)f.google.protobuf.FieldDescriptorProto.encode(e.extension[o],t.uint32(50).fork(),r+1).ldelim();if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&f.google.protobuf.MessageOptions.encode(e.options,t.uint32(58).fork(),r+1).ldelim(),null!=e.oneofDecl&&e.oneofDecl.length)for(o=0;o<e.oneofDecl.length;++o)f.google.protobuf.OneofDescriptorProto.encode(e.oneofDecl[o],t.uint32(66).fork(),r+1).ldelim();if(null!=e.reservedRange&&e.reservedRange.length)for(o=0;o<e.reservedRange.length;++o)f.google.protobuf.DescriptorProto.ReservedRange.encode(e.reservedRange[o],t.uint32(74).fork(),r+1).ldelim();if(null!=e.reservedName&&e.reservedName.length)for(o=0;o<e.reservedName.length;++o)t.uint32(82).string(e.reservedName[o]);return null!=e.visibility&&Object.hasOwnProperty.call(e,"visibility")&&t.uint32(88).int32(e.visibility),t},R.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},R.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.DescriptorProto;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.field&&i.field.length||(i.field=[]),i.field.push(f.google.protobuf.FieldDescriptorProto.decode(e,e.uint32(),void 0,o+1));break;case 6:i.extension&&i.extension.length||(i.extension=[]),i.extension.push(f.google.protobuf.FieldDescriptorProto.decode(e,e.uint32(),void 0,o+1));break;case 3:i.nestedType&&i.nestedType.length||(i.nestedType=[]),i.nestedType.push(f.google.protobuf.DescriptorProto.decode(e,e.uint32(),void 0,o+1));break;case 4:i.enumType&&i.enumType.length||(i.enumType=[]),i.enumType.push(f.google.protobuf.EnumDescriptorProto.decode(e,e.uint32(),void 0,o+1));break;case 5:i.extensionRange&&i.extensionRange.length||(i.extensionRange=[]),i.extensionRange.push(f.google.protobuf.DescriptorProto.ExtensionRange.decode(e,e.uint32(),void 0,o+1));break;case 8:i.oneofDecl&&i.oneofDecl.length||(i.oneofDecl=[]),i.oneofDecl.push(f.google.protobuf.OneofDescriptorProto.decode(e,e.uint32(),void 0,o+1));break;case 7:i.options=f.google.protobuf.MessageOptions.decode(e,e.uint32(),void 0,o+1);break;case 9:i.reservedRange&&i.reservedRange.length||(i.reservedRange=[]),i.reservedRange.push(f.google.protobuf.DescriptorProto.ReservedRange.decode(e,e.uint32(),void 0,o+1));break;case 10:i.reservedName&&i.reservedName.length||(i.reservedName=[]),i.reservedName.push(e.string());break;case 11:i.visibility=e.int32();break;default:e.skipType(7&a,o)}}return i},R.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},R.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.field&&Object.hasOwnProperty.call(e,"field")){if(!Array.isArray(e.field))return"field: array expected";for(var r=0;r<e.field.length;++r)if(o=f.google.protobuf.FieldDescriptorProto.verify(e.field[r],t+1))return"field."+o}if(null!=e.extension&&Object.hasOwnProperty.call(e,"extension")){if(!Array.isArray(e.extension))return"extension: array expected";for(r=0;r<e.extension.length;++r)if(o=f.google.protobuf.FieldDescriptorProto.verify(e.extension[r],t+1))return"extension."+o}if(null!=e.nestedType&&Object.hasOwnProperty.call(e,"nestedType")){if(!Array.isArray(e.nestedType))return"nestedType: array expected";for(r=0;r<e.nestedType.length;++r)if(o=f.google.protobuf.DescriptorProto.verify(e.nestedType[r],t+1))return"nestedType."+o}if(null!=e.enumType&&Object.hasOwnProperty.call(e,"enumType")){if(!Array.isArray(e.enumType))return"enumType: array expected";for(r=0;r<e.enumType.length;++r)if(o=f.google.protobuf.EnumDescriptorProto.verify(e.enumType[r],t+1))return"enumType."+o}if(null!=e.extensionRange&&Object.hasOwnProperty.call(e,"extensionRange")){if(!Array.isArray(e.extensionRange))return"extensionRange: array expected";for(r=0;r<e.extensionRange.length;++r)if(o=f.google.protobuf.DescriptorProto.ExtensionRange.verify(e.extensionRange[r],t+1))return"extensionRange."+o}if(null!=e.oneofDecl&&Object.hasOwnProperty.call(e,"oneofDecl")){if(!Array.isArray(e.oneofDecl))return"oneofDecl: array expected";for(r=0;r<e.oneofDecl.length;++r)if(o=f.google.protobuf.OneofDescriptorProto.verify(e.oneofDecl[r],t+1))return"oneofDecl."+o}if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o=f.google.protobuf.MessageOptions.verify(e.options,t+1)))return"options."+o;if(null!=e.reservedRange&&Object.hasOwnProperty.call(e,"reservedRange")){if(!Array.isArray(e.reservedRange))return"reservedRange: array expected";for(var o,r=0;r<e.reservedRange.length;++r)if(o=f.google.protobuf.DescriptorProto.ReservedRange.verify(e.reservedRange[r],t+1))return"reservedRange."+o}if(null!=e.reservedName&&Object.hasOwnProperty.call(e,"reservedName")){if(!Array.isArray(e.reservedName))return"reservedName: array expected";for(r=0;r<e.reservedName.length;++r)if(!p.isString(e.reservedName[r]))return"reservedName: string[] expected"}if(null!=e.visibility&&Object.hasOwnProperty.call(e,"visibility"))switch(e.visibility){default:return"visibility: enum value expected";case 0:case 1:case 2:}return null},R.fromObject=function(e,t){if(e instanceof f.google.protobuf.DescriptorProto)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.DescriptorProto: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.DescriptorProto;if(null!=e.name&&(r.name=String(e.name)),e.field){if(!Array.isArray(e.field))throw TypeError(".google.protobuf.DescriptorProto.field: array expected");r.field=[];for(var o=0;o<e.field.length;++o){if(!p.isObject(e.field[o]))throw TypeError(".google.protobuf.DescriptorProto.field: object expected");r.field[o]=f.google.protobuf.FieldDescriptorProto.fromObject(e.field[o],t+1)}}if(e.extension){if(!Array.isArray(e.extension))throw TypeError(".google.protobuf.DescriptorProto.extension: array expected");r.extension=[];for(o=0;o<e.extension.length;++o){if(!p.isObject(e.extension[o]))throw TypeError(".google.protobuf.DescriptorProto.extension: object expected");r.extension[o]=f.google.protobuf.FieldDescriptorProto.fromObject(e.extension[o],t+1)}}if(e.nestedType){if(!Array.isArray(e.nestedType))throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected");r.nestedType=[];for(o=0;o<e.nestedType.length;++o){if(!p.isObject(e.nestedType[o]))throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected");r.nestedType[o]=f.google.protobuf.DescriptorProto.fromObject(e.nestedType[o],t+1)}}if(e.enumType){if(!Array.isArray(e.enumType))throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected");r.enumType=[];for(o=0;o<e.enumType.length;++o){if(!p.isObject(e.enumType[o]))throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected");r.enumType[o]=f.google.protobuf.EnumDescriptorProto.fromObject(e.enumType[o],t+1)}}if(e.extensionRange){if(!Array.isArray(e.extensionRange))throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected");r.extensionRange=[];for(o=0;o<e.extensionRange.length;++o){if(!p.isObject(e.extensionRange[o]))throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected");r.extensionRange[o]=f.google.protobuf.DescriptorProto.ExtensionRange.fromObject(e.extensionRange[o],t+1)}}if(e.oneofDecl){if(!Array.isArray(e.oneofDecl))throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected");r.oneofDecl=[];for(o=0;o<e.oneofDecl.length;++o){if(!p.isObject(e.oneofDecl[o]))throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected");r.oneofDecl[o]=f.google.protobuf.OneofDescriptorProto.fromObject(e.oneofDecl[o],t+1)}}if(null!=e.options){if(!p.isObject(e.options))throw TypeError(".google.protobuf.DescriptorProto.options: object expected");r.options=f.google.protobuf.MessageOptions.fromObject(e.options,t+1)}if(e.reservedRange){if(!Array.isArray(e.reservedRange))throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected");r.reservedRange=[];for(o=0;o<e.reservedRange.length;++o){if(!p.isObject(e.reservedRange[o]))throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected");r.reservedRange[o]=f.google.protobuf.DescriptorProto.ReservedRange.fromObject(e.reservedRange[o],t+1)}}if(e.reservedName){if(!Array.isArray(e.reservedName))throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected");r.reservedName=[];for(o=0;o<e.reservedName.length;++o)r.reservedName[o]=String(e.reservedName[o])}switch(e.visibility){default:"number"==typeof e.visibility&&(r.visibility=e.visibility);break;case"VISIBILITY_UNSET":case 0:r.visibility=0;break;case"VISIBILITY_LOCAL":case 1:r.visibility=1;break;case"VISIBILITY_EXPORT":case 2:r.visibility=2}return r},R.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.field=[],o.nestedType=[],o.enumType=[],o.extensionRange=[],o.extension=[],o.oneofDecl=[],o.reservedRange=[],o.reservedName=[]),t.defaults&&(o.name="",o.options=null,o.visibility=t.enums===String?"VISIBILITY_UNSET":0),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),e.field&&e.field.length){o.field=[];for(var n=0;n<e.field.length;++n)o.field[n]=f.google.protobuf.FieldDescriptorProto.toObject(e.field[n],t,r+1)}if(e.nestedType&&e.nestedType.length){o.nestedType=[];for(n=0;n<e.nestedType.length;++n)o.nestedType[n]=f.google.protobuf.DescriptorProto.toObject(e.nestedType[n],t,r+1)}if(e.enumType&&e.enumType.length){o.enumType=[];for(n=0;n<e.enumType.length;++n)o.enumType[n]=f.google.protobuf.EnumDescriptorProto.toObject(e.enumType[n],t,r+1)}if(e.extensionRange&&e.extensionRange.length){o.extensionRange=[];for(n=0;n<e.extensionRange.length;++n)o.extensionRange[n]=f.google.protobuf.DescriptorProto.ExtensionRange.toObject(e.extensionRange[n],t,r+1)}if(e.extension&&e.extension.length){o.extension=[];for(n=0;n<e.extension.length;++n)o.extension[n]=f.google.protobuf.FieldDescriptorProto.toObject(e.extension[n],t,r+1)}if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o.options=f.google.protobuf.MessageOptions.toObject(e.options,t,r+1)),e.oneofDecl&&e.oneofDecl.length){o.oneofDecl=[];for(n=0;n<e.oneofDecl.length;++n)o.oneofDecl[n]=f.google.protobuf.OneofDescriptorProto.toObject(e.oneofDecl[n],t,r+1)}if(e.reservedRange&&e.reservedRange.length){o.reservedRange=[];for(n=0;n<e.reservedRange.length;++n)o.reservedRange[n]=f.google.protobuf.DescriptorProto.ReservedRange.toObject(e.reservedRange[n],t,r+1)}if(e.reservedName&&e.reservedName.length){o.reservedName=[];for(n=0;n<e.reservedName.length;++n)o.reservedName[n]=e.reservedName[n]}return null!=e.visibility&&Object.hasOwnProperty.call(e,"visibility")&&(o.visibility=t.enums!==String||void 0===f.google.protobuf.SymbolVisibility[e.visibility]?e.visibility:f.google.protobuf.SymbolVisibility[e.visibility]),o},R.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},R.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.DescriptorProto"},R.ExtensionRange=(Go.prototype.start=0,Go.prototype.end=0,Go.prototype.options=null,Go.create=function(e){return new Go(e)},Go.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.start&&Object.hasOwnProperty.call(e,"start")&&t.uint32(8).int32(e.start),null!=e.end&&Object.hasOwnProperty.call(e,"end")&&t.uint32(16).int32(e.end),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&f.google.protobuf.ExtensionRangeOptions.encode(e.options,t.uint32(26).fork(),r+1).ldelim(),t},Go.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Go.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.DescriptorProto.ExtensionRange;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.start=e.int32();break;case 2:i.end=e.int32();break;case 3:i.options=f.google.protobuf.ExtensionRangeOptions.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Go.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Go.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.start&&Object.hasOwnProperty.call(e,"start")&&!p.isInteger(e.start))return"start: integer expected";if(null!=e.end&&Object.hasOwnProperty.call(e,"end")&&!p.isInteger(e.end))return"end: integer expected";if(null!=e.options&&Object.hasOwnProperty.call(e,"options")){e=f.google.protobuf.ExtensionRangeOptions.verify(e.options,t+1);if(e)return"options."+e}return null},Go.fromObject=function(e,t){if(e instanceof f.google.protobuf.DescriptorProto.ExtensionRange)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.DescriptorProto.ExtensionRange;if(null!=e.start&&(r.start=0|e.start),null!=e.end&&(r.end=0|e.end),null!=e.options){if(!p.isObject(e.options))throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected");r.options=f.google.protobuf.ExtensionRangeOptions.fromObject(e.options,t+1)}return r},Go.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.start=0,o.end=0,o.options=null),null!=e.start&&Object.hasOwnProperty.call(e,"start")&&(o.start=e.start),null!=e.end&&Object.hasOwnProperty.call(e,"end")&&(o.end=e.end),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o.options=f.google.protobuf.ExtensionRangeOptions.toObject(e.options,t,r+1)),o},Go.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Go.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.DescriptorProto.ExtensionRange"},Go),R.ReservedRange=(Wo.prototype.start=0,Wo.prototype.end=0,Wo.create=function(e){return new Wo(e)},Wo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.start&&Object.hasOwnProperty.call(e,"start")&&t.uint32(8).int32(e.start),null!=e.end&&Object.hasOwnProperty.call(e,"end")&&t.uint32(16).int32(e.end),t},Wo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Wo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.DescriptorProto.ReservedRange;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.start=e.int32();break;case 2:i.end=e.int32();break;default:e.skipType(7&a,o)}}return i},Wo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Wo.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.start&&Object.hasOwnProperty.call(e,"start")&&!p.isInteger(e.start)?"start: integer expected":null!=e.end&&Object.hasOwnProperty.call(e,"end")&&!p.isInteger(e.end)?"end: integer expected":null},Wo.fromObject=function(e,t){if(e instanceof f.google.protobuf.DescriptorProto.ReservedRange)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.DescriptorProto.ReservedRange: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.DescriptorProto.ReservedRange;return null!=e.start&&(t.start=0|e.start),null!=e.end&&(t.end=0|e.end),t},Wo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.start=0,r.end=0),null!=e.start&&Object.hasOwnProperty.call(e,"start")&&(r.start=e.start),null!=e.end&&Object.hasOwnProperty.call(e,"end")&&(r.end=e.end),r},Wo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Wo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.DescriptorProto.ReservedRange"},Wo),R),r.ExtensionRangeOptions=(zo.prototype.uninterpretedOption=p.emptyArray,zo.prototype.declaration=p.emptyArray,zo.prototype.features=null,zo.prototype.verification=1,zo.create=function(e){return new zo(e)},zo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.declaration&&e.declaration.length)for(var o=0;o<e.declaration.length;++o)f.google.protobuf.ExtensionRangeOptions.Declaration.encode(e.declaration[o],t.uint32(18).fork(),r+1).ldelim();if(null!=e.verification&&Object.hasOwnProperty.call(e,"verification")&&t.uint32(24).int32(e.verification),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&f.google.protobuf.FeatureSet.encode(e.features,t.uint32(402).fork(),r+1).ldelim(),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(o=0;o<e.uninterpretedOption.length;++o)f.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[o],t.uint32(7994).fork(),r+1).ldelim();return t},zo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},zo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.ExtensionRangeOptions;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 999:i.uninterpretedOption&&i.uninterpretedOption.length||(i.uninterpretedOption=[]),i.uninterpretedOption.push(f.google.protobuf.UninterpretedOption.decode(e,e.uint32(),void 0,o+1));break;case 2:i.declaration&&i.declaration.length||(i.declaration=[]),i.declaration.push(f.google.protobuf.ExtensionRangeOptions.Declaration.decode(e,e.uint32(),void 0,o+1));break;case 50:i.features=f.google.protobuf.FeatureSet.decode(e,e.uint32(),void 0,o+1);break;case 3:i.verification=e.int32();break;default:e.skipType(7&a,o)}}return i},zo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},zo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.uninterpretedOption&&Object.hasOwnProperty.call(e,"uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var r=0;r<e.uninterpretedOption.length;++r)if(o=f.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[r],t+1))return"uninterpretedOption."+o}if(null!=e.declaration&&Object.hasOwnProperty.call(e,"declaration")){if(!Array.isArray(e.declaration))return"declaration: array expected";for(r=0;r<e.declaration.length;++r)if(o=f.google.protobuf.ExtensionRangeOptions.Declaration.verify(e.declaration[r],t+1))return"declaration."+o}var o;if(null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(o=f.google.protobuf.FeatureSet.verify(e.features,t+1)))return"features."+o;if(null!=e.verification&&Object.hasOwnProperty.call(e,"verification"))switch(e.verification){default:return"verification: enum value expected";case 0:case 1:}return null},zo.fromObject=function(e,t){if(e instanceof f.google.protobuf.ExtensionRangeOptions)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.ExtensionRangeOptions: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.ExtensionRangeOptions;if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected");r.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o){if(!p.isObject(e.uninterpretedOption[o]))throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected");r.uninterpretedOption[o]=f.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[o],t+1)}}if(e.declaration){if(!Array.isArray(e.declaration))throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: array expected");r.declaration=[];for(o=0;o<e.declaration.length;++o){if(!p.isObject(e.declaration[o]))throw TypeError(".google.protobuf.ExtensionRangeOptions.declaration: object expected");r.declaration[o]=f.google.protobuf.ExtensionRangeOptions.Declaration.fromObject(e.declaration[o],t+1)}}if(null!=e.features){if(!p.isObject(e.features))throw TypeError(".google.protobuf.ExtensionRangeOptions.features: object expected");r.features=f.google.protobuf.FeatureSet.fromObject(e.features,t+1)}switch(e.verification){case"DECLARATION":case 0:r.verification=0;break;default:"number"==typeof e.verification&&(r.verification=e.verification);break;case"UNVERIFIED":case 1:r.verification=1}return r},zo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.declaration=[],o.uninterpretedOption=[]),t.defaults&&(o.verification=t.enums===String?"UNVERIFIED":1,o.features=null),e.declaration&&e.declaration.length){o.declaration=[];for(var n=0;n<e.declaration.length;++n)o.declaration[n]=f.google.protobuf.ExtensionRangeOptions.Declaration.toObject(e.declaration[n],t,r+1)}if(null!=e.verification&&Object.hasOwnProperty.call(e,"verification")&&(o.verification=t.enums!==String||void 0===f.google.protobuf.ExtensionRangeOptions.VerificationState[e.verification]?e.verification:f.google.protobuf.ExtensionRangeOptions.VerificationState[e.verification]),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(o.features=f.google.protobuf.FeatureSet.toObject(e.features,t,r+1)),e.uninterpretedOption&&e.uninterpretedOption.length){o.uninterpretedOption=[];for(n=0;n<e.uninterpretedOption.length;++n)o.uninterpretedOption[n]=f.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[n],t,r+1)}return o},zo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},zo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.ExtensionRangeOptions"},zo.Declaration=(Yo.prototype.number=0,Yo.prototype.fullName="",Yo.prototype.type="",Yo.prototype.reserved=!1,Yo.prototype.repeated=!1,Yo.create=function(e){return new Yo(e)},Yo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.number&&Object.hasOwnProperty.call(e,"number")&&t.uint32(8).int32(e.number),null!=e.fullName&&Object.hasOwnProperty.call(e,"fullName")&&t.uint32(18).string(e.fullName),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(26).string(e.type),null!=e.reserved&&Object.hasOwnProperty.call(e,"reserved")&&t.uint32(40).bool(e.reserved),null!=e.repeated&&Object.hasOwnProperty.call(e,"repeated")&&t.uint32(48).bool(e.repeated),t},Yo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Yo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.ExtensionRangeOptions.Declaration;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.number=e.int32();break;case 2:i.fullName=e.string();break;case 3:i.type=e.string();break;case 5:i.reserved=e.bool();break;case 6:i.repeated=e.bool();break;default:e.skipType(7&a,o)}}return i},Yo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Yo.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.number&&Object.hasOwnProperty.call(e,"number")&&!p.isInteger(e.number)?"number: integer expected":null!=e.fullName&&Object.hasOwnProperty.call(e,"fullName")&&!p.isString(e.fullName)?"fullName: string expected":null!=e.type&&Object.hasOwnProperty.call(e,"type")&&!p.isString(e.type)?"type: string expected":null!=e.reserved&&Object.hasOwnProperty.call(e,"reserved")&&"boolean"!=typeof e.reserved?"reserved: boolean expected":null!=e.repeated&&Object.hasOwnProperty.call(e,"repeated")&&"boolean"!=typeof e.repeated?"repeated: boolean expected":null},Yo.fromObject=function(e,t){if(e instanceof f.google.protobuf.ExtensionRangeOptions.Declaration)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.ExtensionRangeOptions.Declaration: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.ExtensionRangeOptions.Declaration;return null!=e.number&&(t.number=0|e.number),null!=e.fullName&&(t.fullName=String(e.fullName)),null!=e.type&&(t.type=String(e.type)),null!=e.reserved&&(t.reserved=Boolean(e.reserved)),null!=e.repeated&&(t.repeated=Boolean(e.repeated)),t},Yo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.number=0,r.fullName="",r.type="",r.reserved=!1,r.repeated=!1),null!=e.number&&Object.hasOwnProperty.call(e,"number")&&(r.number=e.number),null!=e.fullName&&Object.hasOwnProperty.call(e,"fullName")&&(r.fullName=e.fullName),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&(r.type=e.type),null!=e.reserved&&Object.hasOwnProperty.call(e,"reserved")&&(r.reserved=e.reserved),null!=e.repeated&&Object.hasOwnProperty.call(e,"repeated")&&(r.repeated=e.repeated),r},Yo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Yo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.ExtensionRangeOptions.Declaration"},Yo),zo.VerificationState=(n={},(e=Object.create(n))[n[0]="DECLARATION"]=0,e[n[1]="UNVERIFIED"]=1,e),zo),r.FieldDescriptorProto=(L.prototype.name="",L.prototype.number=0,L.prototype.label=1,L.prototype.type=1,L.prototype.typeName="",L.prototype.extendee="",L.prototype.defaultValue="",L.prototype.oneofIndex=0,L.prototype.jsonName="",L.prototype.options=null,L.prototype.proto3Optional=!1,L.create=function(e){return new L(e)},L.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.extendee&&Object.hasOwnProperty.call(e,"extendee")&&t.uint32(18).string(e.extendee),null!=e.number&&Object.hasOwnProperty.call(e,"number")&&t.uint32(24).int32(e.number),null!=e.label&&Object.hasOwnProperty.call(e,"label")&&t.uint32(32).int32(e.label),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(40).int32(e.type),null!=e.typeName&&Object.hasOwnProperty.call(e,"typeName")&&t.uint32(50).string(e.typeName),null!=e.defaultValue&&Object.hasOwnProperty.call(e,"defaultValue")&&t.uint32(58).string(e.defaultValue),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&f.google.protobuf.FieldOptions.encode(e.options,t.uint32(66).fork(),r+1).ldelim(),null!=e.oneofIndex&&Object.hasOwnProperty.call(e,"oneofIndex")&&t.uint32(72).int32(e.oneofIndex),null!=e.jsonName&&Object.hasOwnProperty.call(e,"jsonName")&&t.uint32(82).string(e.jsonName),null!=e.proto3Optional&&Object.hasOwnProperty.call(e,"proto3Optional")&&t.uint32(136).bool(e.proto3Optional),t},L.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},L.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.FieldDescriptorProto;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 3:i.number=e.int32();break;case 4:i.label=e.int32();break;case 5:i.type=e.int32();break;case 6:i.typeName=e.string();break;case 2:i.extendee=e.string();break;case 7:i.defaultValue=e.string();break;case 9:i.oneofIndex=e.int32();break;case 10:i.jsonName=e.string();break;case 8:i.options=f.google.protobuf.FieldOptions.decode(e,e.uint32(),void 0,o+1);break;case 17:i.proto3Optional=e.bool();break;default:e.skipType(7&a,o)}}return i},L.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},L.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.number&&Object.hasOwnProperty.call(e,"number")&&!p.isInteger(e.number))return"number: integer expected";if(null!=e.label&&Object.hasOwnProperty.call(e,"label"))switch(e.label){default:return"label: enum value expected";case 1:case 3:case 2:}if(null!=e.type&&Object.hasOwnProperty.call(e,"type"))switch(e.type){default:return"type: enum value expected";case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:case 10:case 11:case 12:case 13:case 14:case 15:case 16:case 17:case 18:}if(null!=e.typeName&&Object.hasOwnProperty.call(e,"typeName")&&!p.isString(e.typeName))return"typeName: string expected";if(null!=e.extendee&&Object.hasOwnProperty.call(e,"extendee")&&!p.isString(e.extendee))return"extendee: string expected";if(null!=e.defaultValue&&Object.hasOwnProperty.call(e,"defaultValue")&&!p.isString(e.defaultValue))return"defaultValue: string expected";if(null!=e.oneofIndex&&Object.hasOwnProperty.call(e,"oneofIndex")&&!p.isInteger(e.oneofIndex))return"oneofIndex: integer expected";if(null!=e.jsonName&&Object.hasOwnProperty.call(e,"jsonName")&&!p.isString(e.jsonName))return"jsonName: string expected";if(null!=e.options&&Object.hasOwnProperty.call(e,"options")){t=f.google.protobuf.FieldOptions.verify(e.options,t+1);if(t)return"options."+t}return null!=e.proto3Optional&&Object.hasOwnProperty.call(e,"proto3Optional")&&"boolean"!=typeof e.proto3Optional?"proto3Optional: boolean expected":null},L.fromObject=function(e,t){if(e instanceof f.google.protobuf.FieldDescriptorProto)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.FieldDescriptorProto: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.FieldDescriptorProto;switch(null!=e.name&&(r.name=String(e.name)),null!=e.number&&(r.number=0|e.number),e.label){default:"number"==typeof e.label&&(r.label=e.label);break;case"LABEL_OPTIONAL":case 1:r.label=1;break;case"LABEL_REPEATED":case 3:r.label=3;break;case"LABEL_REQUIRED":case 2:r.label=2}switch(e.type){default:"number"==typeof e.type&&(r.type=e.type);break;case"TYPE_DOUBLE":case 1:r.type=1;break;case"TYPE_FLOAT":case 2:r.type=2;break;case"TYPE_INT64":case 3:r.type=3;break;case"TYPE_UINT64":case 4:r.type=4;break;case"TYPE_INT32":case 5:r.type=5;break;case"TYPE_FIXED64":case 6:r.type=6;break;case"TYPE_FIXED32":case 7:r.type=7;break;case"TYPE_BOOL":case 8:r.type=8;break;case"TYPE_STRING":case 9:r.type=9;break;case"TYPE_GROUP":case 10:r.type=10;break;case"TYPE_MESSAGE":case 11:r.type=11;break;case"TYPE_BYTES":case 12:r.type=12;break;case"TYPE_UINT32":case 13:r.type=13;break;case"TYPE_ENUM":case 14:r.type=14;break;case"TYPE_SFIXED32":case 15:r.type=15;break;case"TYPE_SFIXED64":case 16:r.type=16;break;case"TYPE_SINT32":case 17:r.type=17;break;case"TYPE_SINT64":case 18:r.type=18}if(null!=e.typeName&&(r.typeName=String(e.typeName)),null!=e.extendee&&(r.extendee=String(e.extendee)),null!=e.defaultValue&&(r.defaultValue=String(e.defaultValue)),null!=e.oneofIndex&&(r.oneofIndex=0|e.oneofIndex),null!=e.jsonName&&(r.jsonName=String(e.jsonName)),null!=e.options){if(!p.isObject(e.options))throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected");r.options=f.google.protobuf.FieldOptions.fromObject(e.options,t+1)}return null!=e.proto3Optional&&(r.proto3Optional=Boolean(e.proto3Optional)),r},L.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.name="",o.extendee="",o.number=0,o.label=t.enums===String?"LABEL_OPTIONAL":1,o.type=t.enums===String?"TYPE_DOUBLE":1,o.typeName="",o.defaultValue="",o.options=null,o.oneofIndex=0,o.jsonName="",o.proto3Optional=!1),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.extendee&&Object.hasOwnProperty.call(e,"extendee")&&(o.extendee=e.extendee),null!=e.number&&Object.hasOwnProperty.call(e,"number")&&(o.number=e.number),null!=e.label&&Object.hasOwnProperty.call(e,"label")&&(o.label=t.enums!==String||void 0===f.google.protobuf.FieldDescriptorProto.Label[e.label]?e.label:f.google.protobuf.FieldDescriptorProto.Label[e.label]),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&(o.type=t.enums!==String||void 0===f.google.protobuf.FieldDescriptorProto.Type[e.type]?e.type:f.google.protobuf.FieldDescriptorProto.Type[e.type]),null!=e.typeName&&Object.hasOwnProperty.call(e,"typeName")&&(o.typeName=e.typeName),null!=e.defaultValue&&Object.hasOwnProperty.call(e,"defaultValue")&&(o.defaultValue=e.defaultValue),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o.options=f.google.protobuf.FieldOptions.toObject(e.options,t,r+1)),null!=e.oneofIndex&&Object.hasOwnProperty.call(e,"oneofIndex")&&(o.oneofIndex=e.oneofIndex),null!=e.jsonName&&Object.hasOwnProperty.call(e,"jsonName")&&(o.jsonName=e.jsonName),null!=e.proto3Optional&&Object.hasOwnProperty.call(e,"proto3Optional")&&(o.proto3Optional=e.proto3Optional),o},L.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},L.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.FieldDescriptorProto"},L.Type=(n={},(e=Object.create(n))[n[1]="TYPE_DOUBLE"]=1,e[n[2]="TYPE_FLOAT"]=2,e[n[3]="TYPE_INT64"]=3,e[n[4]="TYPE_UINT64"]=4,e[n[5]="TYPE_INT32"]=5,e[n[6]="TYPE_FIXED64"]=6,e[n[7]="TYPE_FIXED32"]=7,e[n[8]="TYPE_BOOL"]=8,e[n[9]="TYPE_STRING"]=9,e[n[10]="TYPE_GROUP"]=10,e[n[11]="TYPE_MESSAGE"]=11,e[n[12]="TYPE_BYTES"]=12,e[n[13]="TYPE_UINT32"]=13,e[n[14]="TYPE_ENUM"]=14,e[n[15]="TYPE_SFIXED32"]=15,e[n[16]="TYPE_SFIXED64"]=16,e[n[17]="TYPE_SINT32"]=17,e[n[18]="TYPE_SINT64"]=18,e),L.Label=(n={},(e=Object.create(n))[n[1]="LABEL_OPTIONAL"]=1,e[n[3]="LABEL_REPEATED"]=3,e[n[2]="LABEL_REQUIRED"]=2,e),L),r.OneofDescriptorProto=(Ho.prototype.name="",Ho.prototype.options=null,Ho.create=function(e){return new Ho(e)},Ho.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&f.google.protobuf.OneofOptions.encode(e.options,t.uint32(18).fork(),r+1).ldelim(),t},Ho.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ho.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.OneofDescriptorProto;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.options=f.google.protobuf.OneofOptions.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Ho.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ho.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.options&&Object.hasOwnProperty.call(e,"options")){e=f.google.protobuf.OneofOptions.verify(e.options,t+1);if(e)return"options."+e}return null},Ho.fromObject=function(e,t){if(e instanceof f.google.protobuf.OneofDescriptorProto)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.OneofDescriptorProto: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.OneofDescriptorProto;if(null!=e.name&&(r.name=String(e.name)),null!=e.options){if(!p.isObject(e.options))throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected");r.options=f.google.protobuf.OneofOptions.fromObject(e.options,t+1)}return r},Ho.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.name="",o.options=null),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o.options=f.google.protobuf.OneofOptions.toObject(e.options,t,r+1)),o},Ho.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ho.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.OneofDescriptorProto"},Ho),r.EnumDescriptorProto=(Ko.prototype.name="",Ko.prototype.value=p.emptyArray,Ko.prototype.options=null,Ko.prototype.reservedRange=p.emptyArray,Ko.prototype.reservedName=p.emptyArray,Ko.prototype.visibility=0,Ko.create=function(e){return new Ko(e)},Ko.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.value&&e.value.length)for(var o=0;o<e.value.length;++o)f.google.protobuf.EnumValueDescriptorProto.encode(e.value[o],t.uint32(18).fork(),r+1).ldelim();if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&f.google.protobuf.EnumOptions.encode(e.options,t.uint32(26).fork(),r+1).ldelim(),null!=e.reservedRange&&e.reservedRange.length)for(o=0;o<e.reservedRange.length;++o)f.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(e.reservedRange[o],t.uint32(34).fork(),r+1).ldelim();if(null!=e.reservedName&&e.reservedName.length)for(o=0;o<e.reservedName.length;++o)t.uint32(42).string(e.reservedName[o]);return null!=e.visibility&&Object.hasOwnProperty.call(e,"visibility")&&t.uint32(48).int32(e.visibility),t},Ko.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ko.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.EnumDescriptorProto;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.value&&i.value.length||(i.value=[]),i.value.push(f.google.protobuf.EnumValueDescriptorProto.decode(e,e.uint32(),void 0,o+1));break;case 3:i.options=f.google.protobuf.EnumOptions.decode(e,e.uint32(),void 0,o+1);break;case 4:i.reservedRange&&i.reservedRange.length||(i.reservedRange=[]),i.reservedRange.push(f.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(e,e.uint32(),void 0,o+1));break;case 5:i.reservedName&&i.reservedName.length||(i.reservedName=[]),i.reservedName.push(e.string());break;case 6:i.visibility=e.int32();break;default:e.skipType(7&a,o)}}return i},Ko.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ko.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.value&&Object.hasOwnProperty.call(e,"value")){if(!Array.isArray(e.value))return"value: array expected";for(var r=0;r<e.value.length;++r)if(o=f.google.protobuf.EnumValueDescriptorProto.verify(e.value[r],t+1))return"value."+o}if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o=f.google.protobuf.EnumOptions.verify(e.options,t+1)))return"options."+o;if(null!=e.reservedRange&&Object.hasOwnProperty.call(e,"reservedRange")){if(!Array.isArray(e.reservedRange))return"reservedRange: array expected";for(var o,r=0;r<e.reservedRange.length;++r)if(o=f.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(e.reservedRange[r],t+1))return"reservedRange."+o}if(null!=e.reservedName&&Object.hasOwnProperty.call(e,"reservedName")){if(!Array.isArray(e.reservedName))return"reservedName: array expected";for(r=0;r<e.reservedName.length;++r)if(!p.isString(e.reservedName[r]))return"reservedName: string[] expected"}if(null!=e.visibility&&Object.hasOwnProperty.call(e,"visibility"))switch(e.visibility){default:return"visibility: enum value expected";case 0:case 1:case 2:}return null},Ko.fromObject=function(e,t){if(e instanceof f.google.protobuf.EnumDescriptorProto)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.EnumDescriptorProto: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.EnumDescriptorProto;if(null!=e.name&&(r.name=String(e.name)),e.value){if(!Array.isArray(e.value))throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected");r.value=[];for(var o=0;o<e.value.length;++o){if(!p.isObject(e.value[o]))throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected");r.value[o]=f.google.protobuf.EnumValueDescriptorProto.fromObject(e.value[o],t+1)}}if(null!=e.options){if(!p.isObject(e.options))throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected");r.options=f.google.protobuf.EnumOptions.fromObject(e.options,t+1)}if(e.reservedRange){if(!Array.isArray(e.reservedRange))throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected");r.reservedRange=[];for(o=0;o<e.reservedRange.length;++o){if(!p.isObject(e.reservedRange[o]))throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected");r.reservedRange[o]=f.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(e.reservedRange[o],t+1)}}if(e.reservedName){if(!Array.isArray(e.reservedName))throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected");r.reservedName=[];for(o=0;o<e.reservedName.length;++o)r.reservedName[o]=String(e.reservedName[o])}switch(e.visibility){default:"number"==typeof e.visibility&&(r.visibility=e.visibility);break;case"VISIBILITY_UNSET":case 0:r.visibility=0;break;case"VISIBILITY_LOCAL":case 1:r.visibility=1;break;case"VISIBILITY_EXPORT":case 2:r.visibility=2}return r},Ko.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.value=[],o.reservedRange=[],o.reservedName=[]),t.defaults&&(o.name="",o.options=null,o.visibility=t.enums===String?"VISIBILITY_UNSET":0),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),e.value&&e.value.length){o.value=[];for(var n=0;n<e.value.length;++n)o.value[n]=f.google.protobuf.EnumValueDescriptorProto.toObject(e.value[n],t,r+1)}if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o.options=f.google.protobuf.EnumOptions.toObject(e.options,t,r+1)),e.reservedRange&&e.reservedRange.length){o.reservedRange=[];for(n=0;n<e.reservedRange.length;++n)o.reservedRange[n]=f.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(e.reservedRange[n],t,r+1)}if(e.reservedName&&e.reservedName.length){o.reservedName=[];for(n=0;n<e.reservedName.length;++n)o.reservedName[n]=e.reservedName[n]}return null!=e.visibility&&Object.hasOwnProperty.call(e,"visibility")&&(o.visibility=t.enums!==String||void 0===f.google.protobuf.SymbolVisibility[e.visibility]?e.visibility:f.google.protobuf.SymbolVisibility[e.visibility]),o},Ko.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ko.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.EnumDescriptorProto"},Ko.EnumReservedRange=(Xo.prototype.start=0,Xo.prototype.end=0,Xo.create=function(e){return new Xo(e)},Xo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.start&&Object.hasOwnProperty.call(e,"start")&&t.uint32(8).int32(e.start),null!=e.end&&Object.hasOwnProperty.call(e,"end")&&t.uint32(16).int32(e.end),t},Xo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Xo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.EnumDescriptorProto.EnumReservedRange;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.start=e.int32();break;case 2:i.end=e.int32();break;default:e.skipType(7&a,o)}}return i},Xo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Xo.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.start&&Object.hasOwnProperty.call(e,"start")&&!p.isInteger(e.start)?"start: integer expected":null!=e.end&&Object.hasOwnProperty.call(e,"end")&&!p.isInteger(e.end)?"end: integer expected":null},Xo.fromObject=function(e,t){if(e instanceof f.google.protobuf.EnumDescriptorProto.EnumReservedRange)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.EnumDescriptorProto.EnumReservedRange: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.EnumDescriptorProto.EnumReservedRange;return null!=e.start&&(t.start=0|e.start),null!=e.end&&(t.end=0|e.end),t},Xo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.start=0,r.end=0),null!=e.start&&Object.hasOwnProperty.call(e,"start")&&(r.start=e.start),null!=e.end&&Object.hasOwnProperty.call(e,"end")&&(r.end=e.end),r},Xo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Xo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.EnumDescriptorProto.EnumReservedRange"},Xo),Ko),r.EnumValueDescriptorProto=(Zo.prototype.name="",Zo.prototype.number=0,Zo.prototype.options=null,Zo.create=function(e){return new Zo(e)},Zo.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.number&&Object.hasOwnProperty.call(e,"number")&&t.uint32(16).int32(e.number),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&f.google.protobuf.EnumValueOptions.encode(e.options,t.uint32(26).fork(),r+1).ldelim(),t},Zo.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Zo.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.EnumValueDescriptorProto;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.number=e.int32();break;case 3:i.options=f.google.protobuf.EnumValueOptions.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Zo.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Zo.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.number&&Object.hasOwnProperty.call(e,"number")&&!p.isInteger(e.number))return"number: integer expected";if(null!=e.options&&Object.hasOwnProperty.call(e,"options")){e=f.google.protobuf.EnumValueOptions.verify(e.options,t+1);if(e)return"options."+e}return null},Zo.fromObject=function(e,t){if(e instanceof f.google.protobuf.EnumValueDescriptorProto)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.EnumValueDescriptorProto: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.EnumValueDescriptorProto;if(null!=e.name&&(r.name=String(e.name)),null!=e.number&&(r.number=0|e.number),null!=e.options){if(!p.isObject(e.options))throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected");r.options=f.google.protobuf.EnumValueOptions.fromObject(e.options,t+1)}return r},Zo.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.name="",o.number=0,o.options=null),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.number&&Object.hasOwnProperty.call(e,"number")&&(o.number=e.number),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o.options=f.google.protobuf.EnumValueOptions.toObject(e.options,t,r+1)),o},Zo.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Zo.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.EnumValueDescriptorProto"},Zo),r.ServiceDescriptorProto=($o.prototype.name="",$o.prototype.method=p.emptyArray,$o.prototype.options=null,$o.create=function(e){return new $o(e)},$o.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.method&&e.method.length)for(var o=0;o<e.method.length;++o)f.google.protobuf.MethodDescriptorProto.encode(e.method[o],t.uint32(18).fork(),r+1).ldelim();return null!=e.options&&Object.hasOwnProperty.call(e,"options")&&f.google.protobuf.ServiceOptions.encode(e.options,t.uint32(26).fork(),r+1).ldelim(),t},$o.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},$o.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.ServiceDescriptorProto;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.method&&i.method.length||(i.method=[]),i.method.push(f.google.protobuf.MethodDescriptorProto.decode(e,e.uint32(),void 0,o+1));break;case 3:i.options=f.google.protobuf.ServiceOptions.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},$o.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},$o.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.method&&Object.hasOwnProperty.call(e,"method")){if(!Array.isArray(e.method))return"method: array expected";for(var r=0;r<e.method.length;++r)if(o=f.google.protobuf.MethodDescriptorProto.verify(e.method[r],t+1))return"method."+o}var o;if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o=f.google.protobuf.ServiceOptions.verify(e.options,t+1)))return"options."+o;return null},$o.fromObject=function(e,t){if(e instanceof f.google.protobuf.ServiceDescriptorProto)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.ServiceDescriptorProto: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.ServiceDescriptorProto;if(null!=e.name&&(r.name=String(e.name)),e.method){if(!Array.isArray(e.method))throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected");r.method=[];for(var o=0;o<e.method.length;++o){if(!p.isObject(e.method[o]))throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected");r.method[o]=f.google.protobuf.MethodDescriptorProto.fromObject(e.method[o],t+1)}}if(null!=e.options){if(!p.isObject(e.options))throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected");r.options=f.google.protobuf.ServiceOptions.fromObject(e.options,t+1)}return r},$o.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.method=[]),t.defaults&&(o.name="",o.options=null),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),e.method&&e.method.length){o.method=[];for(var n=0;n<e.method.length;++n)o.method[n]=f.google.protobuf.MethodDescriptorProto.toObject(e.method[n],t,r+1)}return null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o.options=f.google.protobuf.ServiceOptions.toObject(e.options,t,r+1)),o},$o.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},$o.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.ServiceDescriptorProto"},$o),r.MethodDescriptorProto=(en.prototype.name="",en.prototype.inputType="",en.prototype.outputType="",en.prototype.options=null,en.prototype.clientStreaming=!1,en.prototype.serverStreaming=!1,en.create=function(e){return new en(e)},en.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.inputType&&Object.hasOwnProperty.call(e,"inputType")&&t.uint32(18).string(e.inputType),null!=e.outputType&&Object.hasOwnProperty.call(e,"outputType")&&t.uint32(26).string(e.outputType),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&f.google.protobuf.MethodOptions.encode(e.options,t.uint32(34).fork(),r+1).ldelim(),null!=e.clientStreaming&&Object.hasOwnProperty.call(e,"clientStreaming")&&t.uint32(40).bool(e.clientStreaming),null!=e.serverStreaming&&Object.hasOwnProperty.call(e,"serverStreaming")&&t.uint32(48).bool(e.serverStreaming),t},en.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},en.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.MethodDescriptorProto;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.inputType=e.string();break;case 3:i.outputType=e.string();break;case 4:i.options=f.google.protobuf.MethodOptions.decode(e,e.uint32(),void 0,o+1);break;case 5:i.clientStreaming=e.bool();break;case 6:i.serverStreaming=e.bool();break;default:e.skipType(7&a,o)}}return i},en.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},en.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.inputType&&Object.hasOwnProperty.call(e,"inputType")&&!p.isString(e.inputType))return"inputType: string expected";if(null!=e.outputType&&Object.hasOwnProperty.call(e,"outputType")&&!p.isString(e.outputType))return"outputType: string expected";if(null!=e.options&&Object.hasOwnProperty.call(e,"options")){t=f.google.protobuf.MethodOptions.verify(e.options,t+1);if(t)return"options."+t}return null!=e.clientStreaming&&Object.hasOwnProperty.call(e,"clientStreaming")&&"boolean"!=typeof e.clientStreaming?"clientStreaming: boolean expected":null!=e.serverStreaming&&Object.hasOwnProperty.call(e,"serverStreaming")&&"boolean"!=typeof e.serverStreaming?"serverStreaming: boolean expected":null},en.fromObject=function(e,t){if(e instanceof f.google.protobuf.MethodDescriptorProto)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.MethodDescriptorProto: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.MethodDescriptorProto;if(null!=e.name&&(r.name=String(e.name)),null!=e.inputType&&(r.inputType=String(e.inputType)),null!=e.outputType&&(r.outputType=String(e.outputType)),null!=e.options){if(!p.isObject(e.options))throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected");r.options=f.google.protobuf.MethodOptions.fromObject(e.options,t+1)}return null!=e.clientStreaming&&(r.clientStreaming=Boolean(e.clientStreaming)),null!=e.serverStreaming&&(r.serverStreaming=Boolean(e.serverStreaming)),r},en.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.name="",o.inputType="",o.outputType="",o.options=null,o.clientStreaming=!1,o.serverStreaming=!1),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.inputType&&Object.hasOwnProperty.call(e,"inputType")&&(o.inputType=e.inputType),null!=e.outputType&&Object.hasOwnProperty.call(e,"outputType")&&(o.outputType=e.outputType),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&(o.options=f.google.protobuf.MethodOptions.toObject(e.options,t,r+1)),null!=e.clientStreaming&&Object.hasOwnProperty.call(e,"clientStreaming")&&(o.clientStreaming=e.clientStreaming),null!=e.serverStreaming&&Object.hasOwnProperty.call(e,"serverStreaming")&&(o.serverStreaming=e.serverStreaming),o},en.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},en.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.MethodDescriptorProto"},en),r.FileOptions=(_.prototype.javaPackage="",_.prototype.javaOuterClassname="",_.prototype.javaMultipleFiles=!1,_.prototype.javaGenerateEqualsAndHash=!1,_.prototype.javaStringCheckUtf8=!1,_.prototype.optimizeFor=1,_.prototype.goPackage="",_.prototype.ccGenericServices=!1,_.prototype.javaGenericServices=!1,_.prototype.pyGenericServices=!1,_.prototype.deprecated=!1,_.prototype.ccEnableArenas=!0,_.prototype.objcClassPrefix="",_.prototype.csharpNamespace="",_.prototype.swiftPrefix="",_.prototype.phpClassPrefix="",_.prototype.phpNamespace="",_.prototype.phpMetadataNamespace="",_.prototype.rubyPackage="",_.prototype.features=null,_.prototype.uninterpretedOption=p.emptyArray,_.prototype[".google.api.resourceDefinition"]=p.emptyArray,_.create=function(e){return new _(e)},_.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.javaPackage&&Object.hasOwnProperty.call(e,"javaPackage")&&t.uint32(10).string(e.javaPackage),null!=e.javaOuterClassname&&Object.hasOwnProperty.call(e,"javaOuterClassname")&&t.uint32(66).string(e.javaOuterClassname),null!=e.optimizeFor&&Object.hasOwnProperty.call(e,"optimizeFor")&&t.uint32(72).int32(e.optimizeFor),null!=e.javaMultipleFiles&&Object.hasOwnProperty.call(e,"javaMultipleFiles")&&t.uint32(80).bool(e.javaMultipleFiles),null!=e.goPackage&&Object.hasOwnProperty.call(e,"goPackage")&&t.uint32(90).string(e.goPackage),null!=e.ccGenericServices&&Object.hasOwnProperty.call(e,"ccGenericServices")&&t.uint32(128).bool(e.ccGenericServices),null!=e.javaGenericServices&&Object.hasOwnProperty.call(e,"javaGenericServices")&&t.uint32(136).bool(e.javaGenericServices),null!=e.pyGenericServices&&Object.hasOwnProperty.call(e,"pyGenericServices")&&t.uint32(144).bool(e.pyGenericServices),null!=e.javaGenerateEqualsAndHash&&Object.hasOwnProperty.call(e,"javaGenerateEqualsAndHash")&&t.uint32(160).bool(e.javaGenerateEqualsAndHash),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&t.uint32(184).bool(e.deprecated),null!=e.javaStringCheckUtf8&&Object.hasOwnProperty.call(e,"javaStringCheckUtf8")&&t.uint32(216).bool(e.javaStringCheckUtf8),null!=e.ccEnableArenas&&Object.hasOwnProperty.call(e,"ccEnableArenas")&&t.uint32(248).bool(e.ccEnableArenas),null!=e.objcClassPrefix&&Object.hasOwnProperty.call(e,"objcClassPrefix")&&t.uint32(290).string(e.objcClassPrefix),null!=e.csharpNamespace&&Object.hasOwnProperty.call(e,"csharpNamespace")&&t.uint32(298).string(e.csharpNamespace),null!=e.swiftPrefix&&Object.hasOwnProperty.call(e,"swiftPrefix")&&t.uint32(314).string(e.swiftPrefix),null!=e.phpClassPrefix&&Object.hasOwnProperty.call(e,"phpClassPrefix")&&t.uint32(322).string(e.phpClassPrefix),null!=e.phpNamespace&&Object.hasOwnProperty.call(e,"phpNamespace")&&t.uint32(330).string(e.phpNamespace),null!=e.phpMetadataNamespace&&Object.hasOwnProperty.call(e,"phpMetadataNamespace")&&t.uint32(354).string(e.phpMetadataNamespace),null!=e.rubyPackage&&Object.hasOwnProperty.call(e,"rubyPackage")&&t.uint32(362).string(e.rubyPackage),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&f.google.protobuf.FeatureSet.encode(e.features,t.uint32(402).fork(),r+1).ldelim(),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var o=0;o<e.uninterpretedOption.length;++o)f.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[o],t.uint32(7994).fork(),r+1).ldelim();if(null!=e[".google.api.resourceDefinition"]&&e[".google.api.resourceDefinition"].length)for(o=0;o<e[".google.api.resourceDefinition"].length;++o)f.google.api.ResourceDescriptor.encode(e[".google.api.resourceDefinition"][o],t.uint32(8426).fork(),r+1).ldelim();return t},_.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},_.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.FileOptions;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.javaPackage=e.string();break;case 8:i.javaOuterClassname=e.string();break;case 10:i.javaMultipleFiles=e.bool();break;case 20:i.javaGenerateEqualsAndHash=e.bool();break;case 27:i.javaStringCheckUtf8=e.bool();break;case 9:i.optimizeFor=e.int32();break;case 11:i.goPackage=e.string();break;case 16:i.ccGenericServices=e.bool();break;case 17:i.javaGenericServices=e.bool();break;case 18:i.pyGenericServices=e.bool();break;case 23:i.deprecated=e.bool();break;case 31:i.ccEnableArenas=e.bool();break;case 36:i.objcClassPrefix=e.string();break;case 37:i.csharpNamespace=e.string();break;case 39:i.swiftPrefix=e.string();break;case 40:i.phpClassPrefix=e.string();break;case 41:i.phpNamespace=e.string();break;case 44:i.phpMetadataNamespace=e.string();break;case 45:i.rubyPackage=e.string();break;case 50:i.features=f.google.protobuf.FeatureSet.decode(e,e.uint32(),void 0,o+1);break;case 999:i.uninterpretedOption&&i.uninterpretedOption.length||(i.uninterpretedOption=[]),i.uninterpretedOption.push(f.google.protobuf.UninterpretedOption.decode(e,e.uint32(),void 0,o+1));break;case 1053:i[".google.api.resourceDefinition"]&&i[".google.api.resourceDefinition"].length||(i[".google.api.resourceDefinition"]=[]),i[".google.api.resourceDefinition"].push(f.google.api.ResourceDescriptor.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},_.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},_.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.javaPackage&&Object.hasOwnProperty.call(e,"javaPackage")&&!p.isString(e.javaPackage))return"javaPackage: string expected";if(null!=e.javaOuterClassname&&Object.hasOwnProperty.call(e,"javaOuterClassname")&&!p.isString(e.javaOuterClassname))return"javaOuterClassname: string expected";if(null!=e.javaMultipleFiles&&Object.hasOwnProperty.call(e,"javaMultipleFiles")&&"boolean"!=typeof e.javaMultipleFiles)return"javaMultipleFiles: boolean expected";if(null!=e.javaGenerateEqualsAndHash&&Object.hasOwnProperty.call(e,"javaGenerateEqualsAndHash")&&"boolean"!=typeof e.javaGenerateEqualsAndHash)return"javaGenerateEqualsAndHash: boolean expected";if(null!=e.javaStringCheckUtf8&&Object.hasOwnProperty.call(e,"javaStringCheckUtf8")&&"boolean"!=typeof e.javaStringCheckUtf8)return"javaStringCheckUtf8: boolean expected";if(null!=e.optimizeFor&&Object.hasOwnProperty.call(e,"optimizeFor"))switch(e.optimizeFor){default:return"optimizeFor: enum value expected";case 1:case 2:case 3:}if(null!=e.goPackage&&Object.hasOwnProperty.call(e,"goPackage")&&!p.isString(e.goPackage))return"goPackage: string expected";if(null!=e.ccGenericServices&&Object.hasOwnProperty.call(e,"ccGenericServices")&&"boolean"!=typeof e.ccGenericServices)return"ccGenericServices: boolean expected";if(null!=e.javaGenericServices&&Object.hasOwnProperty.call(e,"javaGenericServices")&&"boolean"!=typeof e.javaGenericServices)return"javaGenericServices: boolean expected";if(null!=e.pyGenericServices&&Object.hasOwnProperty.call(e,"pyGenericServices")&&"boolean"!=typeof e.pyGenericServices)return"pyGenericServices: boolean expected";if(null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.ccEnableArenas&&Object.hasOwnProperty.call(e,"ccEnableArenas")&&"boolean"!=typeof e.ccEnableArenas)return"ccEnableArenas: boolean expected";if(null!=e.objcClassPrefix&&Object.hasOwnProperty.call(e,"objcClassPrefix")&&!p.isString(e.objcClassPrefix))return"objcClassPrefix: string expected";if(null!=e.csharpNamespace&&Object.hasOwnProperty.call(e,"csharpNamespace")&&!p.isString(e.csharpNamespace))return"csharpNamespace: string expected";if(null!=e.swiftPrefix&&Object.hasOwnProperty.call(e,"swiftPrefix")&&!p.isString(e.swiftPrefix))return"swiftPrefix: string expected";if(null!=e.phpClassPrefix&&Object.hasOwnProperty.call(e,"phpClassPrefix")&&!p.isString(e.phpClassPrefix))return"phpClassPrefix: string expected";if(null!=e.phpNamespace&&Object.hasOwnProperty.call(e,"phpNamespace")&&!p.isString(e.phpNamespace))return"phpNamespace: string expected";if(null!=e.phpMetadataNamespace&&Object.hasOwnProperty.call(e,"phpMetadataNamespace")&&!p.isString(e.phpMetadataNamespace))return"phpMetadataNamespace: string expected";if(null!=e.rubyPackage&&Object.hasOwnProperty.call(e,"rubyPackage")&&!p.isString(e.rubyPackage))return"rubyPackage: string expected";if(null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(o=f.google.protobuf.FeatureSet.verify(e.features,t+1)))return"features."+o;if(null!=e.uninterpretedOption&&Object.hasOwnProperty.call(e,"uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var r=0;r<e.uninterpretedOption.length;++r)if(o=f.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[r],t+1))return"uninterpretedOption."+o}if(null!=e[".google.api.resourceDefinition"]&&Object.hasOwnProperty.call(e,".google.api.resourceDefinition")){if(!Array.isArray(e[".google.api.resourceDefinition"]))return".google.api.resourceDefinition: array expected";for(var o,r=0;r<e[".google.api.resourceDefinition"].length;++r)if(o=f.google.api.ResourceDescriptor.verify(e[".google.api.resourceDefinition"][r],t+1))return".google.api.resourceDefinition."+o}return null},_.fromObject=function(e,t){if(e instanceof f.google.protobuf.FileOptions)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.FileOptions: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.FileOptions;switch(null!=e.javaPackage&&(r.javaPackage=String(e.javaPackage)),null!=e.javaOuterClassname&&(r.javaOuterClassname=String(e.javaOuterClassname)),null!=e.javaMultipleFiles&&(r.javaMultipleFiles=Boolean(e.javaMultipleFiles)),null!=e.javaGenerateEqualsAndHash&&(r.javaGenerateEqualsAndHash=Boolean(e.javaGenerateEqualsAndHash)),null!=e.javaStringCheckUtf8&&(r.javaStringCheckUtf8=Boolean(e.javaStringCheckUtf8)),e.optimizeFor){default:"number"==typeof e.optimizeFor&&(r.optimizeFor=e.optimizeFor);break;case"SPEED":case 1:r.optimizeFor=1;break;case"CODE_SIZE":case 2:r.optimizeFor=2;break;case"LITE_RUNTIME":case 3:r.optimizeFor=3}if(null!=e.goPackage&&(r.goPackage=String(e.goPackage)),null!=e.ccGenericServices&&(r.ccGenericServices=Boolean(e.ccGenericServices)),null!=e.javaGenericServices&&(r.javaGenericServices=Boolean(e.javaGenericServices)),null!=e.pyGenericServices&&(r.pyGenericServices=Boolean(e.pyGenericServices)),null!=e.deprecated&&(r.deprecated=Boolean(e.deprecated)),null!=e.ccEnableArenas&&(r.ccEnableArenas=Boolean(e.ccEnableArenas)),null!=e.objcClassPrefix&&(r.objcClassPrefix=String(e.objcClassPrefix)),null!=e.csharpNamespace&&(r.csharpNamespace=String(e.csharpNamespace)),null!=e.swiftPrefix&&(r.swiftPrefix=String(e.swiftPrefix)),null!=e.phpClassPrefix&&(r.phpClassPrefix=String(e.phpClassPrefix)),null!=e.phpNamespace&&(r.phpNamespace=String(e.phpNamespace)),null!=e.phpMetadataNamespace&&(r.phpMetadataNamespace=String(e.phpMetadataNamespace)),null!=e.rubyPackage&&(r.rubyPackage=String(e.rubyPackage)),null!=e.features){if(!p.isObject(e.features))throw TypeError(".google.protobuf.FileOptions.features: object expected");r.features=f.google.protobuf.FeatureSet.fromObject(e.features,t+1)}if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected");r.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o){if(!p.isObject(e.uninterpretedOption[o]))throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected");r.uninterpretedOption[o]=f.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[o],t+1)}}if(e[".google.api.resourceDefinition"]){if(!Array.isArray(e[".google.api.resourceDefinition"]))throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected");r[".google.api.resourceDefinition"]=[];for(o=0;o<e[".google.api.resourceDefinition"].length;++o){if(!p.isObject(e[".google.api.resourceDefinition"][o]))throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected");r[".google.api.resourceDefinition"][o]=f.google.api.ResourceDescriptor.fromObject(e[".google.api.resourceDefinition"][o],t+1)}}return r},_.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.uninterpretedOption=[],o[".google.api.resourceDefinition"]=[]),t.defaults&&(o.javaPackage="",o.javaOuterClassname="",o.optimizeFor=t.enums===String?"SPEED":1,o.javaMultipleFiles=!1,o.goPackage="",o.ccGenericServices=!1,o.javaGenericServices=!1,o.pyGenericServices=!1,o.javaGenerateEqualsAndHash=!1,o.deprecated=!1,o.javaStringCheckUtf8=!1,o.ccEnableArenas=!0,o.objcClassPrefix="",o.csharpNamespace="",o.swiftPrefix="",o.phpClassPrefix="",o.phpNamespace="",o.phpMetadataNamespace="",o.rubyPackage="",o.features=null),null!=e.javaPackage&&Object.hasOwnProperty.call(e,"javaPackage")&&(o.javaPackage=e.javaPackage),null!=e.javaOuterClassname&&Object.hasOwnProperty.call(e,"javaOuterClassname")&&(o.javaOuterClassname=e.javaOuterClassname),null!=e.optimizeFor&&Object.hasOwnProperty.call(e,"optimizeFor")&&(o.optimizeFor=t.enums!==String||void 0===f.google.protobuf.FileOptions.OptimizeMode[e.optimizeFor]?e.optimizeFor:f.google.protobuf.FileOptions.OptimizeMode[e.optimizeFor]),null!=e.javaMultipleFiles&&Object.hasOwnProperty.call(e,"javaMultipleFiles")&&(o.javaMultipleFiles=e.javaMultipleFiles),null!=e.goPackage&&Object.hasOwnProperty.call(e,"goPackage")&&(o.goPackage=e.goPackage),null!=e.ccGenericServices&&Object.hasOwnProperty.call(e,"ccGenericServices")&&(o.ccGenericServices=e.ccGenericServices),null!=e.javaGenericServices&&Object.hasOwnProperty.call(e,"javaGenericServices")&&(o.javaGenericServices=e.javaGenericServices),null!=e.pyGenericServices&&Object.hasOwnProperty.call(e,"pyGenericServices")&&(o.pyGenericServices=e.pyGenericServices),null!=e.javaGenerateEqualsAndHash&&Object.hasOwnProperty.call(e,"javaGenerateEqualsAndHash")&&(o.javaGenerateEqualsAndHash=e.javaGenerateEqualsAndHash),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&(o.deprecated=e.deprecated),null!=e.javaStringCheckUtf8&&Object.hasOwnProperty.call(e,"javaStringCheckUtf8")&&(o.javaStringCheckUtf8=e.javaStringCheckUtf8),null!=e.ccEnableArenas&&Object.hasOwnProperty.call(e,"ccEnableArenas")&&(o.ccEnableArenas=e.ccEnableArenas),null!=e.objcClassPrefix&&Object.hasOwnProperty.call(e,"objcClassPrefix")&&(o.objcClassPrefix=e.objcClassPrefix),null!=e.csharpNamespace&&Object.hasOwnProperty.call(e,"csharpNamespace")&&(o.csharpNamespace=e.csharpNamespace),null!=e.swiftPrefix&&Object.hasOwnProperty.call(e,"swiftPrefix")&&(o.swiftPrefix=e.swiftPrefix),null!=e.phpClassPrefix&&Object.hasOwnProperty.call(e,"phpClassPrefix")&&(o.phpClassPrefix=e.phpClassPrefix),null!=e.phpNamespace&&Object.hasOwnProperty.call(e,"phpNamespace")&&(o.phpNamespace=e.phpNamespace),null!=e.phpMetadataNamespace&&Object.hasOwnProperty.call(e,"phpMetadataNamespace")&&(o.phpMetadataNamespace=e.phpMetadataNamespace),null!=e.rubyPackage&&Object.hasOwnProperty.call(e,"rubyPackage")&&(o.rubyPackage=e.rubyPackage),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(o.features=f.google.protobuf.FeatureSet.toObject(e.features,t,r+1)),e.uninterpretedOption&&e.uninterpretedOption.length){o.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n)o.uninterpretedOption[n]=f.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[n],t,r+1)}if(e[".google.api.resourceDefinition"]&&e[".google.api.resourceDefinition"].length){o[".google.api.resourceDefinition"]=[];for(n=0;n<e[".google.api.resourceDefinition"].length;++n)o[".google.api.resourceDefinition"][n]=f.google.api.ResourceDescriptor.toObject(e[".google.api.resourceDefinition"][n],t,r+1)}return o},_.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},_.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.FileOptions"},_.OptimizeMode=(n={},(e=Object.create(n))[n[1]="SPEED"]=1,e[n[2]="CODE_SIZE"]=2,e[n[3]="LITE_RUNTIME"]=3,e),_),r.MessageOptions=(tn.prototype.messageSetWireFormat=!1,tn.prototype.noStandardDescriptorAccessor=!1,tn.prototype.deprecated=!1,tn.prototype.mapEntry=!1,tn.prototype.deprecatedLegacyJsonFieldConflicts=!1,tn.prototype.features=null,tn.prototype.uninterpretedOption=p.emptyArray,tn.prototype[".google.api.resource"]=null,tn.create=function(e){return new tn(e)},tn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.messageSetWireFormat&&Object.hasOwnProperty.call(e,"messageSetWireFormat")&&t.uint32(8).bool(e.messageSetWireFormat),null!=e.noStandardDescriptorAccessor&&Object.hasOwnProperty.call(e,"noStandardDescriptorAccessor")&&t.uint32(16).bool(e.noStandardDescriptorAccessor),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&t.uint32(24).bool(e.deprecated),null!=e.mapEntry&&Object.hasOwnProperty.call(e,"mapEntry")&&t.uint32(56).bool(e.mapEntry),null!=e.deprecatedLegacyJsonFieldConflicts&&Object.hasOwnProperty.call(e,"deprecatedLegacyJsonFieldConflicts")&&t.uint32(88).bool(e.deprecatedLegacyJsonFieldConflicts),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&f.google.protobuf.FeatureSet.encode(e.features,t.uint32(98).fork(),r+1).ldelim(),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var o=0;o<e.uninterpretedOption.length;++o)f.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[o],t.uint32(7994).fork(),r+1).ldelim();return null!=e[".google.api.resource"]&&Object.hasOwnProperty.call(e,".google.api.resource")&&f.google.api.ResourceDescriptor.encode(e[".google.api.resource"],t.uint32(8426).fork(),r+1).ldelim(),t},tn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},tn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.MessageOptions;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.messageSetWireFormat=e.bool();break;case 2:i.noStandardDescriptorAccessor=e.bool();break;case 3:i.deprecated=e.bool();break;case 7:i.mapEntry=e.bool();break;case 11:i.deprecatedLegacyJsonFieldConflicts=e.bool();break;case 12:i.features=f.google.protobuf.FeatureSet.decode(e,e.uint32(),void 0,o+1);break;case 999:i.uninterpretedOption&&i.uninterpretedOption.length||(i.uninterpretedOption=[]),i.uninterpretedOption.push(f.google.protobuf.UninterpretedOption.decode(e,e.uint32(),void 0,o+1));break;case 1053:i[".google.api.resource"]=f.google.api.ResourceDescriptor.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},tn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},tn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.messageSetWireFormat&&Object.hasOwnProperty.call(e,"messageSetWireFormat")&&"boolean"!=typeof e.messageSetWireFormat)return"messageSetWireFormat: boolean expected";if(null!=e.noStandardDescriptorAccessor&&Object.hasOwnProperty.call(e,"noStandardDescriptorAccessor")&&"boolean"!=typeof e.noStandardDescriptorAccessor)return"noStandardDescriptorAccessor: boolean expected";if(null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.mapEntry&&Object.hasOwnProperty.call(e,"mapEntry")&&"boolean"!=typeof e.mapEntry)return"mapEntry: boolean expected";if(null!=e.deprecatedLegacyJsonFieldConflicts&&Object.hasOwnProperty.call(e,"deprecatedLegacyJsonFieldConflicts")&&"boolean"!=typeof e.deprecatedLegacyJsonFieldConflicts)return"deprecatedLegacyJsonFieldConflicts: boolean expected";if(null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(r=f.google.protobuf.FeatureSet.verify(e.features,t+1)))return"features."+r;if(null!=e.uninterpretedOption&&Object.hasOwnProperty.call(e,"uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var r,o=0;o<e.uninterpretedOption.length;++o)if(r=f.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[o],t+1))return"uninterpretedOption."+r}if(null!=e[".google.api.resource"]&&Object.hasOwnProperty.call(e,".google.api.resource")&&(r=f.google.api.ResourceDescriptor.verify(e[".google.api.resource"],t+1)))return".google.api.resource."+r;return null},tn.fromObject=function(e,t){if(e instanceof f.google.protobuf.MessageOptions)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.MessageOptions: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.MessageOptions;if(null!=e.messageSetWireFormat&&(r.messageSetWireFormat=Boolean(e.messageSetWireFormat)),null!=e.noStandardDescriptorAccessor&&(r.noStandardDescriptorAccessor=Boolean(e.noStandardDescriptorAccessor)),null!=e.deprecated&&(r.deprecated=Boolean(e.deprecated)),null!=e.mapEntry&&(r.mapEntry=Boolean(e.mapEntry)),null!=e.deprecatedLegacyJsonFieldConflicts&&(r.deprecatedLegacyJsonFieldConflicts=Boolean(e.deprecatedLegacyJsonFieldConflicts)),null!=e.features){if(!p.isObject(e.features))throw TypeError(".google.protobuf.MessageOptions.features: object expected");r.features=f.google.protobuf.FeatureSet.fromObject(e.features,t+1)}if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected");r.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o){if(!p.isObject(e.uninterpretedOption[o]))throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected");r.uninterpretedOption[o]=f.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[o],t+1)}}if(null!=e[".google.api.resource"]){if(!p.isObject(e[".google.api.resource"]))throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected");r[".google.api.resource"]=f.google.api.ResourceDescriptor.fromObject(e[".google.api.resource"],t+1)}return r},tn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.uninterpretedOption=[]),t.defaults&&(o.messageSetWireFormat=!1,o.noStandardDescriptorAccessor=!1,o.deprecated=!1,o.mapEntry=!1,o.deprecatedLegacyJsonFieldConflicts=!1,o.features=null,o[".google.api.resource"]=null),null!=e.messageSetWireFormat&&Object.hasOwnProperty.call(e,"messageSetWireFormat")&&(o.messageSetWireFormat=e.messageSetWireFormat),null!=e.noStandardDescriptorAccessor&&Object.hasOwnProperty.call(e,"noStandardDescriptorAccessor")&&(o.noStandardDescriptorAccessor=e.noStandardDescriptorAccessor),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&(o.deprecated=e.deprecated),null!=e.mapEntry&&Object.hasOwnProperty.call(e,"mapEntry")&&(o.mapEntry=e.mapEntry),null!=e.deprecatedLegacyJsonFieldConflicts&&Object.hasOwnProperty.call(e,"deprecatedLegacyJsonFieldConflicts")&&(o.deprecatedLegacyJsonFieldConflicts=e.deprecatedLegacyJsonFieldConflicts),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(o.features=f.google.protobuf.FeatureSet.toObject(e.features,t,r+1)),e.uninterpretedOption&&e.uninterpretedOption.length){o.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n)o.uninterpretedOption[n]=f.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[n],t,r+1)}return null!=e[".google.api.resource"]&&Object.hasOwnProperty.call(e,".google.api.resource")&&(o[".google.api.resource"]=f.google.api.ResourceDescriptor.toObject(e[".google.api.resource"],t,r+1)),o},tn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},tn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.MessageOptions"},tn),r.FieldOptions=(C.prototype.ctype=0,C.prototype.packed=!1,C.prototype.jstype=0,C.prototype.lazy=!1,C.prototype.unverifiedLazy=!1,C.prototype.deprecated=!1,C.prototype.weak=!1,C.prototype.debugRedact=!1,C.prototype.retention=0,C.prototype.targets=p.emptyArray,C.prototype.editionDefaults=p.emptyArray,C.prototype.features=null,C.prototype.featureSupport=null,C.prototype.uninterpretedOption=p.emptyArray,C.prototype[".google.api.fieldBehavior"]=p.emptyArray,C.prototype[".google.api.resourceReference"]=null,C.create=function(e){return new C(e)},C.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.ctype&&Object.hasOwnProperty.call(e,"ctype")&&t.uint32(8).int32(e.ctype),null!=e.packed&&Object.hasOwnProperty.call(e,"packed")&&t.uint32(16).bool(e.packed),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&t.uint32(24).bool(e.deprecated),null!=e.lazy&&Object.hasOwnProperty.call(e,"lazy")&&t.uint32(40).bool(e.lazy),null!=e.jstype&&Object.hasOwnProperty.call(e,"jstype")&&t.uint32(48).int32(e.jstype),null!=e.weak&&Object.hasOwnProperty.call(e,"weak")&&t.uint32(80).bool(e.weak),null!=e.unverifiedLazy&&Object.hasOwnProperty.call(e,"unverifiedLazy")&&t.uint32(120).bool(e.unverifiedLazy),null!=e.debugRedact&&Object.hasOwnProperty.call(e,"debugRedact")&&t.uint32(128).bool(e.debugRedact),null!=e.retention&&Object.hasOwnProperty.call(e,"retention")&&t.uint32(136).int32(e.retention),null!=e.targets&&e.targets.length)for(var o=0;o<e.targets.length;++o)t.uint32(152).int32(e.targets[o]);if(null!=e.editionDefaults&&e.editionDefaults.length)for(o=0;o<e.editionDefaults.length;++o)f.google.protobuf.FieldOptions.EditionDefault.encode(e.editionDefaults[o],t.uint32(162).fork(),r+1).ldelim();if(null!=e.features&&Object.hasOwnProperty.call(e,"features")&&f.google.protobuf.FeatureSet.encode(e.features,t.uint32(170).fork(),r+1).ldelim(),null!=e.featureSupport&&Object.hasOwnProperty.call(e,"featureSupport")&&f.google.protobuf.FieldOptions.FeatureSupport.encode(e.featureSupport,t.uint32(178).fork(),r+1).ldelim(),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(o=0;o<e.uninterpretedOption.length;++o)f.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[o],t.uint32(7994).fork(),r+1).ldelim();if(null!=e[".google.api.fieldBehavior"]&&e[".google.api.fieldBehavior"].length)for(o=0;o<e[".google.api.fieldBehavior"].length;++o)t.uint32(8416).int32(e[".google.api.fieldBehavior"][o]);return null!=e[".google.api.resourceReference"]&&Object.hasOwnProperty.call(e,".google.api.resourceReference")&&f.google.api.ResourceReference.encode(e[".google.api.resourceReference"],t.uint32(8442).fork(),r+1).ldelim(),t},C.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},C.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.FieldOptions;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.ctype=e.int32();break;case 2:i.packed=e.bool();break;case 6:i.jstype=e.int32();break;case 5:i.lazy=e.bool();break;case 15:i.unverifiedLazy=e.bool();break;case 3:i.deprecated=e.bool();break;case 10:i.weak=e.bool();break;case 16:i.debugRedact=e.bool();break;case 17:i.retention=e.int32();break;case 19:if(i.targets&&i.targets.length||(i.targets=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.targets.push(e.int32());else i.targets.push(e.int32());break;case 20:i.editionDefaults&&i.editionDefaults.length||(i.editionDefaults=[]),i.editionDefaults.push(f.google.protobuf.FieldOptions.EditionDefault.decode(e,e.uint32(),void 0,o+1));break;case 21:i.features=f.google.protobuf.FeatureSet.decode(e,e.uint32(),void 0,o+1);break;case 22:i.featureSupport=f.google.protobuf.FieldOptions.FeatureSupport.decode(e,e.uint32(),void 0,o+1);break;case 999:i.uninterpretedOption&&i.uninterpretedOption.length||(i.uninterpretedOption=[]),i.uninterpretedOption.push(f.google.protobuf.UninterpretedOption.decode(e,e.uint32(),void 0,o+1));break;case 1052:if(i[".google.api.fieldBehavior"]&&i[".google.api.fieldBehavior"].length||(i[".google.api.fieldBehavior"]=[]),2==(7&a))for(s=e.uint32()+e.pos;e.pos<s;)i[".google.api.fieldBehavior"].push(e.int32());else i[".google.api.fieldBehavior"].push(e.int32());break;case 1055:i[".google.api.resourceReference"]=f.google.api.ResourceReference.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},C.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},C.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.ctype&&Object.hasOwnProperty.call(e,"ctype"))switch(e.ctype){default:return"ctype: enum value expected";case 0:case 1:case 2:}if(null!=e.packed&&Object.hasOwnProperty.call(e,"packed")&&"boolean"!=typeof e.packed)return"packed: boolean expected";if(null!=e.jstype&&Object.hasOwnProperty.call(e,"jstype"))switch(e.jstype){default:return"jstype: enum value expected";case 0:case 1:case 2:}if(null!=e.lazy&&Object.hasOwnProperty.call(e,"lazy")&&"boolean"!=typeof e.lazy)return"lazy: boolean expected";if(null!=e.unverifiedLazy&&Object.hasOwnProperty.call(e,"unverifiedLazy")&&"boolean"!=typeof e.unverifiedLazy)return"unverifiedLazy: boolean expected";if(null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.weak&&Object.hasOwnProperty.call(e,"weak")&&"boolean"!=typeof e.weak)return"weak: boolean expected";if(null!=e.debugRedact&&Object.hasOwnProperty.call(e,"debugRedact")&&"boolean"!=typeof e.debugRedact)return"debugRedact: boolean expected";if(null!=e.retention&&Object.hasOwnProperty.call(e,"retention"))switch(e.retention){default:return"retention: enum value expected";case 0:case 1:case 2:}if(null!=e.targets&&Object.hasOwnProperty.call(e,"targets")){if(!Array.isArray(e.targets))return"targets: array expected";for(var r=0;r<e.targets.length;++r)switch(e.targets[r]){default:return"targets: enum value[] expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 9:}}if(null!=e.editionDefaults&&Object.hasOwnProperty.call(e,"editionDefaults")){if(!Array.isArray(e.editionDefaults))return"editionDefaults: array expected";for(r=0;r<e.editionDefaults.length;++r)if(o=f.google.protobuf.FieldOptions.EditionDefault.verify(e.editionDefaults[r],t+1))return"editionDefaults."+o}if(null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(o=f.google.protobuf.FeatureSet.verify(e.features,t+1)))return"features."+o;if(null!=e.featureSupport&&Object.hasOwnProperty.call(e,"featureSupport")&&(o=f.google.protobuf.FieldOptions.FeatureSupport.verify(e.featureSupport,t+1)))return"featureSupport."+o;if(null!=e.uninterpretedOption&&Object.hasOwnProperty.call(e,"uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var o,r=0;r<e.uninterpretedOption.length;++r)if(o=f.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[r],t+1))return"uninterpretedOption."+o}if(null!=e[".google.api.fieldBehavior"]&&Object.hasOwnProperty.call(e,".google.api.fieldBehavior")){if(!Array.isArray(e[".google.api.fieldBehavior"]))return".google.api.fieldBehavior: array expected";for(r=0;r<e[".google.api.fieldBehavior"].length;++r)switch(e[".google.api.fieldBehavior"][r]){default:return".google.api.fieldBehavior: enum value[] expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:}}if(null!=e[".google.api.resourceReference"]&&Object.hasOwnProperty.call(e,".google.api.resourceReference")&&(o=f.google.api.ResourceReference.verify(e[".google.api.resourceReference"],t+1)))return".google.api.resourceReference."+o;return null},C.fromObject=function(e,t){if(e instanceof f.google.protobuf.FieldOptions)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.FieldOptions: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.FieldOptions;switch(e.ctype){default:"number"==typeof e.ctype&&(r.ctype=e.ctype);break;case"STRING":case 0:r.ctype=0;break;case"CORD":case 1:r.ctype=1;break;case"STRING_PIECE":case 2:r.ctype=2}switch(null!=e.packed&&(r.packed=Boolean(e.packed)),e.jstype){default:"number"==typeof e.jstype&&(r.jstype=e.jstype);break;case"JS_NORMAL":case 0:r.jstype=0;break;case"JS_STRING":case 1:r.jstype=1;break;case"JS_NUMBER":case 2:r.jstype=2}switch(null!=e.lazy&&(r.lazy=Boolean(e.lazy)),null!=e.unverifiedLazy&&(r.unverifiedLazy=Boolean(e.unverifiedLazy)),null!=e.deprecated&&(r.deprecated=Boolean(e.deprecated)),null!=e.weak&&(r.weak=Boolean(e.weak)),null!=e.debugRedact&&(r.debugRedact=Boolean(e.debugRedact)),e.retention){default:"number"==typeof e.retention&&(r.retention=e.retention);break;case"RETENTION_UNKNOWN":case 0:r.retention=0;break;case"RETENTION_RUNTIME":case 1:r.retention=1;break;case"RETENTION_SOURCE":case 2:r.retention=2}if(e.targets){if(!Array.isArray(e.targets))throw TypeError(".google.protobuf.FieldOptions.targets: array expected");r.targets=[];for(var o=0;o<e.targets.length;++o)switch(e.targets[o]){default:if("number"==typeof e.targets[o]){r.targets[o]=e.targets[o];break}case"TARGET_TYPE_UNKNOWN":case 0:r.targets[o]=0;break;case"TARGET_TYPE_FILE":case 1:r.targets[o]=1;break;case"TARGET_TYPE_EXTENSION_RANGE":case 2:r.targets[o]=2;break;case"TARGET_TYPE_MESSAGE":case 3:r.targets[o]=3;break;case"TARGET_TYPE_FIELD":case 4:r.targets[o]=4;break;case"TARGET_TYPE_ONEOF":case 5:r.targets[o]=5;break;case"TARGET_TYPE_ENUM":case 6:r.targets[o]=6;break;case"TARGET_TYPE_ENUM_ENTRY":case 7:r.targets[o]=7;break;case"TARGET_TYPE_SERVICE":case 8:r.targets[o]=8;break;case"TARGET_TYPE_METHOD":case 9:r.targets[o]=9}}if(e.editionDefaults){if(!Array.isArray(e.editionDefaults))throw TypeError(".google.protobuf.FieldOptions.editionDefaults: array expected");r.editionDefaults=[];for(o=0;o<e.editionDefaults.length;++o){if(!p.isObject(e.editionDefaults[o]))throw TypeError(".google.protobuf.FieldOptions.editionDefaults: object expected");r.editionDefaults[o]=f.google.protobuf.FieldOptions.EditionDefault.fromObject(e.editionDefaults[o],t+1)}}if(null!=e.features){if(!p.isObject(e.features))throw TypeError(".google.protobuf.FieldOptions.features: object expected");r.features=f.google.protobuf.FeatureSet.fromObject(e.features,t+1)}if(null!=e.featureSupport){if(!p.isObject(e.featureSupport))throw TypeError(".google.protobuf.FieldOptions.featureSupport: object expected");r.featureSupport=f.google.protobuf.FieldOptions.FeatureSupport.fromObject(e.featureSupport,t+1)}if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected");r.uninterpretedOption=[];for(o=0;o<e.uninterpretedOption.length;++o){if(!p.isObject(e.uninterpretedOption[o]))throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected");r.uninterpretedOption[o]=f.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[o],t+1)}}if(e[".google.api.fieldBehavior"]){if(!Array.isArray(e[".google.api.fieldBehavior"]))throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected");r[".google.api.fieldBehavior"]=[];for(o=0;o<e[".google.api.fieldBehavior"].length;++o)switch(e[".google.api.fieldBehavior"][o]){default:if("number"==typeof e[".google.api.fieldBehavior"][o]){r[".google.api.fieldBehavior"][o]=e[".google.api.fieldBehavior"][o];break}case"FIELD_BEHAVIOR_UNSPECIFIED":case 0:r[".google.api.fieldBehavior"][o]=0;break;case"OPTIONAL":case 1:r[".google.api.fieldBehavior"][o]=1;break;case"REQUIRED":case 2:r[".google.api.fieldBehavior"][o]=2;break;case"OUTPUT_ONLY":case 3:r[".google.api.fieldBehavior"][o]=3;break;case"INPUT_ONLY":case 4:r[".google.api.fieldBehavior"][o]=4;break;case"IMMUTABLE":case 5:r[".google.api.fieldBehavior"][o]=5;break;case"UNORDERED_LIST":case 6:r[".google.api.fieldBehavior"][o]=6;break;case"NON_EMPTY_DEFAULT":case 7:r[".google.api.fieldBehavior"][o]=7;break;case"IDENTIFIER":case 8:r[".google.api.fieldBehavior"][o]=8}}if(null!=e[".google.api.resourceReference"]){if(!p.isObject(e[".google.api.resourceReference"]))throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected");r[".google.api.resourceReference"]=f.google.api.ResourceReference.fromObject(e[".google.api.resourceReference"],t+1)}return r},C.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.targets=[],o.editionDefaults=[],o.uninterpretedOption=[],o[".google.api.fieldBehavior"]=[]),t.defaults&&(o.ctype=t.enums===String?"STRING":0,o.packed=!1,o.deprecated=!1,o.lazy=!1,o.jstype=t.enums===String?"JS_NORMAL":0,o.weak=!1,o.unverifiedLazy=!1,o.debugRedact=!1,o.retention=t.enums===String?"RETENTION_UNKNOWN":0,o.features=null,o.featureSupport=null,o[".google.api.resourceReference"]=null),null!=e.ctype&&Object.hasOwnProperty.call(e,"ctype")&&(o.ctype=t.enums!==String||void 0===f.google.protobuf.FieldOptions.CType[e.ctype]?e.ctype:f.google.protobuf.FieldOptions.CType[e.ctype]),null!=e.packed&&Object.hasOwnProperty.call(e,"packed")&&(o.packed=e.packed),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&(o.deprecated=e.deprecated),null!=e.lazy&&Object.hasOwnProperty.call(e,"lazy")&&(o.lazy=e.lazy),null!=e.jstype&&Object.hasOwnProperty.call(e,"jstype")&&(o.jstype=t.enums!==String||void 0===f.google.protobuf.FieldOptions.JSType[e.jstype]?e.jstype:f.google.protobuf.FieldOptions.JSType[e.jstype]),null!=e.weak&&Object.hasOwnProperty.call(e,"weak")&&(o.weak=e.weak),null!=e.unverifiedLazy&&Object.hasOwnProperty.call(e,"unverifiedLazy")&&(o.unverifiedLazy=e.unverifiedLazy),null!=e.debugRedact&&Object.hasOwnProperty.call(e,"debugRedact")&&(o.debugRedact=e.debugRedact),null!=e.retention&&Object.hasOwnProperty.call(e,"retention")&&(o.retention=t.enums!==String||void 0===f.google.protobuf.FieldOptions.OptionRetention[e.retention]?e.retention:f.google.protobuf.FieldOptions.OptionRetention[e.retention]),e.targets&&e.targets.length){o.targets=[];for(var n=0;n<e.targets.length;++n)o.targets[n]=t.enums!==String||void 0===f.google.protobuf.FieldOptions.OptionTargetType[e.targets[n]]?e.targets[n]:f.google.protobuf.FieldOptions.OptionTargetType[e.targets[n]]}if(e.editionDefaults&&e.editionDefaults.length){o.editionDefaults=[];for(n=0;n<e.editionDefaults.length;++n)o.editionDefaults[n]=f.google.protobuf.FieldOptions.EditionDefault.toObject(e.editionDefaults[n],t,r+1)}if(null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(o.features=f.google.protobuf.FeatureSet.toObject(e.features,t,r+1)),null!=e.featureSupport&&Object.hasOwnProperty.call(e,"featureSupport")&&(o.featureSupport=f.google.protobuf.FieldOptions.FeatureSupport.toObject(e.featureSupport,t,r+1)),e.uninterpretedOption&&e.uninterpretedOption.length){o.uninterpretedOption=[];for(n=0;n<e.uninterpretedOption.length;++n)o.uninterpretedOption[n]=f.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[n],t,r+1)}if(e[".google.api.fieldBehavior"]&&e[".google.api.fieldBehavior"].length){o[".google.api.fieldBehavior"]=[];for(n=0;n<e[".google.api.fieldBehavior"].length;++n)o[".google.api.fieldBehavior"][n]=t.enums!==String||void 0===f.google.api.FieldBehavior[e[".google.api.fieldBehavior"][n]]?e[".google.api.fieldBehavior"][n]:f.google.api.FieldBehavior[e[".google.api.fieldBehavior"][n]]}return null!=e[".google.api.resourceReference"]&&Object.hasOwnProperty.call(e,".google.api.resourceReference")&&(o[".google.api.resourceReference"]=f.google.api.ResourceReference.toObject(e[".google.api.resourceReference"],t,r+1)),o},C.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},C.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.FieldOptions"},C.CType=(n={},(e=Object.create(n))[n[0]="STRING"]=0,e[n[1]="CORD"]=1,e[n[2]="STRING_PIECE"]=2,e),C.JSType=(n={},(e=Object.create(n))[n[0]="JS_NORMAL"]=0,e[n[1]="JS_STRING"]=1,e[n[2]="JS_NUMBER"]=2,e),C.OptionRetention=(n={},(e=Object.create(n))[n[0]="RETENTION_UNKNOWN"]=0,e[n[1]="RETENTION_RUNTIME"]=1,e[n[2]="RETENTION_SOURCE"]=2,e),C.OptionTargetType=(n={},(e=Object.create(n))[n[0]="TARGET_TYPE_UNKNOWN"]=0,e[n[1]="TARGET_TYPE_FILE"]=1,e[n[2]="TARGET_TYPE_EXTENSION_RANGE"]=2,e[n[3]="TARGET_TYPE_MESSAGE"]=3,e[n[4]="TARGET_TYPE_FIELD"]=4,e[n[5]="TARGET_TYPE_ONEOF"]=5,e[n[6]="TARGET_TYPE_ENUM"]=6,e[n[7]="TARGET_TYPE_ENUM_ENTRY"]=7,e[n[8]="TARGET_TYPE_SERVICE"]=8,e[n[9]="TARGET_TYPE_METHOD"]=9,e),C.EditionDefault=(rn.prototype.edition=0,rn.prototype.value="",rn.create=function(e){return new rn(e)},rn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(18).string(e.value),null!=e.edition&&Object.hasOwnProperty.call(e,"edition")&&t.uint32(24).int32(e.edition),t},rn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},rn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.FieldOptions.EditionDefault;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 3:i.edition=e.int32();break;case 2:i.value=e.string();break;default:e.skipType(7&a,o)}}return i},rn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},rn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.edition&&Object.hasOwnProperty.call(e,"edition"))switch(e.edition){default:return"edition: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:}return null!=e.value&&Object.hasOwnProperty.call(e,"value")&&!p.isString(e.value)?"value: string expected":null},rn.fromObject=function(e,t){if(e instanceof f.google.protobuf.FieldOptions.EditionDefault)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.FieldOptions.EditionDefault: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.FieldOptions.EditionDefault;switch(e.edition){default:"number"==typeof e.edition&&(r.edition=e.edition);break;case"EDITION_UNKNOWN":case 0:r.edition=0;break;case"EDITION_LEGACY":case 900:r.edition=900;break;case"EDITION_PROTO2":case 998:r.edition=998;break;case"EDITION_PROTO3":case 999:r.edition=999;break;case"EDITION_2023":case 1e3:r.edition=1e3;break;case"EDITION_2024":case 1001:r.edition=1001;break;case"EDITION_1_TEST_ONLY":case 1:r.edition=1;break;case"EDITION_2_TEST_ONLY":case 2:r.edition=2;break;case"EDITION_99997_TEST_ONLY":case 99997:r.edition=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:r.edition=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:r.edition=99999;break;case"EDITION_MAX":case 2147483647:r.edition=2147483647}return null!=e.value&&(r.value=String(e.value)),r},rn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.value="",r.edition=t.enums===String?"EDITION_UNKNOWN":0),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&(r.value=e.value),null!=e.edition&&Object.hasOwnProperty.call(e,"edition")&&(r.edition=t.enums!==String||void 0===f.google.protobuf.Edition[e.edition]?e.edition:f.google.protobuf.Edition[e.edition]),r},rn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},rn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.FieldOptions.EditionDefault"},rn),C.FeatureSupport=(on.prototype.editionIntroduced=0,on.prototype.editionDeprecated=0,on.prototype.deprecationWarning="",on.prototype.editionRemoved=0,on.create=function(e){return new on(e)},on.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.editionIntroduced&&Object.hasOwnProperty.call(e,"editionIntroduced")&&t.uint32(8).int32(e.editionIntroduced),null!=e.editionDeprecated&&Object.hasOwnProperty.call(e,"editionDeprecated")&&t.uint32(16).int32(e.editionDeprecated),null!=e.deprecationWarning&&Object.hasOwnProperty.call(e,"deprecationWarning")&&t.uint32(26).string(e.deprecationWarning),null!=e.editionRemoved&&Object.hasOwnProperty.call(e,"editionRemoved")&&t.uint32(32).int32(e.editionRemoved),t},on.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},on.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.FieldOptions.FeatureSupport;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.editionIntroduced=e.int32();break;case 2:i.editionDeprecated=e.int32();break;case 3:i.deprecationWarning=e.string();break;case 4:i.editionRemoved=e.int32();break;default:e.skipType(7&a,o)}}return i},on.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},on.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.editionIntroduced&&Object.hasOwnProperty.call(e,"editionIntroduced"))switch(e.editionIntroduced){default:return"editionIntroduced: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:}if(null!=e.editionDeprecated&&Object.hasOwnProperty.call(e,"editionDeprecated"))switch(e.editionDeprecated){default:return"editionDeprecated: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:}if(null!=e.deprecationWarning&&Object.hasOwnProperty.call(e,"deprecationWarning")&&!p.isString(e.deprecationWarning))return"deprecationWarning: string expected";if(null!=e.editionRemoved&&Object.hasOwnProperty.call(e,"editionRemoved"))switch(e.editionRemoved){default:return"editionRemoved: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:}return null},on.fromObject=function(e,t){if(e instanceof f.google.protobuf.FieldOptions.FeatureSupport)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.FieldOptions.FeatureSupport: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.FieldOptions.FeatureSupport;switch(e.editionIntroduced){default:"number"==typeof e.editionIntroduced&&(r.editionIntroduced=e.editionIntroduced);break;case"EDITION_UNKNOWN":case 0:r.editionIntroduced=0;break;case"EDITION_LEGACY":case 900:r.editionIntroduced=900;break;case"EDITION_PROTO2":case 998:r.editionIntroduced=998;break;case"EDITION_PROTO3":case 999:r.editionIntroduced=999;break;case"EDITION_2023":case 1e3:r.editionIntroduced=1e3;break;case"EDITION_2024":case 1001:r.editionIntroduced=1001;break;case"EDITION_1_TEST_ONLY":case 1:r.editionIntroduced=1;break;case"EDITION_2_TEST_ONLY":case 2:r.editionIntroduced=2;break;case"EDITION_99997_TEST_ONLY":case 99997:r.editionIntroduced=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:r.editionIntroduced=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:r.editionIntroduced=99999;break;case"EDITION_MAX":case 2147483647:r.editionIntroduced=2147483647}switch(e.editionDeprecated){default:"number"==typeof e.editionDeprecated&&(r.editionDeprecated=e.editionDeprecated);break;case"EDITION_UNKNOWN":case 0:r.editionDeprecated=0;break;case"EDITION_LEGACY":case 900:r.editionDeprecated=900;break;case"EDITION_PROTO2":case 998:r.editionDeprecated=998;break;case"EDITION_PROTO3":case 999:r.editionDeprecated=999;break;case"EDITION_2023":case 1e3:r.editionDeprecated=1e3;break;case"EDITION_2024":case 1001:r.editionDeprecated=1001;break;case"EDITION_1_TEST_ONLY":case 1:r.editionDeprecated=1;break;case"EDITION_2_TEST_ONLY":case 2:r.editionDeprecated=2;break;case"EDITION_99997_TEST_ONLY":case 99997:r.editionDeprecated=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:r.editionDeprecated=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:r.editionDeprecated=99999;break;case"EDITION_MAX":case 2147483647:r.editionDeprecated=2147483647}switch(null!=e.deprecationWarning&&(r.deprecationWarning=String(e.deprecationWarning)),e.editionRemoved){default:"number"==typeof e.editionRemoved&&(r.editionRemoved=e.editionRemoved);break;case"EDITION_UNKNOWN":case 0:r.editionRemoved=0;break;case"EDITION_LEGACY":case 900:r.editionRemoved=900;break;case"EDITION_PROTO2":case 998:r.editionRemoved=998;break;case"EDITION_PROTO3":case 999:r.editionRemoved=999;break;case"EDITION_2023":case 1e3:r.editionRemoved=1e3;break;case"EDITION_2024":case 1001:r.editionRemoved=1001;break;case"EDITION_1_TEST_ONLY":case 1:r.editionRemoved=1;break;case"EDITION_2_TEST_ONLY":case 2:r.editionRemoved=2;break;case"EDITION_99997_TEST_ONLY":case 99997:r.editionRemoved=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:r.editionRemoved=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:r.editionRemoved=99999;break;case"EDITION_MAX":case 2147483647:r.editionRemoved=2147483647}return r},on.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.editionIntroduced=t.enums===String?"EDITION_UNKNOWN":0,r.editionDeprecated=t.enums===String?"EDITION_UNKNOWN":0,r.deprecationWarning="",r.editionRemoved=t.enums===String?"EDITION_UNKNOWN":0),null!=e.editionIntroduced&&Object.hasOwnProperty.call(e,"editionIntroduced")&&(r.editionIntroduced=t.enums!==String||void 0===f.google.protobuf.Edition[e.editionIntroduced]?e.editionIntroduced:f.google.protobuf.Edition[e.editionIntroduced]),null!=e.editionDeprecated&&Object.hasOwnProperty.call(e,"editionDeprecated")&&(r.editionDeprecated=t.enums!==String||void 0===f.google.protobuf.Edition[e.editionDeprecated]?e.editionDeprecated:f.google.protobuf.Edition[e.editionDeprecated]),null!=e.deprecationWarning&&Object.hasOwnProperty.call(e,"deprecationWarning")&&(r.deprecationWarning=e.deprecationWarning),null!=e.editionRemoved&&Object.hasOwnProperty.call(e,"editionRemoved")&&(r.editionRemoved=t.enums!==String||void 0===f.google.protobuf.Edition[e.editionRemoved]?e.editionRemoved:f.google.protobuf.Edition[e.editionRemoved]),r},on.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},on.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.FieldOptions.FeatureSupport"},on),C),r.OneofOptions=(nn.prototype.features=null,nn.prototype.uninterpretedOption=p.emptyArray,nn.create=function(e){return new nn(e)},nn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.features&&Object.hasOwnProperty.call(e,"features")&&f.google.protobuf.FeatureSet.encode(e.features,t.uint32(10).fork(),r+1).ldelim(),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var o=0;o<e.uninterpretedOption.length;++o)f.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[o],t.uint32(7994).fork(),r+1).ldelim();return t},nn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},nn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.OneofOptions;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.features=f.google.protobuf.FeatureSet.decode(e,e.uint32(),void 0,o+1);break;case 999:i.uninterpretedOption&&i.uninterpretedOption.length||(i.uninterpretedOption=[]),i.uninterpretedOption.push(f.google.protobuf.UninterpretedOption.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},nn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},nn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(r=f.google.protobuf.FeatureSet.verify(e.features,t+1)))return"features."+r;if(null!=e.uninterpretedOption&&Object.hasOwnProperty.call(e,"uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var r,o=0;o<e.uninterpretedOption.length;++o)if(r=f.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[o],t+1))return"uninterpretedOption."+r}return null},nn.fromObject=function(e,t){if(e instanceof f.google.protobuf.OneofOptions)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.OneofOptions: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.OneofOptions;if(null!=e.features){if(!p.isObject(e.features))throw TypeError(".google.protobuf.OneofOptions.features: object expected");r.features=f.google.protobuf.FeatureSet.fromObject(e.features,t+1)}if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected");r.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o){if(!p.isObject(e.uninterpretedOption[o]))throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected");r.uninterpretedOption[o]=f.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[o],t+1)}}return r},nn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.uninterpretedOption=[]),t.defaults&&(o.features=null),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(o.features=f.google.protobuf.FeatureSet.toObject(e.features,t,r+1)),e.uninterpretedOption&&e.uninterpretedOption.length){o.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n)o.uninterpretedOption[n]=f.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[n],t,r+1)}return o},nn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},nn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.OneofOptions"},nn),r.EnumOptions=(an.prototype.allowAlias=!1,an.prototype.deprecated=!1,an.prototype.deprecatedLegacyJsonFieldConflicts=!1,an.prototype.features=null,an.prototype.uninterpretedOption=p.emptyArray,an.create=function(e){return new an(e)},an.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.allowAlias&&Object.hasOwnProperty.call(e,"allowAlias")&&t.uint32(16).bool(e.allowAlias),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&t.uint32(24).bool(e.deprecated),null!=e.deprecatedLegacyJsonFieldConflicts&&Object.hasOwnProperty.call(e,"deprecatedLegacyJsonFieldConflicts")&&t.uint32(48).bool(e.deprecatedLegacyJsonFieldConflicts),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&f.google.protobuf.FeatureSet.encode(e.features,t.uint32(58).fork(),r+1).ldelim(),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var o=0;o<e.uninterpretedOption.length;++o)f.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[o],t.uint32(7994).fork(),r+1).ldelim();return t},an.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},an.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.EnumOptions;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 2:i.allowAlias=e.bool();break;case 3:i.deprecated=e.bool();break;case 6:i.deprecatedLegacyJsonFieldConflicts=e.bool();break;case 7:i.features=f.google.protobuf.FeatureSet.decode(e,e.uint32(),void 0,o+1);break;case 999:i.uninterpretedOption&&i.uninterpretedOption.length||(i.uninterpretedOption=[]),i.uninterpretedOption.push(f.google.protobuf.UninterpretedOption.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},an.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},an.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.allowAlias&&Object.hasOwnProperty.call(e,"allowAlias")&&"boolean"!=typeof e.allowAlias)return"allowAlias: boolean expected";if(null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.deprecatedLegacyJsonFieldConflicts&&Object.hasOwnProperty.call(e,"deprecatedLegacyJsonFieldConflicts")&&"boolean"!=typeof e.deprecatedLegacyJsonFieldConflicts)return"deprecatedLegacyJsonFieldConflicts: boolean expected";if(null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(r=f.google.protobuf.FeatureSet.verify(e.features,t+1)))return"features."+r;if(null!=e.uninterpretedOption&&Object.hasOwnProperty.call(e,"uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var r,o=0;o<e.uninterpretedOption.length;++o)if(r=f.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[o],t+1))return"uninterpretedOption."+r}return null},an.fromObject=function(e,t){if(e instanceof f.google.protobuf.EnumOptions)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.EnumOptions: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.EnumOptions;if(null!=e.allowAlias&&(r.allowAlias=Boolean(e.allowAlias)),null!=e.deprecated&&(r.deprecated=Boolean(e.deprecated)),null!=e.deprecatedLegacyJsonFieldConflicts&&(r.deprecatedLegacyJsonFieldConflicts=Boolean(e.deprecatedLegacyJsonFieldConflicts)),null!=e.features){if(!p.isObject(e.features))throw TypeError(".google.protobuf.EnumOptions.features: object expected");r.features=f.google.protobuf.FeatureSet.fromObject(e.features,t+1)}if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected");r.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o){if(!p.isObject(e.uninterpretedOption[o]))throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected");r.uninterpretedOption[o]=f.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[o],t+1)}}return r},an.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.uninterpretedOption=[]),t.defaults&&(o.allowAlias=!1,o.deprecated=!1,o.deprecatedLegacyJsonFieldConflicts=!1,o.features=null),null!=e.allowAlias&&Object.hasOwnProperty.call(e,"allowAlias")&&(o.allowAlias=e.allowAlias),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&(o.deprecated=e.deprecated),null!=e.deprecatedLegacyJsonFieldConflicts&&Object.hasOwnProperty.call(e,"deprecatedLegacyJsonFieldConflicts")&&(o.deprecatedLegacyJsonFieldConflicts=e.deprecatedLegacyJsonFieldConflicts),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(o.features=f.google.protobuf.FeatureSet.toObject(e.features,t,r+1)),e.uninterpretedOption&&e.uninterpretedOption.length){o.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n)o.uninterpretedOption[n]=f.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[n],t,r+1)}return o},an.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},an.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.EnumOptions"},an),r.EnumValueOptions=(sn.prototype.deprecated=!1,sn.prototype.features=null,sn.prototype.debugRedact=!1,sn.prototype.featureSupport=null,sn.prototype.uninterpretedOption=p.emptyArray,sn.create=function(e){return new sn(e)},sn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&t.uint32(8).bool(e.deprecated),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&f.google.protobuf.FeatureSet.encode(e.features,t.uint32(18).fork(),r+1).ldelim(),null!=e.debugRedact&&Object.hasOwnProperty.call(e,"debugRedact")&&t.uint32(24).bool(e.debugRedact),null!=e.featureSupport&&Object.hasOwnProperty.call(e,"featureSupport")&&f.google.protobuf.FieldOptions.FeatureSupport.encode(e.featureSupport,t.uint32(34).fork(),r+1).ldelim(),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var o=0;o<e.uninterpretedOption.length;++o)f.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[o],t.uint32(7994).fork(),r+1).ldelim();return t},sn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},sn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.EnumValueOptions;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.deprecated=e.bool();break;case 2:i.features=f.google.protobuf.FeatureSet.decode(e,e.uint32(),void 0,o+1);break;case 3:i.debugRedact=e.bool();break;case 4:i.featureSupport=f.google.protobuf.FieldOptions.FeatureSupport.decode(e,e.uint32(),void 0,o+1);break;case 999:i.uninterpretedOption&&i.uninterpretedOption.length||(i.uninterpretedOption=[]),i.uninterpretedOption.push(f.google.protobuf.UninterpretedOption.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},sn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},sn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(r=f.google.protobuf.FeatureSet.verify(e.features,t+1)))return"features."+r;if(null!=e.debugRedact&&Object.hasOwnProperty.call(e,"debugRedact")&&"boolean"!=typeof e.debugRedact)return"debugRedact: boolean expected";if(null!=e.featureSupport&&Object.hasOwnProperty.call(e,"featureSupport")&&(r=f.google.protobuf.FieldOptions.FeatureSupport.verify(e.featureSupport,t+1)))return"featureSupport."+r;if(null!=e.uninterpretedOption&&Object.hasOwnProperty.call(e,"uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var r,o=0;o<e.uninterpretedOption.length;++o)if(r=f.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[o],t+1))return"uninterpretedOption."+r}return null},sn.fromObject=function(e,t){if(e instanceof f.google.protobuf.EnumValueOptions)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.EnumValueOptions: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.EnumValueOptions;if(null!=e.deprecated&&(r.deprecated=Boolean(e.deprecated)),null!=e.features){if(!p.isObject(e.features))throw TypeError(".google.protobuf.EnumValueOptions.features: object expected");r.features=f.google.protobuf.FeatureSet.fromObject(e.features,t+1)}if(null!=e.debugRedact&&(r.debugRedact=Boolean(e.debugRedact)),null!=e.featureSupport){if(!p.isObject(e.featureSupport))throw TypeError(".google.protobuf.EnumValueOptions.featureSupport: object expected");r.featureSupport=f.google.protobuf.FieldOptions.FeatureSupport.fromObject(e.featureSupport,t+1)}if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected");r.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o){if(!p.isObject(e.uninterpretedOption[o]))throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected");r.uninterpretedOption[o]=f.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[o],t+1)}}return r},sn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.uninterpretedOption=[]),t.defaults&&(o.deprecated=!1,o.features=null,o.debugRedact=!1,o.featureSupport=null),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&(o.deprecated=e.deprecated),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(o.features=f.google.protobuf.FeatureSet.toObject(e.features,t,r+1)),null!=e.debugRedact&&Object.hasOwnProperty.call(e,"debugRedact")&&(o.debugRedact=e.debugRedact),null!=e.featureSupport&&Object.hasOwnProperty.call(e,"featureSupport")&&(o.featureSupport=f.google.protobuf.FieldOptions.FeatureSupport.toObject(e.featureSupport,t,r+1)),e.uninterpretedOption&&e.uninterpretedOption.length){o.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n)o.uninterpretedOption[n]=f.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[n],t,r+1)}return o},sn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},sn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.EnumValueOptions"},sn),r.ServiceOptions=(ln.prototype.features=null,ln.prototype.deprecated=!1,ln.prototype.uninterpretedOption=p.emptyArray,ln.prototype[".google.api.defaultHost"]="",ln.prototype[".google.api.oauthScopes"]="",ln.prototype[".google.api.apiVersion"]="",ln.create=function(e){return new ln(e)},ln.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&t.uint32(264).bool(e.deprecated),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&f.google.protobuf.FeatureSet.encode(e.features,t.uint32(274).fork(),r+1).ldelim(),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var o=0;o<e.uninterpretedOption.length;++o)f.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[o],t.uint32(7994).fork(),r+1).ldelim();return null!=e[".google.api.defaultHost"]&&Object.hasOwnProperty.call(e,".google.api.defaultHost")&&t.uint32(8394).string(e[".google.api.defaultHost"]),null!=e[".google.api.oauthScopes"]&&Object.hasOwnProperty.call(e,".google.api.oauthScopes")&&t.uint32(8402).string(e[".google.api.oauthScopes"]),null!=e[".google.api.apiVersion"]&&Object.hasOwnProperty.call(e,".google.api.apiVersion")&&t.uint32(4200000010).string(e[".google.api.apiVersion"]),t},ln.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},ln.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.ServiceOptions;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 34:i.features=f.google.protobuf.FeatureSet.decode(e,e.uint32(),void 0,o+1);break;case 33:i.deprecated=e.bool();break;case 999:i.uninterpretedOption&&i.uninterpretedOption.length||(i.uninterpretedOption=[]),i.uninterpretedOption.push(f.google.protobuf.UninterpretedOption.decode(e,e.uint32(),void 0,o+1));break;case 1049:i[".google.api.defaultHost"]=e.string();break;case 1050:i[".google.api.oauthScopes"]=e.string();break;case 525000001:i[".google.api.apiVersion"]=e.string();break;default:e.skipType(7&a,o)}}return i},ln.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},ln.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(r=f.google.protobuf.FeatureSet.verify(e.features,t+1)))return"features."+r;if(null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.uninterpretedOption&&Object.hasOwnProperty.call(e,"uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var r,o=0;o<e.uninterpretedOption.length;++o)if(r=f.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[o],t+1))return"uninterpretedOption."+r}return null!=e[".google.api.defaultHost"]&&Object.hasOwnProperty.call(e,".google.api.defaultHost")&&!p.isString(e[".google.api.defaultHost"])?".google.api.defaultHost: string expected":null!=e[".google.api.oauthScopes"]&&Object.hasOwnProperty.call(e,".google.api.oauthScopes")&&!p.isString(e[".google.api.oauthScopes"])?".google.api.oauthScopes: string expected":null!=e[".google.api.apiVersion"]&&Object.hasOwnProperty.call(e,".google.api.apiVersion")&&!p.isString(e[".google.api.apiVersion"])?".google.api.apiVersion: string expected":null},ln.fromObject=function(e,t){if(e instanceof f.google.protobuf.ServiceOptions)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.ServiceOptions: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.ServiceOptions;if(null!=e.features){if(!p.isObject(e.features))throw TypeError(".google.protobuf.ServiceOptions.features: object expected");r.features=f.google.protobuf.FeatureSet.fromObject(e.features,t+1)}if(null!=e.deprecated&&(r.deprecated=Boolean(e.deprecated)),e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected");r.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o){if(!p.isObject(e.uninterpretedOption[o]))throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected");r.uninterpretedOption[o]=f.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[o],t+1)}}return null!=e[".google.api.defaultHost"]&&(r[".google.api.defaultHost"]=String(e[".google.api.defaultHost"])),null!=e[".google.api.oauthScopes"]&&(r[".google.api.oauthScopes"]=String(e[".google.api.oauthScopes"])),null!=e[".google.api.apiVersion"]&&(r[".google.api.apiVersion"]=String(e[".google.api.apiVersion"])),r},ln.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.uninterpretedOption=[]),t.defaults&&(o.deprecated=!1,o.features=null,o[".google.api.defaultHost"]="",o[".google.api.oauthScopes"]="",o[".google.api.apiVersion"]=""),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&(o.deprecated=e.deprecated),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(o.features=f.google.protobuf.FeatureSet.toObject(e.features,t,r+1)),e.uninterpretedOption&&e.uninterpretedOption.length){o.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n)o.uninterpretedOption[n]=f.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[n],t,r+1)}return null!=e[".google.api.defaultHost"]&&Object.hasOwnProperty.call(e,".google.api.defaultHost")&&(o[".google.api.defaultHost"]=e[".google.api.defaultHost"]),null!=e[".google.api.oauthScopes"]&&Object.hasOwnProperty.call(e,".google.api.oauthScopes")&&(o[".google.api.oauthScopes"]=e[".google.api.oauthScopes"]),null!=e[".google.api.apiVersion"]&&Object.hasOwnProperty.call(e,".google.api.apiVersion")&&(o[".google.api.apiVersion"]=e[".google.api.apiVersion"]),o},ln.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},ln.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.ServiceOptions"},ln),r.MethodOptions=(cn.prototype.deprecated=!1,cn.prototype.idempotencyLevel=0,cn.prototype.features=null,cn.prototype.uninterpretedOption=p.emptyArray,cn.prototype[".google.api.http"]=null,cn.prototype[".google.api.methodSignature"]=p.emptyArray,cn.prototype[".google.api.routing"]=null,cn.prototype[".google.longrunning.operationInfo"]=null,cn.create=function(e){return new cn(e)},cn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&t.uint32(264).bool(e.deprecated),null!=e.idempotencyLevel&&Object.hasOwnProperty.call(e,"idempotencyLevel")&&t.uint32(272).int32(e.idempotencyLevel),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&f.google.protobuf.FeatureSet.encode(e.features,t.uint32(282).fork(),r+1).ldelim(),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var o=0;o<e.uninterpretedOption.length;++o)f.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[o],t.uint32(7994).fork(),r+1).ldelim();if(null!=e[".google.longrunning.operationInfo"]&&Object.hasOwnProperty.call(e,".google.longrunning.operationInfo")&&f.google.longrunning.OperationInfo.encode(e[".google.longrunning.operationInfo"],t.uint32(8394).fork(),r+1).ldelim(),null!=e[".google.api.methodSignature"]&&e[".google.api.methodSignature"].length)for(o=0;o<e[".google.api.methodSignature"].length;++o)t.uint32(8410).string(e[".google.api.methodSignature"][o]);return null!=e[".google.api.http"]&&Object.hasOwnProperty.call(e,".google.api.http")&&f.google.api.HttpRule.encode(e[".google.api.http"],t.uint32(578365826).fork(),r+1).ldelim(),null!=e[".google.api.routing"]&&Object.hasOwnProperty.call(e,".google.api.routing")&&f.google.api.RoutingRule.encode(e[".google.api.routing"],t.uint32(578365834).fork(),r+1).ldelim(),t},cn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},cn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.MethodOptions;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 33:i.deprecated=e.bool();break;case 34:i.idempotencyLevel=e.int32();break;case 35:i.features=f.google.protobuf.FeatureSet.decode(e,e.uint32(),void 0,o+1);break;case 999:i.uninterpretedOption&&i.uninterpretedOption.length||(i.uninterpretedOption=[]),i.uninterpretedOption.push(f.google.protobuf.UninterpretedOption.decode(e,e.uint32(),void 0,o+1));break;case 72295728:i[".google.api.http"]=f.google.api.HttpRule.decode(e,e.uint32(),void 0,o+1);break;case 1051:i[".google.api.methodSignature"]&&i[".google.api.methodSignature"].length||(i[".google.api.methodSignature"]=[]),i[".google.api.methodSignature"].push(e.string());break;case 72295729:i[".google.api.routing"]=f.google.api.RoutingRule.decode(e,e.uint32(),void 0,o+1);break;case 1049:i[".google.longrunning.operationInfo"]=f.google.longrunning.OperationInfo.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},cn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},cn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.idempotencyLevel&&Object.hasOwnProperty.call(e,"idempotencyLevel"))switch(e.idempotencyLevel){default:return"idempotencyLevel: enum value expected";case 0:case 1:case 2:}if(null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(r=f.google.protobuf.FeatureSet.verify(e.features,t+1)))return"features."+r;if(null!=e.uninterpretedOption&&Object.hasOwnProperty.call(e,"uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var r,o=0;o<e.uninterpretedOption.length;++o)if(r=f.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[o],t+1))return"uninterpretedOption."+r}if(null!=e[".google.api.http"]&&Object.hasOwnProperty.call(e,".google.api.http")&&(r=f.google.api.HttpRule.verify(e[".google.api.http"],t+1)))return".google.api.http."+r;if(null!=e[".google.api.methodSignature"]&&Object.hasOwnProperty.call(e,".google.api.methodSignature")){if(!Array.isArray(e[".google.api.methodSignature"]))return".google.api.methodSignature: array expected";for(o=0;o<e[".google.api.methodSignature"].length;++o)if(!p.isString(e[".google.api.methodSignature"][o]))return".google.api.methodSignature: string[] expected"}if(null!=e[".google.api.routing"]&&Object.hasOwnProperty.call(e,".google.api.routing")&&(r=f.google.api.RoutingRule.verify(e[".google.api.routing"],t+1)))return".google.api.routing."+r;if(null!=e[".google.longrunning.operationInfo"]&&Object.hasOwnProperty.call(e,".google.longrunning.operationInfo")&&(r=f.google.longrunning.OperationInfo.verify(e[".google.longrunning.operationInfo"],t+1)))return".google.longrunning.operationInfo."+r;return null},cn.fromObject=function(e,t){if(e instanceof f.google.protobuf.MethodOptions)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.MethodOptions: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.MethodOptions;switch(null!=e.deprecated&&(r.deprecated=Boolean(e.deprecated)),e.idempotencyLevel){default:"number"==typeof e.idempotencyLevel&&(r.idempotencyLevel=e.idempotencyLevel);break;case"IDEMPOTENCY_UNKNOWN":case 0:r.idempotencyLevel=0;break;case"NO_SIDE_EFFECTS":case 1:r.idempotencyLevel=1;break;case"IDEMPOTENT":case 2:r.idempotencyLevel=2}if(null!=e.features){if(!p.isObject(e.features))throw TypeError(".google.protobuf.MethodOptions.features: object expected");r.features=f.google.protobuf.FeatureSet.fromObject(e.features,t+1)}if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected");r.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o){if(!p.isObject(e.uninterpretedOption[o]))throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected");r.uninterpretedOption[o]=f.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[o],t+1)}}if(null!=e[".google.api.http"]){if(!p.isObject(e[".google.api.http"]))throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected");r[".google.api.http"]=f.google.api.HttpRule.fromObject(e[".google.api.http"],t+1)}if(e[".google.api.methodSignature"]){if(!Array.isArray(e[".google.api.methodSignature"]))throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected");r[".google.api.methodSignature"]=[];for(o=0;o<e[".google.api.methodSignature"].length;++o)r[".google.api.methodSignature"][o]=String(e[".google.api.methodSignature"][o])}if(null!=e[".google.api.routing"]){if(!p.isObject(e[".google.api.routing"]))throw TypeError(".google.protobuf.MethodOptions..google.api.routing: object expected");r[".google.api.routing"]=f.google.api.RoutingRule.fromObject(e[".google.api.routing"],t+1)}if(null!=e[".google.longrunning.operationInfo"]){if(!p.isObject(e[".google.longrunning.operationInfo"]))throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected");r[".google.longrunning.operationInfo"]=f.google.longrunning.OperationInfo.fromObject(e[".google.longrunning.operationInfo"],t+1)}return r},cn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.uninterpretedOption=[],o[".google.api.methodSignature"]=[]),t.defaults&&(o.deprecated=!1,o.idempotencyLevel=t.enums===String?"IDEMPOTENCY_UNKNOWN":0,o.features=null,o[".google.longrunning.operationInfo"]=null,o[".google.api.http"]=null,o[".google.api.routing"]=null),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&(o.deprecated=e.deprecated),null!=e.idempotencyLevel&&Object.hasOwnProperty.call(e,"idempotencyLevel")&&(o.idempotencyLevel=t.enums!==String||void 0===f.google.protobuf.MethodOptions.IdempotencyLevel[e.idempotencyLevel]?e.idempotencyLevel:f.google.protobuf.MethodOptions.IdempotencyLevel[e.idempotencyLevel]),null!=e.features&&Object.hasOwnProperty.call(e,"features")&&(o.features=f.google.protobuf.FeatureSet.toObject(e.features,t,r+1)),e.uninterpretedOption&&e.uninterpretedOption.length){o.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n)o.uninterpretedOption[n]=f.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[n],t,r+1)}if(null!=e[".google.longrunning.operationInfo"]&&Object.hasOwnProperty.call(e,".google.longrunning.operationInfo")&&(o[".google.longrunning.operationInfo"]=f.google.longrunning.OperationInfo.toObject(e[".google.longrunning.operationInfo"],t,r+1)),e[".google.api.methodSignature"]&&e[".google.api.methodSignature"].length){o[".google.api.methodSignature"]=[];for(n=0;n<e[".google.api.methodSignature"].length;++n)o[".google.api.methodSignature"][n]=e[".google.api.methodSignature"][n]}return null!=e[".google.api.http"]&&Object.hasOwnProperty.call(e,".google.api.http")&&(o[".google.api.http"]=f.google.api.HttpRule.toObject(e[".google.api.http"],t,r+1)),null!=e[".google.api.routing"]&&Object.hasOwnProperty.call(e,".google.api.routing")&&(o[".google.api.routing"]=f.google.api.RoutingRule.toObject(e[".google.api.routing"],t,r+1)),o},cn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},cn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.MethodOptions"},cn.IdempotencyLevel=(n={},(e=Object.create(n))[n[0]="IDEMPOTENCY_UNKNOWN"]=0,e[n[1]="NO_SIDE_EFFECTS"]=1,e[n[2]="IDEMPOTENT"]=2,e),cn),r.UninterpretedOption=(un.prototype.name=p.emptyArray,un.prototype.identifierValue="",un.prototype.positiveIntValue=p.Long?p.Long.fromBits(0,0,!0):0,un.prototype.negativeIntValue=p.Long?p.Long.fromBits(0,0,!1):0,un.prototype.doubleValue=0,un.prototype.stringValue=p.newBuffer([]),un.prototype.aggregateValue="",un.create=function(e){return new un(e)},un.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.name&&e.name.length)for(var o=0;o<e.name.length;++o)f.google.protobuf.UninterpretedOption.NamePart.encode(e.name[o],t.uint32(18).fork(),r+1).ldelim();return null!=e.identifierValue&&Object.hasOwnProperty.call(e,"identifierValue")&&t.uint32(26).string(e.identifierValue),null!=e.positiveIntValue&&Object.hasOwnProperty.call(e,"positiveIntValue")&&t.uint32(32).uint64(e.positiveIntValue),null!=e.negativeIntValue&&Object.hasOwnProperty.call(e,"negativeIntValue")&&t.uint32(40).int64(e.negativeIntValue),null!=e.doubleValue&&Object.hasOwnProperty.call(e,"doubleValue")&&t.uint32(49).double(e.doubleValue),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&t.uint32(58).bytes(e.stringValue),null!=e.aggregateValue&&Object.hasOwnProperty.call(e,"aggregateValue")&&t.uint32(66).string(e.aggregateValue),t},un.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},un.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.UninterpretedOption;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 2:i.name&&i.name.length||(i.name=[]),i.name.push(f.google.protobuf.UninterpretedOption.NamePart.decode(e,e.uint32(),void 0,o+1));break;case 3:i.identifierValue=e.string();break;case 4:i.positiveIntValue=e.uint64();break;case 5:i.negativeIntValue=e.int64();break;case 6:i.doubleValue=e.double();break;case 7:i.stringValue=e.bytes();break;case 8:i.aggregateValue=e.string();break;default:e.skipType(7&a,o)}}return i},un.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},un.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")){if(!Array.isArray(e.name))return"name: array expected";for(var r=0;r<e.name.length;++r){var o=f.google.protobuf.UninterpretedOption.NamePart.verify(e.name[r],t+1);if(o)return"name."+o}}return null!=e.identifierValue&&Object.hasOwnProperty.call(e,"identifierValue")&&!p.isString(e.identifierValue)?"identifierValue: string expected":null!=e.positiveIntValue&&Object.hasOwnProperty.call(e,"positiveIntValue")&&!(p.isInteger(e.positiveIntValue)||e.positiveIntValue&&p.isInteger(e.positiveIntValue.low)&&p.isInteger(e.positiveIntValue.high))?"positiveIntValue: integer|Long expected":null!=e.negativeIntValue&&Object.hasOwnProperty.call(e,"negativeIntValue")&&!(p.isInteger(e.negativeIntValue)||e.negativeIntValue&&p.isInteger(e.negativeIntValue.low)&&p.isInteger(e.negativeIntValue.high))?"negativeIntValue: integer|Long expected":null!=e.doubleValue&&Object.hasOwnProperty.call(e,"doubleValue")&&"number"!=typeof e.doubleValue?"doubleValue: number expected":null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&!(e.stringValue&&"number"==typeof e.stringValue.length||p.isString(e.stringValue))?"stringValue: buffer expected":null!=e.aggregateValue&&Object.hasOwnProperty.call(e,"aggregateValue")&&!p.isString(e.aggregateValue)?"aggregateValue: string expected":null},un.fromObject=function(e,t){if(e instanceof f.google.protobuf.UninterpretedOption)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.UninterpretedOption: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.UninterpretedOption;if(e.name){if(!Array.isArray(e.name))throw TypeError(".google.protobuf.UninterpretedOption.name: array expected");r.name=[];for(var o=0;o<e.name.length;++o){if(!p.isObject(e.name[o]))throw TypeError(".google.protobuf.UninterpretedOption.name: object expected");r.name[o]=f.google.protobuf.UninterpretedOption.NamePart.fromObject(e.name[o],t+1)}}return null!=e.identifierValue&&(r.identifierValue=String(e.identifierValue)),null!=e.positiveIntValue&&(p.Long?r.positiveIntValue=p.Long.fromValue(e.positiveIntValue,!0):"string"==typeof e.positiveIntValue?r.positiveIntValue=parseInt(e.positiveIntValue,10):"number"==typeof e.positiveIntValue?r.positiveIntValue=e.positiveIntValue:"object"==typeof e.positiveIntValue&&(r.positiveIntValue=new p.LongBits(e.positiveIntValue.low>>>0,e.positiveIntValue.high>>>0).toNumber(!0))),null!=e.negativeIntValue&&(p.Long?r.negativeIntValue=p.Long.fromValue(e.negativeIntValue,!1):"string"==typeof e.negativeIntValue?r.negativeIntValue=parseInt(e.negativeIntValue,10):"number"==typeof e.negativeIntValue?r.negativeIntValue=e.negativeIntValue:"object"==typeof e.negativeIntValue&&(r.negativeIntValue=new p.LongBits(e.negativeIntValue.low>>>0,e.negativeIntValue.high>>>0).toNumber())),null!=e.doubleValue&&(r.doubleValue=Number(e.doubleValue)),null!=e.stringValue&&("string"==typeof e.stringValue?p.base64.decode(e.stringValue,r.stringValue=p.newBuffer(p.base64.length(e.stringValue)),0):0<=e.stringValue.length&&(r.stringValue=e.stringValue)),null!=e.aggregateValue&&(r.aggregateValue=String(e.aggregateValue)),r},un.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.arrays||t.defaults)&&(n.name=[]),t.defaults&&(n.identifierValue="",p.Long?(o=new p.Long(0,0,!0),n.positiveIntValue=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):n.positiveIntValue=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0,p.Long?(o=new p.Long(0,0,!1),n.negativeIntValue=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):n.negativeIntValue=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0,n.doubleValue=0,t.bytes===String?n.stringValue="":(n.stringValue=[],t.bytes!==Array&&(n.stringValue=p.newBuffer(n.stringValue))),n.aggregateValue=""),e.name&&e.name.length){n.name=[];for(var i=0;i<e.name.length;++i)n.name[i]=f.google.protobuf.UninterpretedOption.NamePart.toObject(e.name[i],t,r+1)}return null!=e.identifierValue&&Object.hasOwnProperty.call(e,"identifierValue")&&(n.identifierValue=e.identifierValue),null!=e.positiveIntValue&&Object.hasOwnProperty.call(e,"positiveIntValue")&&("undefined"!=typeof BigInt&&t.longs===BigInt?n.positiveIntValue="number"==typeof e.positiveIntValue?BigInt(e.positiveIntValue):p.Long.fromBits(e.positiveIntValue.low>>>0,e.positiveIntValue.high>>>0,!0).toBigInt():"number"==typeof e.positiveIntValue?n.positiveIntValue=t.longs===String?String(e.positiveIntValue):e.positiveIntValue:n.positiveIntValue=t.longs===String?p.Long.prototype.toString.call(e.positiveIntValue):t.longs===Number?new p.LongBits(e.positiveIntValue.low>>>0,e.positiveIntValue.high>>>0).toNumber(!0):e.positiveIntValue),null!=e.negativeIntValue&&Object.hasOwnProperty.call(e,"negativeIntValue")&&("undefined"!=typeof BigInt&&t.longs===BigInt?n.negativeIntValue="number"==typeof e.negativeIntValue?BigInt(e.negativeIntValue):p.Long.fromBits(e.negativeIntValue.low>>>0,e.negativeIntValue.high>>>0,!1).toBigInt():"number"==typeof e.negativeIntValue?n.negativeIntValue=t.longs===String?String(e.negativeIntValue):e.negativeIntValue:n.negativeIntValue=t.longs===String?p.Long.prototype.toString.call(e.negativeIntValue):t.longs===Number?new p.LongBits(e.negativeIntValue.low>>>0,e.negativeIntValue.high>>>0).toNumber():e.negativeIntValue),null!=e.doubleValue&&Object.hasOwnProperty.call(e,"doubleValue")&&(n.doubleValue=t.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&(n.stringValue=t.bytes===String?p.base64.encode(e.stringValue,0,e.stringValue.length):t.bytes===Array?Array.prototype.slice.call(e.stringValue):e.stringValue),null!=e.aggregateValue&&Object.hasOwnProperty.call(e,"aggregateValue")&&(n.aggregateValue=e.aggregateValue),n},un.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},un.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.UninterpretedOption"},un.NamePart=(dn.prototype.namePart="",dn.prototype.isExtension=!1,dn.create=function(e){return new dn(e)},dn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return t.uint32(10).string(e.namePart),t.uint32(16).bool(e.isExtension),t},dn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},dn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.UninterpretedOption.NamePart;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.namePart=e.string();break;case 2:i.isExtension=e.bool();break;default:e.skipType(7&a,o)}}if(!Object.hasOwnProperty.call(i,"namePart"))throw p.ProtocolError("missing required 'namePart'",{instance:i});if(Object.hasOwnProperty.call(i,"isExtension"))return i;throw p.ProtocolError("missing required 'isExtension'",{instance:i})},dn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},dn.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":p.isString(e.namePart)?"boolean"!=typeof e.isExtension?"isExtension: boolean expected":null:"namePart: string expected"},dn.fromObject=function(e,t){if(e instanceof f.google.protobuf.UninterpretedOption.NamePart)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.UninterpretedOption.NamePart: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.UninterpretedOption.NamePart;return null!=e.namePart&&(t.namePart=String(e.namePart)),null!=e.isExtension&&(t.isExtension=Boolean(e.isExtension)),t},dn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.namePart="",r.isExtension=!1),null!=e.namePart&&Object.hasOwnProperty.call(e,"namePart")&&(r.namePart=e.namePart),null!=e.isExtension&&Object.hasOwnProperty.call(e,"isExtension")&&(r.isExtension=e.isExtension),r},dn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},dn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.UninterpretedOption.NamePart"},dn),un),r.FeatureSet=(N.prototype.fieldPresence=0,N.prototype.enumType=0,N.prototype.repeatedFieldEncoding=0,N.prototype.utf8Validation=0,N.prototype.messageEncoding=0,N.prototype.jsonFormat=0,N.prototype.enforceNamingStyle=0,N.prototype.defaultSymbolVisibility=0,N.create=function(e){return new N(e)},N.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.fieldPresence&&Object.hasOwnProperty.call(e,"fieldPresence")&&t.uint32(8).int32(e.fieldPresence),null!=e.enumType&&Object.hasOwnProperty.call(e,"enumType")&&t.uint32(16).int32(e.enumType),null!=e.repeatedFieldEncoding&&Object.hasOwnProperty.call(e,"repeatedFieldEncoding")&&t.uint32(24).int32(e.repeatedFieldEncoding),null!=e.utf8Validation&&Object.hasOwnProperty.call(e,"utf8Validation")&&t.uint32(32).int32(e.utf8Validation),null!=e.messageEncoding&&Object.hasOwnProperty.call(e,"messageEncoding")&&t.uint32(40).int32(e.messageEncoding),null!=e.jsonFormat&&Object.hasOwnProperty.call(e,"jsonFormat")&&t.uint32(48).int32(e.jsonFormat),null!=e.enforceNamingStyle&&Object.hasOwnProperty.call(e,"enforceNamingStyle")&&t.uint32(56).int32(e.enforceNamingStyle),null!=e.defaultSymbolVisibility&&Object.hasOwnProperty.call(e,"defaultSymbolVisibility")&&t.uint32(64).int32(e.defaultSymbolVisibility),t},N.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},N.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.FeatureSet;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.fieldPresence=e.int32();break;case 2:i.enumType=e.int32();break;case 3:i.repeatedFieldEncoding=e.int32();break;case 4:i.utf8Validation=e.int32();break;case 5:i.messageEncoding=e.int32();break;case 6:i.jsonFormat=e.int32();break;case 7:i.enforceNamingStyle=e.int32();break;case 8:i.defaultSymbolVisibility=e.int32();break;default:e.skipType(7&a,o)}}return i},N.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},N.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.fieldPresence&&Object.hasOwnProperty.call(e,"fieldPresence"))switch(e.fieldPresence){default:return"fieldPresence: enum value expected";case 0:case 1:case 2:case 3:}if(null!=e.enumType&&Object.hasOwnProperty.call(e,"enumType"))switch(e.enumType){default:return"enumType: enum value expected";case 0:case 1:case 2:}if(null!=e.repeatedFieldEncoding&&Object.hasOwnProperty.call(e,"repeatedFieldEncoding"))switch(e.repeatedFieldEncoding){default:return"repeatedFieldEncoding: enum value expected";case 0:case 1:case 2:}if(null!=e.utf8Validation&&Object.hasOwnProperty.call(e,"utf8Validation"))switch(e.utf8Validation){default:return"utf8Validation: enum value expected";case 0:case 2:case 3:}if(null!=e.messageEncoding&&Object.hasOwnProperty.call(e,"messageEncoding"))switch(e.messageEncoding){default:return"messageEncoding: enum value expected";case 0:case 1:case 2:}if(null!=e.jsonFormat&&Object.hasOwnProperty.call(e,"jsonFormat"))switch(e.jsonFormat){default:return"jsonFormat: enum value expected";case 0:case 1:case 2:}if(null!=e.enforceNamingStyle&&Object.hasOwnProperty.call(e,"enforceNamingStyle"))switch(e.enforceNamingStyle){default:return"enforceNamingStyle: enum value expected";case 0:case 1:case 2:}if(null!=e.defaultSymbolVisibility&&Object.hasOwnProperty.call(e,"defaultSymbolVisibility"))switch(e.defaultSymbolVisibility){default:return"defaultSymbolVisibility: enum value expected";case 0:case 1:case 2:case 3:case 4:}return null},N.fromObject=function(e,t){if(e instanceof f.google.protobuf.FeatureSet)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.FeatureSet: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.FeatureSet;switch(e.fieldPresence){default:"number"==typeof e.fieldPresence&&(r.fieldPresence=e.fieldPresence);break;case"FIELD_PRESENCE_UNKNOWN":case 0:r.fieldPresence=0;break;case"EXPLICIT":case 1:r.fieldPresence=1;break;case"IMPLICIT":case 2:r.fieldPresence=2;break;case"LEGACY_REQUIRED":case 3:r.fieldPresence=3}switch(e.enumType){default:"number"==typeof e.enumType&&(r.enumType=e.enumType);break;case"ENUM_TYPE_UNKNOWN":case 0:r.enumType=0;break;case"OPEN":case 1:r.enumType=1;break;case"CLOSED":case 2:r.enumType=2}switch(e.repeatedFieldEncoding){default:"number"==typeof e.repeatedFieldEncoding&&(r.repeatedFieldEncoding=e.repeatedFieldEncoding);break;case"REPEATED_FIELD_ENCODING_UNKNOWN":case 0:r.repeatedFieldEncoding=0;break;case"PACKED":case 1:r.repeatedFieldEncoding=1;break;case"EXPANDED":case 2:r.repeatedFieldEncoding=2}switch(e.utf8Validation){default:"number"==typeof e.utf8Validation&&(r.utf8Validation=e.utf8Validation);break;case"UTF8_VALIDATION_UNKNOWN":case 0:r.utf8Validation=0;break;case"VERIFY":case 2:r.utf8Validation=2;break;case"NONE":case 3:r.utf8Validation=3}switch(e.messageEncoding){default:"number"==typeof e.messageEncoding&&(r.messageEncoding=e.messageEncoding);break;case"MESSAGE_ENCODING_UNKNOWN":case 0:r.messageEncoding=0;break;case"LENGTH_PREFIXED":case 1:r.messageEncoding=1;break;case"DELIMITED":case 2:r.messageEncoding=2}switch(e.jsonFormat){default:"number"==typeof e.jsonFormat&&(r.jsonFormat=e.jsonFormat);break;case"JSON_FORMAT_UNKNOWN":case 0:r.jsonFormat=0;break;case"ALLOW":case 1:r.jsonFormat=1;break;case"LEGACY_BEST_EFFORT":case 2:r.jsonFormat=2}switch(e.enforceNamingStyle){default:"number"==typeof e.enforceNamingStyle&&(r.enforceNamingStyle=e.enforceNamingStyle);break;case"ENFORCE_NAMING_STYLE_UNKNOWN":case 0:r.enforceNamingStyle=0;break;case"STYLE2024":case 1:r.enforceNamingStyle=1;break;case"STYLE_LEGACY":case 2:r.enforceNamingStyle=2}switch(e.defaultSymbolVisibility){default:"number"==typeof e.defaultSymbolVisibility&&(r.defaultSymbolVisibility=e.defaultSymbolVisibility);break;case"DEFAULT_SYMBOL_VISIBILITY_UNKNOWN":case 0:r.defaultSymbolVisibility=0;break;case"EXPORT_ALL":case 1:r.defaultSymbolVisibility=1;break;case"EXPORT_TOP_LEVEL":case 2:r.defaultSymbolVisibility=2;break;case"LOCAL_ALL":case 3:r.defaultSymbolVisibility=3;break;case"STRICT":case 4:r.defaultSymbolVisibility=4}return r},N.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.fieldPresence=t.enums===String?"FIELD_PRESENCE_UNKNOWN":0,r.enumType=t.enums===String?"ENUM_TYPE_UNKNOWN":0,r.repeatedFieldEncoding=t.enums===String?"REPEATED_FIELD_ENCODING_UNKNOWN":0,r.utf8Validation=t.enums===String?"UTF8_VALIDATION_UNKNOWN":0,r.messageEncoding=t.enums===String?"MESSAGE_ENCODING_UNKNOWN":0,r.jsonFormat=t.enums===String?"JSON_FORMAT_UNKNOWN":0,r.enforceNamingStyle=t.enums===String?"ENFORCE_NAMING_STYLE_UNKNOWN":0,r.defaultSymbolVisibility=t.enums===String?"DEFAULT_SYMBOL_VISIBILITY_UNKNOWN":0),null!=e.fieldPresence&&Object.hasOwnProperty.call(e,"fieldPresence")&&(r.fieldPresence=t.enums!==String||void 0===f.google.protobuf.FeatureSet.FieldPresence[e.fieldPresence]?e.fieldPresence:f.google.protobuf.FeatureSet.FieldPresence[e.fieldPresence]),null!=e.enumType&&Object.hasOwnProperty.call(e,"enumType")&&(r.enumType=t.enums!==String||void 0===f.google.protobuf.FeatureSet.EnumType[e.enumType]?e.enumType:f.google.protobuf.FeatureSet.EnumType[e.enumType]),null!=e.repeatedFieldEncoding&&Object.hasOwnProperty.call(e,"repeatedFieldEncoding")&&(r.repeatedFieldEncoding=t.enums!==String||void 0===f.google.protobuf.FeatureSet.RepeatedFieldEncoding[e.repeatedFieldEncoding]?e.repeatedFieldEncoding:f.google.protobuf.FeatureSet.RepeatedFieldEncoding[e.repeatedFieldEncoding]),null!=e.utf8Validation&&Object.hasOwnProperty.call(e,"utf8Validation")&&(r.utf8Validation=t.enums!==String||void 0===f.google.protobuf.FeatureSet.Utf8Validation[e.utf8Validation]?e.utf8Validation:f.google.protobuf.FeatureSet.Utf8Validation[e.utf8Validation]),null!=e.messageEncoding&&Object.hasOwnProperty.call(e,"messageEncoding")&&(r.messageEncoding=t.enums!==String||void 0===f.google.protobuf.FeatureSet.MessageEncoding[e.messageEncoding]?e.messageEncoding:f.google.protobuf.FeatureSet.MessageEncoding[e.messageEncoding]),null!=e.jsonFormat&&Object.hasOwnProperty.call(e,"jsonFormat")&&(r.jsonFormat=t.enums!==String||void 0===f.google.protobuf.FeatureSet.JsonFormat[e.jsonFormat]?e.jsonFormat:f.google.protobuf.FeatureSet.JsonFormat[e.jsonFormat]),null!=e.enforceNamingStyle&&Object.hasOwnProperty.call(e,"enforceNamingStyle")&&(r.enforceNamingStyle=t.enums!==String||void 0===f.google.protobuf.FeatureSet.EnforceNamingStyle[e.enforceNamingStyle]?e.enforceNamingStyle:f.google.protobuf.FeatureSet.EnforceNamingStyle[e.enforceNamingStyle]),null!=e.defaultSymbolVisibility&&Object.hasOwnProperty.call(e,"defaultSymbolVisibility")&&(r.defaultSymbolVisibility=t.enums!==String||void 0===f.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[e.defaultSymbolVisibility]?e.defaultSymbolVisibility:f.google.protobuf.FeatureSet.VisibilityFeature.DefaultSymbolVisibility[e.defaultSymbolVisibility]),r},N.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},N.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.FeatureSet"},N.FieldPresence=(n={},(e=Object.create(n))[n[0]="FIELD_PRESENCE_UNKNOWN"]=0,e[n[1]="EXPLICIT"]=1,e[n[2]="IMPLICIT"]=2,e[n[3]="LEGACY_REQUIRED"]=3,e),N.EnumType=(n={},(e=Object.create(n))[n[0]="ENUM_TYPE_UNKNOWN"]=0,e[n[1]="OPEN"]=1,e[n[2]="CLOSED"]=2,e),N.RepeatedFieldEncoding=(n={},(e=Object.create(n))[n[0]="REPEATED_FIELD_ENCODING_UNKNOWN"]=0,e[n[1]="PACKED"]=1,e[n[2]="EXPANDED"]=2,e),N.Utf8Validation=(n={},(e=Object.create(n))[n[0]="UTF8_VALIDATION_UNKNOWN"]=0,e[n[2]="VERIFY"]=2,e[n[3]="NONE"]=3,e),N.MessageEncoding=(n={},(e=Object.create(n))[n[0]="MESSAGE_ENCODING_UNKNOWN"]=0,e[n[1]="LENGTH_PREFIXED"]=1,e[n[2]="DELIMITED"]=2,e),N.JsonFormat=(n={},(e=Object.create(n))[n[0]="JSON_FORMAT_UNKNOWN"]=0,e[n[1]="ALLOW"]=1,e[n[2]="LEGACY_BEST_EFFORT"]=2,e),N.EnforceNamingStyle=(n={},(e=Object.create(n))[n[0]="ENFORCE_NAMING_STYLE_UNKNOWN"]=0,e[n[1]="STYLE2024"]=1,e[n[2]="STYLE_LEGACY"]=2,e),N.VisibilityFeature=(pn.create=function(e){return new pn(e)},pn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return t},pn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},pn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,t=new f.google.protobuf.FeatureSet.VisibilityFeature;e.pos<n;){var i=e.uint32();if(i===r)break;e.skipType(7&i,o)}return t},pn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},pn.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null},pn.fromObject=function(e,t){return e instanceof f.google.protobuf.FeatureSet.VisibilityFeature?e:new f.google.protobuf.FeatureSet.VisibilityFeature},pn.toObject=function(){return{}},pn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},pn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.FeatureSet.VisibilityFeature"},pn.DefaultSymbolVisibility=(n={},(e=Object.create(n))[n[0]="DEFAULT_SYMBOL_VISIBILITY_UNKNOWN"]=0,e[n[1]="EXPORT_ALL"]=1,e[n[2]="EXPORT_TOP_LEVEL"]=2,e[n[3]="LOCAL_ALL"]=3,e[n[4]="STRICT"]=4,e),pn),N),r.FeatureSetDefaults=(fn.prototype.defaults=p.emptyArray,fn.prototype.minimumEdition=0,fn.prototype.maximumEdition=0,fn.create=function(e){return new fn(e)},fn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.defaults&&e.defaults.length)for(var o=0;o<e.defaults.length;++o)f.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.encode(e.defaults[o],t.uint32(10).fork(),r+1).ldelim();return null!=e.minimumEdition&&Object.hasOwnProperty.call(e,"minimumEdition")&&t.uint32(32).int32(e.minimumEdition),null!=e.maximumEdition&&Object.hasOwnProperty.call(e,"maximumEdition")&&t.uint32(40).int32(e.maximumEdition),t},fn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},fn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.FeatureSetDefaults;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.defaults&&i.defaults.length||(i.defaults=[]),i.defaults.push(f.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.decode(e,e.uint32(),void 0,o+1));break;case 4:i.minimumEdition=e.int32();break;case 5:i.maximumEdition=e.int32();break;default:e.skipType(7&a,o)}}return i},fn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},fn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.defaults&&Object.hasOwnProperty.call(e,"defaults")){if(!Array.isArray(e.defaults))return"defaults: array expected";for(var r=0;r<e.defaults.length;++r){var o=f.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify(e.defaults[r],t+1);if(o)return"defaults."+o}}if(null!=e.minimumEdition&&Object.hasOwnProperty.call(e,"minimumEdition"))switch(e.minimumEdition){default:return"minimumEdition: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:}if(null!=e.maximumEdition&&Object.hasOwnProperty.call(e,"maximumEdition"))switch(e.maximumEdition){default:return"maximumEdition: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:}return null},fn.fromObject=function(e,t){if(e instanceof f.google.protobuf.FeatureSetDefaults)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.FeatureSetDefaults: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.FeatureSetDefaults;if(e.defaults){if(!Array.isArray(e.defaults))throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: array expected");r.defaults=[];for(var o=0;o<e.defaults.length;++o){if(!p.isObject(e.defaults[o]))throw TypeError(".google.protobuf.FeatureSetDefaults.defaults: object expected");r.defaults[o]=f.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fromObject(e.defaults[o],t+1)}}switch(e.minimumEdition){default:"number"==typeof e.minimumEdition&&(r.minimumEdition=e.minimumEdition);break;case"EDITION_UNKNOWN":case 0:r.minimumEdition=0;break;case"EDITION_LEGACY":case 900:r.minimumEdition=900;break;case"EDITION_PROTO2":case 998:r.minimumEdition=998;break;case"EDITION_PROTO3":case 999:r.minimumEdition=999;break;case"EDITION_2023":case 1e3:r.minimumEdition=1e3;break;case"EDITION_2024":case 1001:r.minimumEdition=1001;break;case"EDITION_1_TEST_ONLY":case 1:r.minimumEdition=1;break;case"EDITION_2_TEST_ONLY":case 2:r.minimumEdition=2;break;case"EDITION_99997_TEST_ONLY":case 99997:r.minimumEdition=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:r.minimumEdition=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:r.minimumEdition=99999;break;case"EDITION_MAX":case 2147483647:r.minimumEdition=2147483647}switch(e.maximumEdition){default:"number"==typeof e.maximumEdition&&(r.maximumEdition=e.maximumEdition);break;case"EDITION_UNKNOWN":case 0:r.maximumEdition=0;break;case"EDITION_LEGACY":case 900:r.maximumEdition=900;break;case"EDITION_PROTO2":case 998:r.maximumEdition=998;break;case"EDITION_PROTO3":case 999:r.maximumEdition=999;break;case"EDITION_2023":case 1e3:r.maximumEdition=1e3;break;case"EDITION_2024":case 1001:r.maximumEdition=1001;break;case"EDITION_1_TEST_ONLY":case 1:r.maximumEdition=1;break;case"EDITION_2_TEST_ONLY":case 2:r.maximumEdition=2;break;case"EDITION_99997_TEST_ONLY":case 99997:r.maximumEdition=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:r.maximumEdition=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:r.maximumEdition=99999;break;case"EDITION_MAX":case 2147483647:r.maximumEdition=2147483647}return r},fn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.defaults=[]),t.defaults&&(o.minimumEdition=t.enums===String?"EDITION_UNKNOWN":0,o.maximumEdition=t.enums===String?"EDITION_UNKNOWN":0),e.defaults&&e.defaults.length){o.defaults=[];for(var n=0;n<e.defaults.length;++n)o.defaults[n]=f.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.toObject(e.defaults[n],t,r+1)}return null!=e.minimumEdition&&Object.hasOwnProperty.call(e,"minimumEdition")&&(o.minimumEdition=t.enums!==String||void 0===f.google.protobuf.Edition[e.minimumEdition]?e.minimumEdition:f.google.protobuf.Edition[e.minimumEdition]),null!=e.maximumEdition&&Object.hasOwnProperty.call(e,"maximumEdition")&&(o.maximumEdition=t.enums!==String||void 0===f.google.protobuf.Edition[e.maximumEdition]?e.maximumEdition:f.google.protobuf.Edition[e.maximumEdition]),o},fn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},fn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.FeatureSetDefaults"},fn.FeatureSetEditionDefault=(gn.prototype.edition=0,gn.prototype.overridableFeatures=null,gn.prototype.fixedFeatures=null,gn.create=function(e){return new gn(e)},gn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.edition&&Object.hasOwnProperty.call(e,"edition")&&t.uint32(24).int32(e.edition),null!=e.overridableFeatures&&Object.hasOwnProperty.call(e,"overridableFeatures")&&f.google.protobuf.FeatureSet.encode(e.overridableFeatures,t.uint32(34).fork(),r+1).ldelim(),null!=e.fixedFeatures&&Object.hasOwnProperty.call(e,"fixedFeatures")&&f.google.protobuf.FeatureSet.encode(e.fixedFeatures,t.uint32(42).fork(),r+1).ldelim(),t},gn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},gn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 3:i.edition=e.int32();break;case 4:i.overridableFeatures=f.google.protobuf.FeatureSet.decode(e,e.uint32(),void 0,o+1);break;case 5:i.fixedFeatures=f.google.protobuf.FeatureSet.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},gn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},gn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.edition&&Object.hasOwnProperty.call(e,"edition"))switch(e.edition){default:return"edition: enum value expected";case 0:case 900:case 998:case 999:case 1e3:case 1001:case 1:case 2:case 99997:case 99998:case 99999:case 2147483647:}var r;if(null!=e.overridableFeatures&&Object.hasOwnProperty.call(e,"overridableFeatures")&&(r=f.google.protobuf.FeatureSet.verify(e.overridableFeatures,t+1)))return"overridableFeatures."+r;if(null!=e.fixedFeatures&&Object.hasOwnProperty.call(e,"fixedFeatures")&&(r=f.google.protobuf.FeatureSet.verify(e.fixedFeatures,t+1)))return"fixedFeatures."+r;return null},gn.fromObject=function(e,t){if(e instanceof f.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault;switch(e.edition){default:"number"==typeof e.edition&&(r.edition=e.edition);break;case"EDITION_UNKNOWN":case 0:r.edition=0;break;case"EDITION_LEGACY":case 900:r.edition=900;break;case"EDITION_PROTO2":case 998:r.edition=998;break;case"EDITION_PROTO3":case 999:r.edition=999;break;case"EDITION_2023":case 1e3:r.edition=1e3;break;case"EDITION_2024":case 1001:r.edition=1001;break;case"EDITION_1_TEST_ONLY":case 1:r.edition=1;break;case"EDITION_2_TEST_ONLY":case 2:r.edition=2;break;case"EDITION_99997_TEST_ONLY":case 99997:r.edition=99997;break;case"EDITION_99998_TEST_ONLY":case 99998:r.edition=99998;break;case"EDITION_99999_TEST_ONLY":case 99999:r.edition=99999;break;case"EDITION_MAX":case 2147483647:r.edition=2147483647}if(null!=e.overridableFeatures){if(!p.isObject(e.overridableFeatures))throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.overridableFeatures: object expected");r.overridableFeatures=f.google.protobuf.FeatureSet.fromObject(e.overridableFeatures,t+1)}if(null!=e.fixedFeatures){if(!p.isObject(e.fixedFeatures))throw TypeError(".google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.fixedFeatures: object expected");r.fixedFeatures=f.google.protobuf.FeatureSet.fromObject(e.fixedFeatures,t+1)}return r},gn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.edition=t.enums===String?"EDITION_UNKNOWN":0,o.overridableFeatures=null,o.fixedFeatures=null),null!=e.edition&&Object.hasOwnProperty.call(e,"edition")&&(o.edition=t.enums!==String||void 0===f.google.protobuf.Edition[e.edition]?e.edition:f.google.protobuf.Edition[e.edition]),null!=e.overridableFeatures&&Object.hasOwnProperty.call(e,"overridableFeatures")&&(o.overridableFeatures=f.google.protobuf.FeatureSet.toObject(e.overridableFeatures,t,r+1)),null!=e.fixedFeatures&&Object.hasOwnProperty.call(e,"fixedFeatures")&&(o.fixedFeatures=f.google.protobuf.FeatureSet.toObject(e.fixedFeatures,t,r+1)),o},gn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},gn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault"},gn),fn),r.SourceCodeInfo=(mn.prototype.location=p.emptyArray,mn.create=function(e){return new mn(e)},mn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.location&&e.location.length)for(var o=0;o<e.location.length;++o)f.google.protobuf.SourceCodeInfo.Location.encode(e.location[o],t.uint32(10).fork(),r+1).ldelim();return t},mn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},mn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.SourceCodeInfo;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?(i.location&&i.location.length||(i.location=[]),i.location.push(f.google.protobuf.SourceCodeInfo.Location.decode(e,e.uint32(),void 0,o+1))):e.skipType(7&a,o)}return i},mn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},mn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.location&&Object.hasOwnProperty.call(e,"location")){if(!Array.isArray(e.location))return"location: array expected";for(var r=0;r<e.location.length;++r){var o=f.google.protobuf.SourceCodeInfo.Location.verify(e.location[r],t+1);if(o)return"location."+o}}return null},mn.fromObject=function(e,t){if(e instanceof f.google.protobuf.SourceCodeInfo)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.SourceCodeInfo: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.SourceCodeInfo;if(e.location){if(!Array.isArray(e.location))throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected");r.location=[];for(var o=0;o<e.location.length;++o){if(!p.isObject(e.location[o]))throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected");r.location[o]=f.google.protobuf.SourceCodeInfo.Location.fromObject(e.location[o],t+1)}}return r},mn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.location=[]),e.location&&e.location.length){o.location=[];for(var n=0;n<e.location.length;++n)o.location[n]=f.google.protobuf.SourceCodeInfo.Location.toObject(e.location[n],t,r+1)}return o},mn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},mn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.SourceCodeInfo"},mn.Location=(bn.prototype.path=p.emptyArray,bn.prototype.span=p.emptyArray,bn.prototype.leadingComments="",bn.prototype.trailingComments="",bn.prototype.leadingDetachedComments=p.emptyArray,bn.create=function(e){return new bn(e)},bn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.path&&e.path.length){t.uint32(10).fork();for(var o=0;o<e.path.length;++o)t.int32(e.path[o]);t.ldelim()}if(null!=e.span&&e.span.length){t.uint32(18).fork();for(o=0;o<e.span.length;++o)t.int32(e.span[o]);t.ldelim()}if(null!=e.leadingComments&&Object.hasOwnProperty.call(e,"leadingComments")&&t.uint32(26).string(e.leadingComments),null!=e.trailingComments&&Object.hasOwnProperty.call(e,"trailingComments")&&t.uint32(34).string(e.trailingComments),null!=e.leadingDetachedComments&&e.leadingDetachedComments.length)for(o=0;o<e.leadingDetachedComments.length;++o)t.uint32(50).string(e.leadingDetachedComments[o]);return t},bn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},bn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.SourceCodeInfo.Location;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:if(i.path&&i.path.length||(i.path=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.path.push(e.int32());else i.path.push(e.int32());break;case 2:if(i.span&&i.span.length||(i.span=[]),2==(7&a))for(s=e.uint32()+e.pos;e.pos<s;)i.span.push(e.int32());else i.span.push(e.int32());break;case 3:i.leadingComments=e.string();break;case 4:i.trailingComments=e.string();break;case 6:i.leadingDetachedComments&&i.leadingDetachedComments.length||(i.leadingDetachedComments=[]),i.leadingDetachedComments.push(e.string());break;default:e.skipType(7&a,o)}}return i},bn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},bn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.path&&Object.hasOwnProperty.call(e,"path")){if(!Array.isArray(e.path))return"path: array expected";for(var r=0;r<e.path.length;++r)if(!p.isInteger(e.path[r]))return"path: integer[] expected"}if(null!=e.span&&Object.hasOwnProperty.call(e,"span")){if(!Array.isArray(e.span))return"span: array expected";for(r=0;r<e.span.length;++r)if(!p.isInteger(e.span[r]))return"span: integer[] expected"}if(null!=e.leadingComments&&Object.hasOwnProperty.call(e,"leadingComments")&&!p.isString(e.leadingComments))return"leadingComments: string expected";if(null!=e.trailingComments&&Object.hasOwnProperty.call(e,"trailingComments")&&!p.isString(e.trailingComments))return"trailingComments: string expected";if(null!=e.leadingDetachedComments&&Object.hasOwnProperty.call(e,"leadingDetachedComments")){if(!Array.isArray(e.leadingDetachedComments))return"leadingDetachedComments: array expected";for(r=0;r<e.leadingDetachedComments.length;++r)if(!p.isString(e.leadingDetachedComments[r]))return"leadingDetachedComments: string[] expected"}return null},bn.fromObject=function(e,t){if(e instanceof f.google.protobuf.SourceCodeInfo.Location)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.SourceCodeInfo.Location: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.SourceCodeInfo.Location;if(e.path){if(!Array.isArray(e.path))throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected");r.path=[];for(var o=0;o<e.path.length;++o)r.path[o]=0|e.path[o]}if(e.span){if(!Array.isArray(e.span))throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected");r.span=[];for(o=0;o<e.span.length;++o)r.span[o]=0|e.span[o]}if(null!=e.leadingComments&&(r.leadingComments=String(e.leadingComments)),null!=e.trailingComments&&(r.trailingComments=String(e.trailingComments)),e.leadingDetachedComments){if(!Array.isArray(e.leadingDetachedComments))throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected");r.leadingDetachedComments=[];for(o=0;o<e.leadingDetachedComments.length;++o)r.leadingDetachedComments[o]=String(e.leadingDetachedComments[o])}return r},bn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.path=[],o.span=[],o.leadingDetachedComments=[]),t.defaults&&(o.leadingComments="",o.trailingComments=""),e.path&&e.path.length){o.path=[];for(var n=0;n<e.path.length;++n)o.path[n]=e.path[n]}if(e.span&&e.span.length){o.span=[];for(n=0;n<e.span.length;++n)o.span[n]=e.span[n]}if(null!=e.leadingComments&&Object.hasOwnProperty.call(e,"leadingComments")&&(o.leadingComments=e.leadingComments),null!=e.trailingComments&&Object.hasOwnProperty.call(e,"trailingComments")&&(o.trailingComments=e.trailingComments),e.leadingDetachedComments&&e.leadingDetachedComments.length){o.leadingDetachedComments=[];for(n=0;n<e.leadingDetachedComments.length;++n)o.leadingDetachedComments[n]=e.leadingDetachedComments[n]}return o},bn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},bn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.SourceCodeInfo.Location"},bn),mn),r.GeneratedCodeInfo=(yn.prototype.annotation=p.emptyArray,yn.create=function(e){return new yn(e)},yn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.annotation&&e.annotation.length)for(var o=0;o<e.annotation.length;++o)f.google.protobuf.GeneratedCodeInfo.Annotation.encode(e.annotation[o],t.uint32(10).fork(),r+1).ldelim();return t},yn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},yn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.GeneratedCodeInfo;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?(i.annotation&&i.annotation.length||(i.annotation=[]),i.annotation.push(f.google.protobuf.GeneratedCodeInfo.Annotation.decode(e,e.uint32(),void 0,o+1))):e.skipType(7&a,o)}return i},yn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},yn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.annotation&&Object.hasOwnProperty.call(e,"annotation")){if(!Array.isArray(e.annotation))return"annotation: array expected";for(var r=0;r<e.annotation.length;++r){var o=f.google.protobuf.GeneratedCodeInfo.Annotation.verify(e.annotation[r],t+1);if(o)return"annotation."+o}}return null},yn.fromObject=function(e,t){if(e instanceof f.google.protobuf.GeneratedCodeInfo)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.GeneratedCodeInfo: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.GeneratedCodeInfo;if(e.annotation){if(!Array.isArray(e.annotation))throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected");r.annotation=[];for(var o=0;o<e.annotation.length;++o){if(!p.isObject(e.annotation[o]))throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected");r.annotation[o]=f.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(e.annotation[o],t+1)}}return r},yn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.annotation=[]),e.annotation&&e.annotation.length){o.annotation=[];for(var n=0;n<e.annotation.length;++n)o.annotation[n]=f.google.protobuf.GeneratedCodeInfo.Annotation.toObject(e.annotation[n],t,r+1)}return o},yn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},yn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.GeneratedCodeInfo"},yn.Annotation=(hn.prototype.path=p.emptyArray,hn.prototype.sourceFile="",hn.prototype.begin=0,hn.prototype.end=0,hn.prototype.semantic=0,hn.create=function(e){return new hn(e)},hn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.path&&e.path.length){t.uint32(10).fork();for(var o=0;o<e.path.length;++o)t.int32(e.path[o]);t.ldelim()}return null!=e.sourceFile&&Object.hasOwnProperty.call(e,"sourceFile")&&t.uint32(18).string(e.sourceFile),null!=e.begin&&Object.hasOwnProperty.call(e,"begin")&&t.uint32(24).int32(e.begin),null!=e.end&&Object.hasOwnProperty.call(e,"end")&&t.uint32(32).int32(e.end),null!=e.semantic&&Object.hasOwnProperty.call(e,"semantic")&&t.uint32(40).int32(e.semantic),t},hn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},hn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.GeneratedCodeInfo.Annotation;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:if(i.path&&i.path.length||(i.path=[]),2==(7&a))for(var s=e.uint32()+e.pos;e.pos<s;)i.path.push(e.int32());else i.path.push(e.int32());break;case 2:i.sourceFile=e.string();break;case 3:i.begin=e.int32();break;case 4:i.end=e.int32();break;case 5:i.semantic=e.int32();break;default:e.skipType(7&a,o)}}return i},hn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},hn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.path&&Object.hasOwnProperty.call(e,"path")){if(!Array.isArray(e.path))return"path: array expected";for(var r=0;r<e.path.length;++r)if(!p.isInteger(e.path[r]))return"path: integer[] expected"}if(null!=e.sourceFile&&Object.hasOwnProperty.call(e,"sourceFile")&&!p.isString(e.sourceFile))return"sourceFile: string expected";if(null!=e.begin&&Object.hasOwnProperty.call(e,"begin")&&!p.isInteger(e.begin))return"begin: integer expected";if(null!=e.end&&Object.hasOwnProperty.call(e,"end")&&!p.isInteger(e.end))return"end: integer expected";if(null!=e.semantic&&Object.hasOwnProperty.call(e,"semantic"))switch(e.semantic){default:return"semantic: enum value expected";case 0:case 1:case 2:}return null},hn.fromObject=function(e,t){if(e instanceof f.google.protobuf.GeneratedCodeInfo.Annotation)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.GeneratedCodeInfo.Annotation;if(e.path){if(!Array.isArray(e.path))throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected");r.path=[];for(var o=0;o<e.path.length;++o)r.path[o]=0|e.path[o]}switch(null!=e.sourceFile&&(r.sourceFile=String(e.sourceFile)),null!=e.begin&&(r.begin=0|e.begin),null!=e.end&&(r.end=0|e.end),e.semantic){default:"number"==typeof e.semantic&&(r.semantic=e.semantic);break;case"NONE":case 0:r.semantic=0;break;case"SET":case 1:r.semantic=1;break;case"ALIAS":case 2:r.semantic=2}return r},hn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.path=[]),t.defaults&&(o.sourceFile="",o.begin=0,o.end=0,o.semantic=t.enums===String?"NONE":0),e.path&&e.path.length){o.path=[];for(var n=0;n<e.path.length;++n)o.path[n]=e.path[n]}return null!=e.sourceFile&&Object.hasOwnProperty.call(e,"sourceFile")&&(o.sourceFile=e.sourceFile),null!=e.begin&&Object.hasOwnProperty.call(e,"begin")&&(o.begin=e.begin),null!=e.end&&Object.hasOwnProperty.call(e,"end")&&(o.end=e.end),null!=e.semantic&&Object.hasOwnProperty.call(e,"semantic")&&(o.semantic=t.enums!==String||void 0===f.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[e.semantic]?e.semantic:f.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[e.semantic]),o},hn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},hn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.GeneratedCodeInfo.Annotation"},hn.Semantic=(n={},(e=Object.create(n))[n[0]="NONE"]=0,e[n[1]="SET"]=1,e[n[2]="ALIAS"]=2,e),hn),yn),r.SymbolVisibility=(n={},(e=Object.create(n))[n[0]="VISIBILITY_UNSET"]=0,e[n[1]="VISIBILITY_LOCAL"]=1,e[n[2]="VISIBILITY_EXPORT"]=2,e),r.Timestamp=(On.prototype.seconds=p.Long?p.Long.fromBits(0,0,!1):0,On.prototype.nanos=0,On.create=function(e){return new On(e)},On.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.seconds&&Object.hasOwnProperty.call(e,"seconds")&&t.uint32(8).int64(e.seconds),null!=e.nanos&&Object.hasOwnProperty.call(e,"nanos")&&t.uint32(16).int32(e.nanos),t},On.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},On.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.Timestamp;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.seconds=e.int64();break;case 2:i.nanos=e.int32();break;default:e.skipType(7&a,o)}}return i},On.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},On.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.seconds&&Object.hasOwnProperty.call(e,"seconds")&&!(p.isInteger(e.seconds)||e.seconds&&p.isInteger(e.seconds.low)&&p.isInteger(e.seconds.high))?"seconds: integer|Long expected":null!=e.nanos&&Object.hasOwnProperty.call(e,"nanos")&&!p.isInteger(e.nanos)?"nanos: integer expected":null},On.fromObject=function(e,t){if(e instanceof f.google.protobuf.Timestamp)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.Timestamp: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.Timestamp;return null!=e.seconds&&(p.Long?t.seconds=p.Long.fromValue(e.seconds,!1):"string"==typeof e.seconds?t.seconds=parseInt(e.seconds,10):"number"==typeof e.seconds?t.seconds=e.seconds:"object"==typeof e.seconds&&(t.seconds=new p.LongBits(e.seconds.low>>>0,e.seconds.high>>>0).toNumber())),null!=e.nanos&&(t.nanos=0|e.nanos),t},On.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,r={};return t.defaults&&(p.Long?(o=new p.Long(0,0,!1),r.seconds=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):r.seconds=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0,r.nanos=0),null!=e.seconds&&Object.hasOwnProperty.call(e,"seconds")&&("undefined"!=typeof BigInt&&t.longs===BigInt?r.seconds="number"==typeof e.seconds?BigInt(e.seconds):p.Long.fromBits(e.seconds.low>>>0,e.seconds.high>>>0,!1).toBigInt():"number"==typeof e.seconds?r.seconds=t.longs===String?String(e.seconds):e.seconds:r.seconds=t.longs===String?p.Long.prototype.toString.call(e.seconds):t.longs===Number?new p.LongBits(e.seconds.low>>>0,e.seconds.high>>>0).toNumber():e.seconds),null!=e.nanos&&Object.hasOwnProperty.call(e,"nanos")&&(r.nanos=e.nanos),r},On.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},On.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.Timestamp"},On),r.Duration=(vn.prototype.seconds=p.Long?p.Long.fromBits(0,0,!1):0,vn.prototype.nanos=0,vn.create=function(e){return new vn(e)},vn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.seconds&&Object.hasOwnProperty.call(e,"seconds")&&t.uint32(8).int64(e.seconds),null!=e.nanos&&Object.hasOwnProperty.call(e,"nanos")&&t.uint32(16).int32(e.nanos),t},vn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},vn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.Duration;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.seconds=e.int64();break;case 2:i.nanos=e.int32();break;default:e.skipType(7&a,o)}}return i},vn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},vn.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.seconds&&Object.hasOwnProperty.call(e,"seconds")&&!(p.isInteger(e.seconds)||e.seconds&&p.isInteger(e.seconds.low)&&p.isInteger(e.seconds.high))?"seconds: integer|Long expected":null!=e.nanos&&Object.hasOwnProperty.call(e,"nanos")&&!p.isInteger(e.nanos)?"nanos: integer expected":null},vn.fromObject=function(e,t){if(e instanceof f.google.protobuf.Duration)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.Duration: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.Duration;return null!=e.seconds&&(p.Long?t.seconds=p.Long.fromValue(e.seconds,!1):"string"==typeof e.seconds?t.seconds=parseInt(e.seconds,10):"number"==typeof e.seconds?t.seconds=e.seconds:"object"==typeof e.seconds&&(t.seconds=new p.LongBits(e.seconds.low>>>0,e.seconds.high>>>0).toNumber())),null!=e.nanos&&(t.nanos=0|e.nanos),t},vn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,r={};return t.defaults&&(p.Long?(o=new p.Long(0,0,!1),r.seconds=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):r.seconds=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0,r.nanos=0),null!=e.seconds&&Object.hasOwnProperty.call(e,"seconds")&&("undefined"!=typeof BigInt&&t.longs===BigInt?r.seconds="number"==typeof e.seconds?BigInt(e.seconds):p.Long.fromBits(e.seconds.low>>>0,e.seconds.high>>>0,!1).toBigInt():"number"==typeof e.seconds?r.seconds=t.longs===String?String(e.seconds):e.seconds:r.seconds=t.longs===String?p.Long.prototype.toString.call(e.seconds):t.longs===Number?new p.LongBits(e.seconds.low>>>0,e.seconds.high>>>0).toNumber():e.seconds),null!=e.nanos&&Object.hasOwnProperty.call(e,"nanos")&&(r.nanos=e.nanos),r},vn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},vn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.Duration"},vn),r.Any=(jn.prototype.type_url="",jn.prototype.value=p.newBuffer([]),jn.create=function(e){return new jn(e)},jn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.type_url&&Object.hasOwnProperty.call(e,"type_url")&&t.uint32(10).string(e.type_url),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(18).bytes(e.value),t},jn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},jn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.Any;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.type_url=e.string();break;case 2:i.value=e.bytes();break;default:e.skipType(7&a,o)}}return i},jn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},jn.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.type_url&&Object.hasOwnProperty.call(e,"type_url")&&!p.isString(e.type_url)?"type_url: string expected":null!=e.value&&Object.hasOwnProperty.call(e,"value")&&!(e.value&&"number"==typeof e.value.length||p.isString(e.value))?"value: buffer expected":null},jn.fromObject=function(e,t){if(e instanceof f.google.protobuf.Any)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.Any: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.Any;return null!=e.type_url&&(t.type_url=String(e.type_url)),null!=e.value&&("string"==typeof e.value?p.base64.decode(e.value,t.value=p.newBuffer(p.base64.length(e.value)),0):0<=e.value.length&&(t.value=e.value)),t},jn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.type_url="",t.bytes===String?r.value="":(r.value=[],t.bytes!==Array&&(r.value=p.newBuffer(r.value)))),null!=e.type_url&&Object.hasOwnProperty.call(e,"type_url")&&(r.type_url=e.type_url),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&(r.value=t.bytes===String?p.base64.encode(e.value,0,e.value.length):t.bytes===Array?Array.prototype.slice.call(e.value):e.value),r},jn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},jn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.Any"},jn),r.Empty=(wn.create=function(e){return new wn(e)},wn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return t},wn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},wn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,t=new f.google.protobuf.Empty;e.pos<n;){var i=e.uint32();if(i===r)break;e.skipType(7&i,o)}return t},wn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},wn.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null},wn.fromObject=function(e,t){return e instanceof f.google.protobuf.Empty?e:new f.google.protobuf.Empty},wn.toObject=function(){return{}},wn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},wn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.Empty"},wn),r.FieldMask=(xn.prototype.paths=p.emptyArray,xn.create=function(e){return new xn(e)},xn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.paths&&e.paths.length)for(var o=0;o<e.paths.length;++o)t.uint32(10).string(e.paths[o]);return t},xn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},xn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.FieldMask;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?(i.paths&&i.paths.length||(i.paths=[]),i.paths.push(e.string())):e.skipType(7&a,o)}return i},xn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},xn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.paths&&Object.hasOwnProperty.call(e,"paths")){if(!Array.isArray(e.paths))return"paths: array expected";for(var r=0;r<e.paths.length;++r)if(!p.isString(e.paths[r]))return"paths: string[] expected"}return null},xn.fromObject=function(e,t){if(e instanceof f.google.protobuf.FieldMask)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.FieldMask: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.FieldMask;if(e.paths){if(!Array.isArray(e.paths))throw TypeError(".google.protobuf.FieldMask.paths: array expected");r.paths=[];for(var o=0;o<e.paths.length;++o)r.paths[o]=String(e.paths[o])}return r},xn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.paths=[]),e.paths&&e.paths.length){o.paths=[];for(var n=0;n<e.paths.length;++n)o.paths[n]=e.paths[n]}return o},xn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},xn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.FieldMask"},xn),r.Struct=(Tn.prototype.fields=p.emptyObject,Tn.create=function(e){return new Tn(e)},Tn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.fields&&Object.hasOwnProperty.call(e,"fields"))for(var o=Object.keys(e.fields),n=0;n<o.length;++n)t.uint32(10).fork().uint32(10).string(o[n]),f.google.protobuf.Value.encode(e.fields[o[n]],t.uint32(18).fork(),r+1).ldelim().ldelim();return t},Tn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Tn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.Struct;e.pos<n;){var a=e.uint32();if(a===r)break;if(a>>>3==1){i.fields===p.emptyObject&&(i.fields={});for(var s=e.uint32()+e.pos,l="",c=null;e.pos<s;){var u=e.uint32();switch(u>>>3){case 1:l=e.string();break;case 2:c=f.google.protobuf.Value.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&u,o)}}"__proto__"===l&&p.makeProp(i.fields,l),i.fields[l]=c}else e.skipType(7&a,o)}return i},Tn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Tn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.fields&&Object.hasOwnProperty.call(e,"fields")){if(!p.isObject(e.fields))return"fields: object expected";for(var r=Object.keys(e.fields),o=0;o<r.length;++o){var n=f.google.protobuf.Value.verify(e.fields[r[o]],t+1);if(n)return"fields."+n}}return null},Tn.fromObject=function(e,t){if(e instanceof f.google.protobuf.Struct)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.Struct: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.Struct;if(e.fields){if(!p.isObject(e.fields))throw TypeError(".google.protobuf.Struct.fields: object expected");r.fields={};for(var o=Object.keys(e.fields),n=0;n<o.length;++n){if("__proto__"===o[n]&&p.makeProp(r.fields,o[n]),!p.isObject(e.fields[o[n]]))throw TypeError(".google.protobuf.Struct.fields: object expected");r.fields[o[n]]=f.google.protobuf.Value.fromObject(e.fields[o[n]],t+1)}}return r},Tn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,n={};if((t.objects||t.defaults)&&(n.fields={}),e.fields&&(o=Object.keys(e.fields)).length){n.fields={};for(var i=0;i<o.length;++i)"__proto__"===o[i]&&p.makeProp(n.fields,o[i]),n.fields[o[i]]=f.google.protobuf.Value.toObject(e.fields[o[i]],t,r+1)}return n},Tn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Tn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.Struct"},Tn),r.Value=(kn.prototype.nullValue=null,kn.prototype.numberValue=null,kn.prototype.stringValue=null,kn.prototype.boolValue=null,kn.prototype.structValue=null,kn.prototype.listValue=null,Object.defineProperty(kn.prototype,"kind",{get:p.oneOfGetter(n=["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]),set:p.oneOfSetter(n)}),kn.create=function(e){return new kn(e)},kn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.nullValue&&Object.hasOwnProperty.call(e,"nullValue")&&t.uint32(8).int32(e.nullValue),null!=e.numberValue&&Object.hasOwnProperty.call(e,"numberValue")&&t.uint32(17).double(e.numberValue),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&t.uint32(26).string(e.stringValue),null!=e.boolValue&&Object.hasOwnProperty.call(e,"boolValue")&&t.uint32(32).bool(e.boolValue),null!=e.structValue&&Object.hasOwnProperty.call(e,"structValue")&&f.google.protobuf.Struct.encode(e.structValue,t.uint32(42).fork(),r+1).ldelim(),null!=e.listValue&&Object.hasOwnProperty.call(e,"listValue")&&f.google.protobuf.ListValue.encode(e.listValue,t.uint32(50).fork(),r+1).ldelim(),t},kn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},kn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.Value;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.nullValue=e.int32();break;case 2:i.numberValue=e.double();break;case 3:i.stringValue=e.string();break;case 4:i.boolValue=e.bool();break;case 5:i.structValue=f.google.protobuf.Struct.decode(e,e.uint32(),void 0,o+1);break;case 6:i.listValue=f.google.protobuf.ListValue.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},kn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},kn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.nullValue&&Object.hasOwnProperty.call(e,"nullValue")&&(o.kind=1,0!==e.nullValue))return"nullValue: enum value expected";if(null!=e.numberValue&&Object.hasOwnProperty.call(e,"numberValue")){if(1===o.kind)return"kind: multiple values";if(o.kind=1,"number"!=typeof e.numberValue)return"numberValue: number expected"}if(null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")){if(1===o.kind)return"kind: multiple values";if(o.kind=1,!p.isString(e.stringValue))return"stringValue: string expected"}if(null!=e.boolValue&&Object.hasOwnProperty.call(e,"boolValue")){if(1===o.kind)return"kind: multiple values";if(o.kind=1,"boolean"!=typeof e.boolValue)return"boolValue: boolean expected"}if(null!=e.structValue&&Object.hasOwnProperty.call(e,"structValue")){if(1===o.kind)return"kind: multiple values";if(r=f.google.protobuf.Struct.verify(e.structValue,t+(o.kind=1)))return"structValue."+r}if(null!=e.listValue&&Object.hasOwnProperty.call(e,"listValue")){if(1===o.kind)return"kind: multiple values";if(r=f.google.protobuf.ListValue.verify(e.listValue,t+(o.kind=1)))return"listValue."+r}return null},kn.fromObject=function(e,t){if(e instanceof f.google.protobuf.Value)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.Value: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.Value;switch(e.nullValue){default:"number"==typeof e.nullValue&&(r.nullValue=e.nullValue);break;case"NULL_VALUE":case 0:r.nullValue=0}if(null!=e.numberValue&&(r.numberValue=Number(e.numberValue)),null!=e.stringValue&&(r.stringValue=String(e.stringValue)),null!=e.boolValue&&(r.boolValue=Boolean(e.boolValue)),null!=e.structValue){if(!p.isObject(e.structValue))throw TypeError(".google.protobuf.Value.structValue: object expected");r.structValue=f.google.protobuf.Struct.fromObject(e.structValue,t+1)}if(null!=e.listValue){if(!p.isObject(e.listValue))throw TypeError(".google.protobuf.Value.listValue: object expected");r.listValue=f.google.protobuf.ListValue.fromObject(e.listValue,t+1)}return r},kn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return null!=e.nullValue&&Object.hasOwnProperty.call(e,"nullValue")&&(o.nullValue=t.enums!==String||void 0===f.google.protobuf.NullValue[e.nullValue]?e.nullValue:f.google.protobuf.NullValue[e.nullValue],t.oneofs)&&(o.kind="nullValue"),null!=e.numberValue&&Object.hasOwnProperty.call(e,"numberValue")&&(o.numberValue=t.json&&!isFinite(e.numberValue)?String(e.numberValue):e.numberValue,t.oneofs)&&(o.kind="numberValue"),null!=e.stringValue&&Object.hasOwnProperty.call(e,"stringValue")&&(o.stringValue=e.stringValue,t.oneofs)&&(o.kind="stringValue"),null!=e.boolValue&&Object.hasOwnProperty.call(e,"boolValue")&&(o.boolValue=e.boolValue,t.oneofs)&&(o.kind="boolValue"),null!=e.structValue&&Object.hasOwnProperty.call(e,"structValue")&&(o.structValue=f.google.protobuf.Struct.toObject(e.structValue,t,r+1),t.oneofs)&&(o.kind="structValue"),null!=e.listValue&&Object.hasOwnProperty.call(e,"listValue")&&(o.listValue=f.google.protobuf.ListValue.toObject(e.listValue,t,r+1),t.oneofs)&&(o.kind="listValue"),o},kn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},kn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.Value"},kn),r.NullValue=(e={},(n=Object.create(e))[e[0]="NULL_VALUE"]=0,n),r.ListValue=(Sn.prototype.values=p.emptyArray,Sn.create=function(e){return new Sn(e)},Sn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.values&&e.values.length)for(var o=0;o<e.values.length;++o)f.google.protobuf.Value.encode(e.values[o],t.uint32(10).fork(),r+1).ldelim();return t},Sn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Sn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.ListValue;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?(i.values&&i.values.length||(i.values=[]),i.values.push(f.google.protobuf.Value.decode(e,e.uint32(),void 0,o+1))):e.skipType(7&a,o)}return i},Sn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Sn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.values&&Object.hasOwnProperty.call(e,"values")){if(!Array.isArray(e.values))return"values: array expected";for(var r=0;r<e.values.length;++r){var o=f.google.protobuf.Value.verify(e.values[r],t+1);if(o)return"values."+o}}return null},Sn.fromObject=function(e,t){if(e instanceof f.google.protobuf.ListValue)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.ListValue: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.protobuf.ListValue;if(e.values){if(!Array.isArray(e.values))throw TypeError(".google.protobuf.ListValue.values: array expected");r.values=[];for(var o=0;o<e.values.length;++o){if(!p.isObject(e.values[o]))throw TypeError(".google.protobuf.ListValue.values: object expected");r.values[o]=f.google.protobuf.Value.fromObject(e.values[o],t+1)}}return r},Sn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.values=[]),e.values&&e.values.length){o.values=[];for(var n=0;n<e.values.length;++n)o.values[n]=f.google.protobuf.Value.toObject(e.values[n],t,r+1)}return o},Sn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Sn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.ListValue"},Sn),r.DoubleValue=(Pn.prototype.value=0,Pn.create=function(e){return new Pn(e)},Pn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(9).double(e.value),t},Pn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Pn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.DoubleValue;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.value=e.double():e.skipType(7&a,o)}return i},Pn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Pn.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.value&&Object.hasOwnProperty.call(e,"value")&&"number"!=typeof e.value?"value: number expected":null},Pn.fromObject=function(e,t){if(e instanceof f.google.protobuf.DoubleValue)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.DoubleValue: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.DoubleValue;return null!=e.value&&(t.value=Number(e.value)),t},Pn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.value=0),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&(r.value=t.json&&!isFinite(e.value)?String(e.value):e.value),r},Pn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Pn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.DoubleValue"},Pn),r.FloatValue=(En.prototype.value=0,En.create=function(e){return new En(e)},En.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),t},En.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},En.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.FloatValue;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.value=e.float():e.skipType(7&a,o)}return i},En.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},En.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.value&&Object.hasOwnProperty.call(e,"value")&&"number"!=typeof e.value?"value: number expected":null},En.fromObject=function(e,t){if(e instanceof f.google.protobuf.FloatValue)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.FloatValue: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.FloatValue;return null!=e.value&&(t.value=Number(e.value)),t},En.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.value=0),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&(r.value=t.json&&!isFinite(e.value)?String(e.value):e.value),r},En.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},En.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.FloatValue"},En),r.Int64Value=(Dn.prototype.value=p.Long?p.Long.fromBits(0,0,!1):0,Dn.create=function(e){return new Dn(e)},Dn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).int64(e.value),t},Dn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Dn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.Int64Value;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.value=e.int64():e.skipType(7&a,o)}return i},Dn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Dn.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.value&&Object.hasOwnProperty.call(e,"value")&&!(p.isInteger(e.value)||e.value&&p.isInteger(e.value.low)&&p.isInteger(e.value.high))?"value: integer|Long expected":null},Dn.fromObject=function(e,t){if(e instanceof f.google.protobuf.Int64Value)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.Int64Value: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.Int64Value;return null!=e.value&&(p.Long?t.value=p.Long.fromValue(e.value,!1):"string"==typeof e.value?t.value=parseInt(e.value,10):"number"==typeof e.value?t.value=e.value:"object"==typeof e.value&&(t.value=new p.LongBits(e.value.low>>>0,e.value.high>>>0).toNumber())),t},Dn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,r={};return t.defaults&&(p.Long?(o=new p.Long(0,0,!1),r.value=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):r.value=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&("undefined"!=typeof BigInt&&t.longs===BigInt?r.value="number"==typeof e.value?BigInt(e.value):p.Long.fromBits(e.value.low>>>0,e.value.high>>>0,!1).toBigInt():"number"==typeof e.value?r.value=t.longs===String?String(e.value):e.value:r.value=t.longs===String?p.Long.prototype.toString.call(e.value):t.longs===Number?new p.LongBits(e.value.low>>>0,e.value.high>>>0).toNumber():e.value),r},Dn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Dn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.Int64Value"},Dn),r.UInt64Value=(In.prototype.value=p.Long?p.Long.fromBits(0,0,!0):0,In.create=function(e){return new In(e)},In.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).uint64(e.value),t},In.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},In.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.UInt64Value;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.value=e.uint64():e.skipType(7&a,o)}return i},In.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},In.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.value&&Object.hasOwnProperty.call(e,"value")&&!(p.isInteger(e.value)||e.value&&p.isInteger(e.value.low)&&p.isInteger(e.value.high))?"value: integer|Long expected":null},In.fromObject=function(e,t){if(e instanceof f.google.protobuf.UInt64Value)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.UInt64Value: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.UInt64Value;return null!=e.value&&(p.Long?t.value=p.Long.fromValue(e.value,!0):"string"==typeof e.value?t.value=parseInt(e.value,10):"number"==typeof e.value?t.value=e.value:"object"==typeof e.value&&(t.value=new p.LongBits(e.value.low>>>0,e.value.high>>>0).toNumber(!0))),t},In.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o,r={};return t.defaults&&(p.Long?(o=new p.Long(0,0,!0),r.value=t.longs===String?o.toString():t.longs===Number?o.toNumber():"undefined"!=typeof BigInt&&t.longs===BigInt?o.toBigInt():o):r.value=t.longs===String?"0":"undefined"!=typeof BigInt&&t.longs===BigInt?BigInt("0"):0),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&("undefined"!=typeof BigInt&&t.longs===BigInt?r.value="number"==typeof e.value?BigInt(e.value):p.Long.fromBits(e.value.low>>>0,e.value.high>>>0,!0).toBigInt():"number"==typeof e.value?r.value=t.longs===String?String(e.value):e.value:r.value=t.longs===String?p.Long.prototype.toString.call(e.value):t.longs===Number?new p.LongBits(e.value.low>>>0,e.value.high>>>0).toNumber(!0):e.value),r},In.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},In.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.UInt64Value"},In),r.Int32Value=(Rn.prototype.value=0,Rn.create=function(e){return new Rn(e)},Rn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).int32(e.value),t},Rn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Rn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.Int32Value;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.value=e.int32():e.skipType(7&a,o)}return i},Rn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Rn.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.value&&Object.hasOwnProperty.call(e,"value")&&!p.isInteger(e.value)?"value: integer expected":null},Rn.fromObject=function(e,t){if(e instanceof f.google.protobuf.Int32Value)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.Int32Value: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.Int32Value;return null!=e.value&&(t.value=0|e.value),t},Rn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.value=0),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&(r.value=e.value),r},Rn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Rn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.Int32Value"},Rn),r.UInt32Value=(Ln.prototype.value=0,Ln.create=function(e){return new Ln(e)},Ln.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).uint32(e.value),t},Ln.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Ln.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.UInt32Value;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.value=e.uint32():e.skipType(7&a,o)}return i},Ln.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Ln.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.value&&Object.hasOwnProperty.call(e,"value")&&!p.isInteger(e.value)?"value: integer expected":null},Ln.fromObject=function(e,t){if(e instanceof f.google.protobuf.UInt32Value)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.UInt32Value: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.UInt32Value;return null!=e.value&&(t.value=e.value>>>0),t},Ln.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.value=0),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&(r.value=e.value),r},Ln.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Ln.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.UInt32Value"},Ln),r.BoolValue=(_n.prototype.value=!1,_n.create=function(e){return new _n(e)},_n.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(8).bool(e.value),t},_n.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},_n.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.BoolValue;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.value=e.bool():e.skipType(7&a,o)}return i},_n.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},_n.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.value&&Object.hasOwnProperty.call(e,"value")&&"boolean"!=typeof e.value?"value: boolean expected":null},_n.fromObject=function(e,t){if(e instanceof f.google.protobuf.BoolValue)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.BoolValue: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.BoolValue;return null!=e.value&&(t.value=Boolean(e.value)),t},_n.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.value=!1),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&(r.value=e.value),r},_n.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},_n.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.BoolValue"},_n),r.StringValue=(Cn.prototype.value="",Cn.create=function(e){return new Cn(e)},Cn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(10).string(e.value),t},Cn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Cn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.StringValue;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.value=e.string():e.skipType(7&a,o)}return i},Cn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Cn.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.value&&Object.hasOwnProperty.call(e,"value")&&!p.isString(e.value)?"value: string expected":null},Cn.fromObject=function(e,t){if(e instanceof f.google.protobuf.StringValue)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.StringValue: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.StringValue;return null!=e.value&&(t.value=String(e.value)),t},Cn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.value=""),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&(r.value=e.value),r},Cn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Cn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.StringValue"},Cn),r.BytesValue=(Nn.prototype.value=p.newBuffer([]),Nn.create=function(e){return new Nn(e)},Nn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(10).bytes(e.value),t},Nn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Nn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.protobuf.BytesValue;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.value=e.bytes():e.skipType(7&a,o)}return i},Nn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Nn.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.value&&Object.hasOwnProperty.call(e,"value")&&!(e.value&&"number"==typeof e.value.length||p.isString(e.value))?"value: buffer expected":null},Nn.fromObject=function(e,t){if(e instanceof f.google.protobuf.BytesValue)return e;if(!p.isObject(e))throw TypeError(".google.protobuf.BytesValue: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.protobuf.BytesValue;return null!=e.value&&("string"==typeof e.value?p.base64.decode(e.value,t.value=p.newBuffer(p.base64.length(e.value)),0):0<=e.value.length&&(t.value=e.value)),t},Nn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(t.bytes===String?r.value="":(r.value=[],t.bytes!==Array&&(r.value=p.newBuffer(r.value)))),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&(r.value=t.bytes===String?p.base64.encode(e.value,0,e.value.length):t.bytes===Array?Array.prototype.slice.call(e.value):e.value),r},Nn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Nn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.BytesValue"},Nn),r),A.type=((t={}).DayOfWeek=(i={},(e=Object.create(i))[i[0]="DAY_OF_WEEK_UNSPECIFIED"]=0,e[i[1]="MONDAY"]=1,e[i[2]="TUESDAY"]=2,e[i[3]="WEDNESDAY"]=3,e[i[4]="THURSDAY"]=4,e[i[5]="FRIDAY"]=5,e[i[6]="SATURDAY"]=6,e[i[7]="SUNDAY"]=7,e),t.LatLng=(An.prototype.latitude=0,An.prototype.longitude=0,An.create=function(e){return new An(e)},An.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.latitude&&Object.hasOwnProperty.call(e,"latitude")&&t.uint32(9).double(e.latitude),null!=e.longitude&&Object.hasOwnProperty.call(e,"longitude")&&t.uint32(17).double(e.longitude),t},An.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},An.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.type.LatLng;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.latitude=e.double();break;case 2:i.longitude=e.double();break;default:e.skipType(7&a,o)}}return i},An.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},An.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.latitude&&Object.hasOwnProperty.call(e,"latitude")&&"number"!=typeof e.latitude?"latitude: number expected":null!=e.longitude&&Object.hasOwnProperty.call(e,"longitude")&&"number"!=typeof e.longitude?"longitude: number expected":null},An.fromObject=function(e,t){if(e instanceof f.google.type.LatLng)return e;if(!p.isObject(e))throw TypeError(".google.type.LatLng: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.type.LatLng;return null!=e.latitude&&(t.latitude=Number(e.latitude)),null!=e.longitude&&(t.longitude=Number(e.longitude)),t},An.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.latitude=0,r.longitude=0),null!=e.latitude&&Object.hasOwnProperty.call(e,"latitude")&&(r.latitude=t.json&&!isFinite(e.latitude)?String(e.latitude):e.latitude),null!=e.longitude&&Object.hasOwnProperty.call(e,"longitude")&&(r.longitude=t.json&&!isFinite(e.longitude)?String(e.longitude):e.longitude),r},An.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},An.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.type.LatLng"},An),t),A.longrunning=((n={}).Operations=(((Fn.prototype=Object.create(o.rpc.Service.prototype)).constructor=Fn).create=function(e,t,r){return new this(e,t,r)},Object.defineProperty(Fn.prototype.listOperations=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.longrunning.ListOperationsRequest,f.google.longrunning.ListOperationsResponse,t,r)},"name",{value:"ListOperations"}),Object.defineProperty(Fn.prototype.getOperation=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.longrunning.GetOperationRequest,f.google.longrunning.Operation,t,r)},"name",{value:"GetOperation"}),Object.defineProperty(Fn.prototype.deleteOperation=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.longrunning.DeleteOperationRequest,f.google.protobuf.Empty,t,r)},"name",{value:"DeleteOperation"}),Object.defineProperty(Fn.prototype.cancelOperation=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.longrunning.CancelOperationRequest,f.google.protobuf.Empty,t,r)},"name",{value:"CancelOperation"}),Object.defineProperty(Fn.prototype.waitOperation=function e(t,r){return o.rpc.Service.prototype.rpcCall.call(this,e,f.google.longrunning.WaitOperationRequest,f.google.longrunning.Operation,t,r)},"name",{value:"WaitOperation"}),Fn),n.Operation=(Vn.prototype.name="",Vn.prototype.metadata=null,Vn.prototype.done=!1,Vn.prototype.error=null,Vn.prototype.response=null,Object.defineProperty(Vn.prototype,"result",{get:p.oneOfGetter(r=["error","response"]),set:p.oneOfSetter(r)}),Vn.create=function(e){return new Vn(e)},Vn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&f.google.protobuf.Any.encode(e.metadata,t.uint32(18).fork(),r+1).ldelim(),null!=e.done&&Object.hasOwnProperty.call(e,"done")&&t.uint32(24).bool(e.done),null!=e.error&&Object.hasOwnProperty.call(e,"error")&&f.google.rpc.Status.encode(e.error,t.uint32(34).fork(),r+1).ldelim(),null!=e.response&&Object.hasOwnProperty.call(e,"response")&&f.google.protobuf.Any.encode(e.response,t.uint32(42).fork(),r+1).ldelim(),t},Vn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Vn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.longrunning.Operation;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.metadata=f.google.protobuf.Any.decode(e,e.uint32(),void 0,o+1);break;case 3:i.done=e.bool();break;case 4:i.error=f.google.rpc.Status.decode(e,e.uint32(),void 0,o+1);break;case 5:i.response=f.google.protobuf.Any.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Vn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Vn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";var r,o={};if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&(r=f.google.protobuf.Any.verify(e.metadata,t+1)))return"metadata."+r;if(null!=e.done&&Object.hasOwnProperty.call(e,"done")&&"boolean"!=typeof e.done)return"done: boolean expected";if(null!=e.error&&Object.hasOwnProperty.call(e,"error")&&(r=f.google.rpc.Status.verify(e.error,t+(o.result=1))))return"error."+r;if(null!=e.response&&Object.hasOwnProperty.call(e,"response")){if(1===o.result)return"result: multiple values";if(r=f.google.protobuf.Any.verify(e.response,t+(o.result=1)))return"response."+r}return null},Vn.fromObject=function(e,t){if(e instanceof f.google.longrunning.Operation)return e;if(!p.isObject(e))throw TypeError(".google.longrunning.Operation: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.longrunning.Operation;if(null!=e.name&&(r.name=String(e.name)),null!=e.metadata){if(!p.isObject(e.metadata))throw TypeError(".google.longrunning.Operation.metadata: object expected");r.metadata=f.google.protobuf.Any.fromObject(e.metadata,t+1)}if(null!=e.done&&(r.done=Boolean(e.done)),null!=e.error){if(!p.isObject(e.error))throw TypeError(".google.longrunning.Operation.error: object expected");r.error=f.google.rpc.Status.fromObject(e.error,t+1)}if(null!=e.response){if(!p.isObject(e.response))throw TypeError(".google.longrunning.Operation.response: object expected");r.response=f.google.protobuf.Any.fromObject(e.response,t+1)}return r},Vn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.name="",o.metadata=null,o.done=!1),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&(o.metadata=f.google.protobuf.Any.toObject(e.metadata,t,r+1)),null!=e.done&&Object.hasOwnProperty.call(e,"done")&&(o.done=e.done),null!=e.error&&Object.hasOwnProperty.call(e,"error")&&(o.error=f.google.rpc.Status.toObject(e.error,t,r+1),t.oneofs)&&(o.result="error"),null!=e.response&&Object.hasOwnProperty.call(e,"response")&&(o.response=f.google.protobuf.Any.toObject(e.response,t,r+1),t.oneofs)&&(o.result="response"),o},Vn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Vn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.longrunning.Operation"},Vn),n.GetOperationRequest=(Un.prototype.name="",Un.create=function(e){return new Un(e)},Un.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},Un.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Un.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.longrunning.GetOperationRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},Un.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Un.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},Un.fromObject=function(e,t){if(e instanceof f.google.longrunning.GetOperationRequest)return e;if(!p.isObject(e))throw TypeError(".google.longrunning.GetOperationRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.longrunning.GetOperationRequest;return null!=e.name&&(t.name=String(e.name)),t},Un.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},Un.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Un.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.longrunning.GetOperationRequest"},Un),n.ListOperationsRequest=(Bn.prototype.name="",Bn.prototype.filter="",Bn.prototype.pageSize=0,Bn.prototype.pageToken="",Bn.create=function(e){return new Bn(e)},Bn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&t.uint32(10).string(e.filter),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&t.uint32(16).int32(e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&t.uint32(26).string(e.pageToken),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(34).string(e.name),t},Bn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Bn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.longrunning.ListOperationsRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 4:i.name=e.string();break;case 1:i.filter=e.string();break;case 2:i.pageSize=e.int32();break;case 3:i.pageToken=e.string();break;default:e.skipType(7&a,o)}}return i},Bn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Bn.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&!p.isString(e.filter)?"filter: string expected":null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&!p.isInteger(e.pageSize)?"pageSize: integer expected":null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&!p.isString(e.pageToken)?"pageToken: string expected":null},Bn.fromObject=function(e,t){if(e instanceof f.google.longrunning.ListOperationsRequest)return e;if(!p.isObject(e))throw TypeError(".google.longrunning.ListOperationsRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.longrunning.ListOperationsRequest;return null!=e.name&&(t.name=String(e.name)),null!=e.filter&&(t.filter=String(e.filter)),null!=e.pageSize&&(t.pageSize=0|e.pageSize),null!=e.pageToken&&(t.pageToken=String(e.pageToken)),t},Bn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.filter="",r.pageSize=0,r.pageToken="",r.name=""),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&(r.filter=e.filter),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&(r.pageSize=e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&(r.pageToken=e.pageToken),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},Bn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Bn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.longrunning.ListOperationsRequest"},Bn),n.ListOperationsResponse=(Mn.prototype.operations=p.emptyArray,Mn.prototype.nextPageToken="",Mn.create=function(e){return new Mn(e)},Mn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.operations&&e.operations.length)for(var o=0;o<e.operations.length;++o)f.google.longrunning.Operation.encode(e.operations[o],t.uint32(10).fork(),r+1).ldelim();return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(18).string(e.nextPageToken),t},Mn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Mn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.longrunning.ListOperationsResponse;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.operations&&i.operations.length||(i.operations=[]),i.operations.push(f.google.longrunning.Operation.decode(e,e.uint32(),void 0,o+1));break;case 2:i.nextPageToken=e.string();break;default:e.skipType(7&a,o)}}return i},Mn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Mn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.operations&&Object.hasOwnProperty.call(e,"operations")){if(!Array.isArray(e.operations))return"operations: array expected";for(var r=0;r<e.operations.length;++r){var o=f.google.longrunning.Operation.verify(e.operations[r],t+1);if(o)return"operations."+o}}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&!p.isString(e.nextPageToken)?"nextPageToken: string expected":null},Mn.fromObject=function(e,t){if(e instanceof f.google.longrunning.ListOperationsResponse)return e;if(!p.isObject(e))throw TypeError(".google.longrunning.ListOperationsResponse: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.longrunning.ListOperationsResponse;if(e.operations){if(!Array.isArray(e.operations))throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected");r.operations=[];for(var o=0;o<e.operations.length;++o){if(!p.isObject(e.operations[o]))throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected");r.operations[o]=f.google.longrunning.Operation.fromObject(e.operations[o],t+1)}}return null!=e.nextPageToken&&(r.nextPageToken=String(e.nextPageToken)),r},Mn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.operations=[]),t.defaults&&(o.nextPageToken=""),e.operations&&e.operations.length){o.operations=[];for(var n=0;n<e.operations.length;++n)o.operations[n]=f.google.longrunning.Operation.toObject(e.operations[n],t,r+1)}return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&(o.nextPageToken=e.nextPageToken),o},Mn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Mn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.longrunning.ListOperationsResponse"},Mn),n.CancelOperationRequest=(qn.prototype.name="",qn.create=function(e){return new qn(e)},qn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},qn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},qn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.longrunning.CancelOperationRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},qn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},qn.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},qn.fromObject=function(e,t){if(e instanceof f.google.longrunning.CancelOperationRequest)return e;if(!p.isObject(e))throw TypeError(".google.longrunning.CancelOperationRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.longrunning.CancelOperationRequest;return null!=e.name&&(t.name=String(e.name)),t},qn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},qn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},qn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.longrunning.CancelOperationRequest"},qn),n.DeleteOperationRequest=(Qn.prototype.name="",Qn.create=function(e){return new Qn(e)},Qn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},Qn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Qn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.longrunning.DeleteOperationRequest;e.pos<n;){var a=e.uint32();if(a===r)break;a>>>3==1?i.name=e.string():e.skipType(7&a,o)}return i},Qn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Qn.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name)?"name: string expected":null},Qn.fromObject=function(e,t){if(e instanceof f.google.longrunning.DeleteOperationRequest)return e;if(!p.isObject(e))throw TypeError(".google.longrunning.DeleteOperationRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.longrunning.DeleteOperationRequest;return null!=e.name&&(t.name=String(e.name)),t},Qn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.name=""),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(r.name=e.name),r},Qn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Qn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.longrunning.DeleteOperationRequest"},Qn),n.WaitOperationRequest=(Jn.prototype.name="",Jn.prototype.timeout=null,Jn.create=function(e){return new Jn(e)},Jn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.timeout&&Object.hasOwnProperty.call(e,"timeout")&&f.google.protobuf.Duration.encode(e.timeout,t.uint32(18).fork(),r+1).ldelim(),t},Jn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Jn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.longrunning.WaitOperationRequest;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.name=e.string();break;case 2:i.timeout=f.google.protobuf.Duration.decode(e,e.uint32(),void 0,o+1);break;default:e.skipType(7&a,o)}}return i},Jn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Jn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.name&&Object.hasOwnProperty.call(e,"name")&&!p.isString(e.name))return"name: string expected";if(null!=e.timeout&&Object.hasOwnProperty.call(e,"timeout")){e=f.google.protobuf.Duration.verify(e.timeout,t+1);if(e)return"timeout."+e}return null},Jn.fromObject=function(e,t){if(e instanceof f.google.longrunning.WaitOperationRequest)return e;if(!p.isObject(e))throw TypeError(".google.longrunning.WaitOperationRequest: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.longrunning.WaitOperationRequest;if(null!=e.name&&(r.name=String(e.name)),null!=e.timeout){if(!p.isObject(e.timeout))throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected");r.timeout=f.google.protobuf.Duration.fromObject(e.timeout,t+1)}return r},Jn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};return t.defaults&&(o.name="",o.timeout=null),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&(o.name=e.name),null!=e.timeout&&Object.hasOwnProperty.call(e,"timeout")&&(o.timeout=f.google.protobuf.Duration.toObject(e.timeout,t,r+1)),o},Jn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Jn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.longrunning.WaitOperationRequest"},Jn),n.OperationInfo=(Gn.prototype.responseType="",Gn.prototype.metadataType="",Gn.create=function(e){return new Gn(e)},Gn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");return null!=e.responseType&&Object.hasOwnProperty.call(e,"responseType")&&t.uint32(10).string(e.responseType),null!=e.metadataType&&Object.hasOwnProperty.call(e,"metadataType")&&t.uint32(18).string(e.metadataType),t},Gn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Gn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.longrunning.OperationInfo;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.responseType=e.string();break;case 2:i.metadataType=e.string();break;default:e.skipType(7&a,o)}}return i},Gn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Gn.verify=function(e,t){return"object"!=typeof e||null===e?"object expected":(t=void 0===t?0:t)>p.recursionLimit?"maximum nesting depth exceeded":null!=e.responseType&&Object.hasOwnProperty.call(e,"responseType")&&!p.isString(e.responseType)?"responseType: string expected":null!=e.metadataType&&Object.hasOwnProperty.call(e,"metadataType")&&!p.isString(e.metadataType)?"metadataType: string expected":null},Gn.fromObject=function(e,t){if(e instanceof f.google.longrunning.OperationInfo)return e;if(!p.isObject(e))throw TypeError(".google.longrunning.OperationInfo: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");t=new f.google.longrunning.OperationInfo;return null!=e.responseType&&(t.responseType=String(e.responseType)),null!=e.metadataType&&(t.metadataType=String(e.metadataType)),t},Gn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");r={};return t.defaults&&(r.responseType="",r.metadataType=""),null!=e.responseType&&Object.hasOwnProperty.call(e,"responseType")&&(r.responseType=e.responseType),null!=e.metadataType&&Object.hasOwnProperty.call(e,"metadataType")&&(r.metadataType=e.metadataType),r},Gn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Gn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.longrunning.OperationInfo"},Gn),n),A.rpc=((i={}).Status=(Wn.prototype.code=0,Wn.prototype.message="",Wn.prototype.details=p.emptyArray,Wn.create=function(e){return new Wn(e)},Wn.encode=function(e,t,r){if(t=t||a.create(),(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");if(null!=e.code&&Object.hasOwnProperty.call(e,"code")&&t.uint32(8).int32(e.code),null!=e.message&&Object.hasOwnProperty.call(e,"message")&&t.uint32(18).string(e.message),null!=e.details&&e.details.length)for(var o=0;o<e.details.length;++o)f.google.protobuf.Any.encode(e.details[o],t.uint32(26).fork(),r+1).ldelim();return t},Wn.encodeDelimited=function(e,t){return this.encode(e,t&&t.len?t.fork():t).ldelim()},Wn.decode=function(e,t,r,o){if(e instanceof d||(e=d.create(e)),(o=void 0===o?0:o)>d.recursionLimit)throw Error("maximum nesting depth exceeded");for(var n=void 0===t?e.len:e.pos+t,i=new f.google.rpc.Status;e.pos<n;){var a=e.uint32();if(a===r)break;switch(a>>>3){case 1:i.code=e.int32();break;case 2:i.message=e.string();break;case 3:i.details&&i.details.length||(i.details=[]),i.details.push(f.google.protobuf.Any.decode(e,e.uint32(),void 0,o+1));break;default:e.skipType(7&a,o)}}return i},Wn.decodeDelimited=function(e){return e instanceof d||(e=new d(e)),this.decode(e,e.uint32())},Wn.verify=function(e,t){if("object"!=typeof e||null===e)return"object expected";if((t=void 0===t?0:t)>p.recursionLimit)return"maximum nesting depth exceeded";if(null!=e.code&&Object.hasOwnProperty.call(e,"code")&&!p.isInteger(e.code))return"code: integer expected";if(null!=e.message&&Object.hasOwnProperty.call(e,"message")&&!p.isString(e.message))return"message: string expected";if(null!=e.details&&Object.hasOwnProperty.call(e,"details")){if(!Array.isArray(e.details))return"details: array expected";for(var r=0;r<e.details.length;++r){var o=f.google.protobuf.Any.verify(e.details[r],t+1);if(o)return"details."+o}}return null},Wn.fromObject=function(e,t){if(e instanceof f.google.rpc.Status)return e;if(!p.isObject(e))throw TypeError(".google.rpc.Status: object expected");if((t=void 0===t?0:t)>p.recursionLimit)throw Error("maximum nesting depth exceeded");var r=new f.google.rpc.Status;if(null!=e.code&&(r.code=0|e.code),null!=e.message&&(r.message=String(e.message)),e.details){if(!Array.isArray(e.details))throw TypeError(".google.rpc.Status.details: array expected");r.details=[];for(var o=0;o<e.details.length;++o){if(!p.isObject(e.details[o]))throw TypeError(".google.rpc.Status.details: object expected");r.details[o]=f.google.protobuf.Any.fromObject(e.details[o],t+1)}}return r},Wn.toObject=function(e,t,r){if(t=t||{},(r=void 0===r?0:r)>p.recursionLimit)throw Error("max depth exceeded");var o={};if((t.arrays||t.defaults)&&(o.details=[]),t.defaults&&(o.code=0,o.message=""),null!=e.code&&Object.hasOwnProperty.call(e,"code")&&(o.code=e.code),null!=e.message&&Object.hasOwnProperty.call(e,"message")&&(o.message=e.message),e.details&&e.details.length){o.details=[];for(var n=0;n<e.details.length;++n)o.details[n]=f.google.protobuf.Any.toObject(e.details[n],t,r+1)}return o},Wn.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},Wn.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.rpc.Status"},Wn),i),A),f});
|