@google-cloud/discoveryengine 0.4.1 → 0.5.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/CHANGELOG.md +7 -0
- package/README.md +7 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/common.proto +40 -9
- package/build/protos/google/cloud/discoveryengine/v1beta/completion_service.proto +116 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/document.proto +45 -3
- package/build/protos/google/cloud/discoveryengine/v1beta/document_service.proto +12 -12
- package/build/protos/google/cloud/discoveryengine/v1beta/import_config.proto +26 -8
- package/build/protos/google/cloud/discoveryengine/v1beta/recommendation_service.proto +15 -14
- package/build/protos/google/cloud/discoveryengine/v1beta/schema.proto +58 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/schema_service.proto +259 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/search_service.proto +546 -0
- package/build/protos/google/cloud/discoveryengine/v1beta/user_event.proto +14 -12
- package/build/protos/protos.d.ts +5625 -1874
- package/build/protos/protos.js +1 -1
- package/build/protos/protos.json +1 -1
- package/build/src/index.d.ts +10 -1
- package/build/src/index.js +10 -1
- package/build/src/v1beta/completion_service_client.d.ts +455 -0
- package/build/src/v1beta/completion_service_client.js +659 -0
- package/build/src/v1beta/completion_service_client_config.json +43 -0
- package/build/src/v1beta/document_service_client.d.ts +111 -18
- package/build/src/v1beta/document_service_client.js +134 -6
- package/build/src/v1beta/index.d.ts +3 -0
- package/build/src/v1beta/index.js +7 -1
- package/build/src/v1beta/recommendation_service_client.d.ts +108 -14
- package/build/src/v1beta/recommendation_service_client.js +128 -0
- package/build/src/v1beta/schema_service_client.d.ts +798 -0
- package/build/src/v1beta/schema_service_client.js +1122 -0
- package/build/src/v1beta/schema_service_client_config.json +63 -0
- package/build/src/v1beta/search_service_client.d.ts +851 -0
- package/build/src/v1beta/search_service_client.js +1070 -0
- package/build/src/v1beta/search_service_client_config.json +43 -0
- package/build/src/v1beta/user_event_service_client.d.ts +93 -0
- package/build/src/v1beta/user_event_service_client.js +128 -0
- package/package.json +1 -1
package/build/protos/protos.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(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){"use strict";var e,t,n,r,i,L,u=o.Reader,a=o.Writer,c=o.util,p=o.roots._google_cloud_discoveryengine_protos||(o.roots._google_cloud_discoveryengine_protos={});function V(e){if(this.text=[],this.numbers=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function F(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function l(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function G(e,t,n){o.rpc.Service.call(this,e,t,n)}function J(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function B(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function M(e){if(this.documents=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function _(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function q(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function z(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function H(e){if(this.inputUris=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function s(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Y(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function g(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function W(e){if(this.userEvents=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Q(e){if(this.errorSamples=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function K(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function X(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function d(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Z(e){if(this.documents=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function $(e){if(this.errorSamples=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function f(e){if(this.documents=[],this.tagIds=[],this.promotionIds=[],this.attributes={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ee(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function te(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ne(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function y(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function m(e){if(this.promotionIds=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function b(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function oe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function re(e,t,n){o.rpc.Service.call(this,e,t,n)}function h(e){if(this.params={},this.userLabels={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ie(e){if(this.results=[],this.missingIds=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ae(e){if(this.metadata={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function le(e,t,n){o.rpc.Service.call(this,e,t,n)}function se(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function O(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function v(e){if(this.pattern=[],this.style=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ue(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ce(e){if(this.rules=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function w(e){if(this.additionalBindings=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function pe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ge(e){if(this.destinations=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function S(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function j(e){if(this.methodSettings=[],this.codeownerGithubTeams=[],this.librarySettings=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function de(e){if(this.serviceClassNames={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function fe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ye(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function me(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function be(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function he(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Oe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ve(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function we(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Se(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function je(e){if(this.extensions=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Pe(e){if(this.file=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function P(e){if(this.dependency=[],this.publicDependency=[],this.weakDependency=[],this.messageType=[],this.enumType=[],this.service=[],this.extension=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function T(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),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Te(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ke(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ie(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function k(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function De(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function I(e){if(this.value=[],this.reservedRange=[],this.reservedName=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function xe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ee(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ce(e){if(this.method=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function D(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function x(e){if(this.uninterpretedOption=[],this[".google.api.resourceDefinition"]=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function E(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function C(e){if(this.uninterpretedOption=[],this[".google.api.fieldBehavior"]=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Re(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ne(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ae(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ue(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function R(e){if(this.uninterpretedOption=[],this[".google.api.methodSignature"]=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function N(e){if(this.name=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Le(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ve(e){if(this.location=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Fe(e){if(this.path=[],this.span=[],this.leadingDetachedComments=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ge(e){if(this.annotation=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function A(e){if(this.path=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Je(e){if(this.fields={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function U(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Be(e){if(this.values=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Me(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function _e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function qe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ze(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function He(e){if(this.details=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ye(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function We(e,t,n){o.rpc.Service.call(this,e,t,n)}function Qe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ke(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Xe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ze(e){if(this.operations=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function $e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function et(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function tt(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function nt(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return p.google=((L={}).cloud=((r={}).discoveryengine=((e={}).v1beta=((i={}).CustomAttribute=(V.prototype.text=c.emptyArray,V.prototype.numbers=c.emptyArray,V.create=function(e){return new V(e)},V.encode=function(e,t){if(t=t||a.create(),null!=e.text&&e.text.length)for(var n=0;n<e.text.length;++n)t.uint32(10).string(e.text[n]);if(null!=e.numbers&&e.numbers.length){t.uint32(18).fork();for(n=0;n<e.numbers.length;++n)t.double(e.numbers[n]);t.ldelim()}return t},V.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},V.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.CustomAttribute;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.text&&o.text.length||(o.text=[]),o.text.push(e.string());break;case 2:if(o.numbers&&o.numbers.length||(o.numbers=[]),2==(7&r))for(var i=e.uint32()+e.pos;e.pos<i;)o.numbers.push(e.double());else o.numbers.push(e.double());break;default:e.skipType(7&r)}}return o},V.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},V.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.text&&e.hasOwnProperty("text")){if(!Array.isArray(e.text))return"text: array expected";for(var t=0;t<e.text.length;++t)if(!c.isString(e.text[t]))return"text: string[] expected"}if(null!=e.numbers&&e.hasOwnProperty("numbers")){if(!Array.isArray(e.numbers))return"numbers: array expected";for(t=0;t<e.numbers.length;++t)if("number"!=typeof e.numbers[t])return"numbers: number[] expected"}return null},V.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.CustomAttribute)return e;var t=new p.google.cloud.discoveryengine.v1beta.CustomAttribute;if(e.text){if(!Array.isArray(e.text))throw TypeError(".google.cloud.discoveryengine.v1beta.CustomAttribute.text: array expected");t.text=[];for(var n=0;n<e.text.length;++n)t.text[n]=String(e.text[n])}if(e.numbers){if(!Array.isArray(e.numbers))throw TypeError(".google.cloud.discoveryengine.v1beta.CustomAttribute.numbers: array expected");t.numbers=[];for(n=0;n<e.numbers.length;++n)t.numbers[n]=Number(e.numbers[n])}return t},V.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.text=[],n.numbers=[]),e.text&&e.text.length){n.text=[];for(var o=0;o<e.text.length;++o)n.text[o]=e.text[o]}if(e.numbers&&e.numbers.length){n.numbers=[];for(o=0;o<e.numbers.length;++o)n.numbers[o]=t.json&&!isFinite(e.numbers[o])?String(e.numbers[o]):e.numbers[o]}return n},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.cloud.discoveryengine.v1beta.CustomAttribute"},V),i.UserInfo=(F.prototype.userId="",F.prototype.userAgent="",F.create=function(e){return new F(e)},F.encode=function(e,t){return t=t||a.create(),null!=e.userId&&Object.hasOwnProperty.call(e,"userId")&&t.uint32(10).string(e.userId),null!=e.userAgent&&Object.hasOwnProperty.call(e,"userAgent")&&t.uint32(18).string(e.userAgent),t},F.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},F.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.UserInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.userId=e.string();break;case 2:o.userAgent=e.string();break;default:e.skipType(7&r)}}return o},F.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},F.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.userId&&e.hasOwnProperty("userId")&&!c.isString(e.userId)?"userId: string expected":null!=e.userAgent&&e.hasOwnProperty("userAgent")&&!c.isString(e.userAgent)?"userAgent: string expected":null},F.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.UserInfo?e:(t=new p.google.cloud.discoveryengine.v1beta.UserInfo,null!=e.userId&&(t.userId=String(e.userId)),null!=e.userAgent&&(t.userAgent=String(e.userAgent)),t)},F.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.userId="",n.userAgent=""),null!=e.userId&&e.hasOwnProperty("userId")&&(n.userId=e.userId),null!=e.userAgent&&e.hasOwnProperty("userAgent")&&(n.userAgent=e.userAgent),n},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.cloud.discoveryengine.v1beta.UserInfo"},F),i.Document=(l.prototype.structData=null,l.prototype.jsonData=null,l.prototype.name="",l.prototype.id="",l.prototype.schemaId="",l.prototype.parentDocumentId="",Object.defineProperty(l.prototype,"data",{get:c.oneOfGetter(t=["structData","jsonData"]),set:c.oneOfSetter(t)}),l.create=function(e){return new l(e)},l.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(18).string(e.id),null!=e.schemaId&&Object.hasOwnProperty.call(e,"schemaId")&&t.uint32(26).string(e.schemaId),null!=e.structData&&Object.hasOwnProperty.call(e,"structData")&&p.google.protobuf.Struct.encode(e.structData,t.uint32(34).fork()).ldelim(),null!=e.jsonData&&Object.hasOwnProperty.call(e,"jsonData")&&t.uint32(42).string(e.jsonData),null!=e.parentDocumentId&&Object.hasOwnProperty.call(e,"parentDocumentId")&&t.uint32(58).string(e.parentDocumentId),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.Document;e.pos<n;){var r=e.uint32();switch(r>>>3){case 4:o.structData=p.google.protobuf.Struct.decode(e,e.uint32());break;case 5:o.jsonData=e.string();break;case 1:o.name=e.string();break;case 2:o.id=e.string();break;case 3:o.schemaId=e.string();break;case 7:o.parentDocumentId=e.string();break;default:e.skipType(7&r)}}return o},l.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},l.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.structData&&e.hasOwnProperty("structData")){t.data=1;var n=p.google.protobuf.Struct.verify(e.structData);if(n)return"structData."+n}if(null!=e.jsonData&&e.hasOwnProperty("jsonData")){if(1===t.data)return"data: multiple values";if(t.data=1,!c.isString(e.jsonData))return"jsonData: string expected"}return null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name)?"name: string expected":null!=e.id&&e.hasOwnProperty("id")&&!c.isString(e.id)?"id: string expected":null!=e.schemaId&&e.hasOwnProperty("schemaId")&&!c.isString(e.schemaId)?"schemaId: string expected":null!=e.parentDocumentId&&e.hasOwnProperty("parentDocumentId")&&!c.isString(e.parentDocumentId)?"parentDocumentId: string expected":null},l.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.Document)return e;var t=new p.google.cloud.discoveryengine.v1beta.Document;if(null!=e.structData){if("object"!=typeof e.structData)throw TypeError(".google.cloud.discoveryengine.v1beta.Document.structData: object expected");t.structData=p.google.protobuf.Struct.fromObject(e.structData)}return null!=e.jsonData&&(t.jsonData=String(e.jsonData)),null!=e.name&&(t.name=String(e.name)),null!=e.id&&(t.id=String(e.id)),null!=e.schemaId&&(t.schemaId=String(e.schemaId)),null!=e.parentDocumentId&&(t.parentDocumentId=String(e.parentDocumentId)),t},l.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name="",n.id="",n.schemaId="",n.parentDocumentId=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.schemaId&&e.hasOwnProperty("schemaId")&&(n.schemaId=e.schemaId),null!=e.structData&&e.hasOwnProperty("structData")&&(n.structData=p.google.protobuf.Struct.toObject(e.structData,t),t.oneofs)&&(n.data="structData"),null!=e.jsonData&&e.hasOwnProperty("jsonData")&&(n.jsonData=e.jsonData,t.oneofs)&&(n.data="jsonData"),null!=e.parentDocumentId&&e.hasOwnProperty("parentDocumentId")&&(n.parentDocumentId=e.parentDocumentId),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.cloud.discoveryengine.v1beta.Document"},l),i.DocumentService=(((G.prototype=Object.create(o.rpc.Service.prototype)).constructor=G).create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(G.prototype.getDocument=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.GetDocumentRequest,p.google.cloud.discoveryengine.v1beta.Document,t,n)},"name",{value:"GetDocument"}),Object.defineProperty(G.prototype.listDocuments=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.ListDocumentsRequest,p.google.cloud.discoveryengine.v1beta.ListDocumentsResponse,t,n)},"name",{value:"ListDocuments"}),Object.defineProperty(G.prototype.createDocument=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.CreateDocumentRequest,p.google.cloud.discoveryengine.v1beta.Document,t,n)},"name",{value:"CreateDocument"}),Object.defineProperty(G.prototype.updateDocument=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest,p.google.cloud.discoveryengine.v1beta.Document,t,n)},"name",{value:"UpdateDocument"}),Object.defineProperty(G.prototype.deleteDocument=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest,p.google.protobuf.Empty,t,n)},"name",{value:"DeleteDocument"}),Object.defineProperty(G.prototype.importDocuments=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest,p.google.longrunning.Operation,t,n)},"name",{value:"ImportDocuments"}),G),i.GetDocumentRequest=(J.prototype.name="",J.create=function(e){return new J(e)},J.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},J.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},J.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.GetDocumentRequest;e.pos<n;){var r=e.uint32();r>>>3==1?o.name=e.string():e.skipType(7&r)}return o},J.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},J.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name)?"name: string expected":null},J.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.GetDocumentRequest?e:(t=new p.google.cloud.discoveryengine.v1beta.GetDocumentRequest,null!=e.name&&(t.name=String(e.name)),t)},J.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},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.cloud.discoveryengine.v1beta.GetDocumentRequest"},J),i.ListDocumentsRequest=(B.prototype.parent="",B.prototype.pageSize=0,B.prototype.pageToken="",B.create=function(e){return new B(e)},B.encode=function(e,t){return t=t||a.create(),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},B.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},B.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ListDocumentsRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.parent=e.string();break;case 2:o.pageSize=e.int32();break;case 3:o.pageToken=e.string();break;default:e.skipType(7&r)}}return o},B.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},B.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.parent&&e.hasOwnProperty("parent")&&!c.isString(e.parent)?"parent: string expected":null!=e.pageSize&&e.hasOwnProperty("pageSize")&&!c.isInteger(e.pageSize)?"pageSize: integer expected":null!=e.pageToken&&e.hasOwnProperty("pageToken")&&!c.isString(e.pageToken)?"pageToken: string expected":null},B.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.ListDocumentsRequest?e:(t=new p.google.cloud.discoveryengine.v1beta.ListDocumentsRequest,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)},B.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.parent="",n.pageSize=0,n.pageToken=""),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=e.parent),null!=e.pageSize&&e.hasOwnProperty("pageSize")&&(n.pageSize=e.pageSize),null!=e.pageToken&&e.hasOwnProperty("pageToken")&&(n.pageToken=e.pageToken),n},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.cloud.discoveryengine.v1beta.ListDocumentsRequest"},B),i.ListDocumentsResponse=(M.prototype.documents=c.emptyArray,M.prototype.nextPageToken="",M.create=function(e){return new M(e)},M.encode=function(e,t){if(t=t||a.create(),null!=e.documents&&e.documents.length)for(var n=0;n<e.documents.length;++n)p.google.cloud.discoveryengine.v1beta.Document.encode(e.documents[n],t.uint32(10).fork()).ldelim();return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(18).string(e.nextPageToken),t},M.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},M.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ListDocumentsResponse;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.documents&&o.documents.length||(o.documents=[]),o.documents.push(p.google.cloud.discoveryengine.v1beta.Document.decode(e,e.uint32()));break;case 2:o.nextPageToken=e.string();break;default:e.skipType(7&r)}}return o},M.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},M.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.documents&&e.hasOwnProperty("documents")){if(!Array.isArray(e.documents))return"documents: array expected";for(var t=0;t<e.documents.length;++t){var n=p.google.cloud.discoveryengine.v1beta.Document.verify(e.documents[t]);if(n)return"documents."+n}}return null!=e.nextPageToken&&e.hasOwnProperty("nextPageToken")&&!c.isString(e.nextPageToken)?"nextPageToken: string expected":null},M.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ListDocumentsResponse)return e;var t=new p.google.cloud.discoveryengine.v1beta.ListDocumentsResponse;if(e.documents){if(!Array.isArray(e.documents))throw TypeError(".google.cloud.discoveryengine.v1beta.ListDocumentsResponse.documents: array expected");t.documents=[];for(var n=0;n<e.documents.length;++n){if("object"!=typeof e.documents[n])throw TypeError(".google.cloud.discoveryengine.v1beta.ListDocumentsResponse.documents: object expected");t.documents[n]=p.google.cloud.discoveryengine.v1beta.Document.fromObject(e.documents[n])}}return null!=e.nextPageToken&&(t.nextPageToken=String(e.nextPageToken)),t},M.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.documents=[]),t.defaults&&(n.nextPageToken=""),e.documents&&e.documents.length){n.documents=[];for(var o=0;o<e.documents.length;++o)n.documents[o]=p.google.cloud.discoveryengine.v1beta.Document.toObject(e.documents[o],t)}return null!=e.nextPageToken&&e.hasOwnProperty("nextPageToken")&&(n.nextPageToken=e.nextPageToken),n},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.cloud.discoveryengine.v1beta.ListDocumentsResponse"},M),i.CreateDocumentRequest=(_.prototype.parent="",_.prototype.document=null,_.prototype.documentId="",_.create=function(e){return new _(e)},_.encode=function(e,t){return t=t||a.create(),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&p.google.cloud.discoveryengine.v1beta.Document.encode(e.document,t.uint32(18).fork()).ldelim(),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(26).string(e.documentId),t},_.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},_.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.CreateDocumentRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.parent=e.string();break;case 2:o.document=p.google.cloud.discoveryengine.v1beta.Document.decode(e,e.uint32());break;case 3:o.documentId=e.string();break;default:e.skipType(7&r)}}return o},_.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},_.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.parent&&e.hasOwnProperty("parent")&&!c.isString(e.parent))return"parent: string expected";if(null!=e.document&&e.hasOwnProperty("document")){var t=p.google.cloud.discoveryengine.v1beta.Document.verify(e.document);if(t)return"document."+t}return null!=e.documentId&&e.hasOwnProperty("documentId")&&!c.isString(e.documentId)?"documentId: string expected":null},_.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.CreateDocumentRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.CreateDocumentRequest;if(null!=e.parent&&(t.parent=String(e.parent)),null!=e.document){if("object"!=typeof e.document)throw TypeError(".google.cloud.discoveryengine.v1beta.CreateDocumentRequest.document: object expected");t.document=p.google.cloud.discoveryengine.v1beta.Document.fromObject(e.document)}return null!=e.documentId&&(t.documentId=String(e.documentId)),t},_.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.parent="",n.document=null,n.documentId=""),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=e.parent),null!=e.document&&e.hasOwnProperty("document")&&(n.document=p.google.cloud.discoveryengine.v1beta.Document.toObject(e.document,t)),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},_.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},_.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.cloud.discoveryengine.v1beta.CreateDocumentRequest"},_),i.UpdateDocumentRequest=(q.prototype.document=null,q.prototype.allowMissing=!1,q.create=function(e){return new q(e)},q.encode=function(e,t){return t=t||a.create(),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&p.google.cloud.discoveryengine.v1beta.Document.encode(e.document,t.uint32(10).fork()).ldelim(),null!=e.allowMissing&&Object.hasOwnProperty.call(e,"allowMissing")&&t.uint32(16).bool(e.allowMissing),t},q.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},q.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.document=p.google.cloud.discoveryengine.v1beta.Document.decode(e,e.uint32());break;case 2:o.allowMissing=e.bool();break;default:e.skipType(7&r)}}return o},q.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},q.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.document&&e.hasOwnProperty("document")){var t=p.google.cloud.discoveryengine.v1beta.Document.verify(e.document);if(t)return"document."+t}return null!=e.allowMissing&&e.hasOwnProperty("allowMissing")&&"boolean"!=typeof e.allowMissing?"allowMissing: boolean expected":null},q.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest;if(null!=e.document){if("object"!=typeof e.document)throw TypeError(".google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.document: object expected");t.document=p.google.cloud.discoveryengine.v1beta.Document.fromObject(e.document)}return null!=e.allowMissing&&(t.allowMissing=Boolean(e.allowMissing)),t},q.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.document=null,n.allowMissing=!1),null!=e.document&&e.hasOwnProperty("document")&&(n.document=p.google.cloud.discoveryengine.v1beta.Document.toObject(e.document,t)),null!=e.allowMissing&&e.hasOwnProperty("allowMissing")&&(n.allowMissing=e.allowMissing),n},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.cloud.discoveryengine.v1beta.UpdateDocumentRequest"},q),i.DeleteDocumentRequest=(z.prototype.name="",z.create=function(e){return new z(e)},z.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},z.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},z.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest;e.pos<n;){var r=e.uint32();r>>>3==1?o.name=e.string():e.skipType(7&r)}return o},z.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},z.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name)?"name: string expected":null},z.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest?e:(t=new p.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest,null!=e.name&&(t.name=String(e.name)),t)},z.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},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.cloud.discoveryengine.v1beta.DeleteDocumentRequest"},z),i.GcsSource=(H.prototype.inputUris=c.emptyArray,H.prototype.dataSchema="",H.create=function(e){return new H(e)},H.encode=function(e,t){if(t=t||a.create(),null!=e.inputUris&&e.inputUris.length)for(var n=0;n<e.inputUris.length;++n)t.uint32(10).string(e.inputUris[n]);return null!=e.dataSchema&&Object.hasOwnProperty.call(e,"dataSchema")&&t.uint32(18).string(e.dataSchema),t},H.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},H.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.GcsSource;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.inputUris&&o.inputUris.length||(o.inputUris=[]),o.inputUris.push(e.string());break;case 2:o.dataSchema=e.string();break;default:e.skipType(7&r)}}return o},H.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},H.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.inputUris&&e.hasOwnProperty("inputUris")){if(!Array.isArray(e.inputUris))return"inputUris: array expected";for(var t=0;t<e.inputUris.length;++t)if(!c.isString(e.inputUris[t]))return"inputUris: string[] expected"}return null!=e.dataSchema&&e.hasOwnProperty("dataSchema")&&!c.isString(e.dataSchema)?"dataSchema: string expected":null},H.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.GcsSource)return e;var t=new p.google.cloud.discoveryengine.v1beta.GcsSource;if(e.inputUris){if(!Array.isArray(e.inputUris))throw TypeError(".google.cloud.discoveryengine.v1beta.GcsSource.inputUris: array expected");t.inputUris=[];for(var n=0;n<e.inputUris.length;++n)t.inputUris[n]=String(e.inputUris[n])}return null!=e.dataSchema&&(t.dataSchema=String(e.dataSchema)),t},H.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.inputUris=[]),t.defaults&&(n.dataSchema=""),e.inputUris&&e.inputUris.length){n.inputUris=[];for(var o=0;o<e.inputUris.length;++o)n.inputUris[o]=e.inputUris[o]}return null!=e.dataSchema&&e.hasOwnProperty("dataSchema")&&(n.dataSchema=e.dataSchema),n},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.cloud.discoveryengine.v1beta.GcsSource"},H),i.BigQuerySource=(s.prototype.partitionDate=null,s.prototype.projectId="",s.prototype.datasetId="",s.prototype.tableId="",s.prototype.gcsStagingDir="",s.prototype.dataSchema="",Object.defineProperty(s.prototype,"partition",{get:c.oneOfGetter(t=["partitionDate"]),set:c.oneOfSetter(t)}),s.create=function(e){return new s(e)},s.encode=function(e,t){return t=t||a.create(),null!=e.projectId&&Object.hasOwnProperty.call(e,"projectId")&&t.uint32(10).string(e.projectId),null!=e.datasetId&&Object.hasOwnProperty.call(e,"datasetId")&&t.uint32(18).string(e.datasetId),null!=e.tableId&&Object.hasOwnProperty.call(e,"tableId")&&t.uint32(26).string(e.tableId),null!=e.gcsStagingDir&&Object.hasOwnProperty.call(e,"gcsStagingDir")&&t.uint32(34).string(e.gcsStagingDir),null!=e.partitionDate&&Object.hasOwnProperty.call(e,"partitionDate")&&p.google.type.Date.encode(e.partitionDate,t.uint32(42).fork()).ldelim(),null!=e.dataSchema&&Object.hasOwnProperty.call(e,"dataSchema")&&t.uint32(50).string(e.dataSchema),t},s.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},s.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.BigQuerySource;e.pos<n;){var r=e.uint32();switch(r>>>3){case 5:o.partitionDate=p.google.type.Date.decode(e,e.uint32());break;case 1:o.projectId=e.string();break;case 2:o.datasetId=e.string();break;case 3:o.tableId=e.string();break;case 4:o.gcsStagingDir=e.string();break;case 6:o.dataSchema=e.string();break;default:e.skipType(7&r)}}return o},s.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},s.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.partitionDate&&e.hasOwnProperty("partitionDate")){var t=p.google.type.Date.verify(e.partitionDate);if(t)return"partitionDate."+t}return null!=e.projectId&&e.hasOwnProperty("projectId")&&!c.isString(e.projectId)?"projectId: string expected":null!=e.datasetId&&e.hasOwnProperty("datasetId")&&!c.isString(e.datasetId)?"datasetId: string expected":null!=e.tableId&&e.hasOwnProperty("tableId")&&!c.isString(e.tableId)?"tableId: string expected":null!=e.gcsStagingDir&&e.hasOwnProperty("gcsStagingDir")&&!c.isString(e.gcsStagingDir)?"gcsStagingDir: string expected":null!=e.dataSchema&&e.hasOwnProperty("dataSchema")&&!c.isString(e.dataSchema)?"dataSchema: string expected":null},s.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.BigQuerySource)return e;var t=new p.google.cloud.discoveryengine.v1beta.BigQuerySource;if(null!=e.partitionDate){if("object"!=typeof e.partitionDate)throw TypeError(".google.cloud.discoveryengine.v1beta.BigQuerySource.partitionDate: object expected");t.partitionDate=p.google.type.Date.fromObject(e.partitionDate)}return null!=e.projectId&&(t.projectId=String(e.projectId)),null!=e.datasetId&&(t.datasetId=String(e.datasetId)),null!=e.tableId&&(t.tableId=String(e.tableId)),null!=e.gcsStagingDir&&(t.gcsStagingDir=String(e.gcsStagingDir)),null!=e.dataSchema&&(t.dataSchema=String(e.dataSchema)),t},s.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.projectId="",n.datasetId="",n.tableId="",n.gcsStagingDir="",n.dataSchema=""),null!=e.projectId&&e.hasOwnProperty("projectId")&&(n.projectId=e.projectId),null!=e.datasetId&&e.hasOwnProperty("datasetId")&&(n.datasetId=e.datasetId),null!=e.tableId&&e.hasOwnProperty("tableId")&&(n.tableId=e.tableId),null!=e.gcsStagingDir&&e.hasOwnProperty("gcsStagingDir")&&(n.gcsStagingDir=e.gcsStagingDir),null!=e.partitionDate&&e.hasOwnProperty("partitionDate")&&(n.partitionDate=p.google.type.Date.toObject(e.partitionDate,t),t.oneofs)&&(n.partition="partitionDate"),null!=e.dataSchema&&e.hasOwnProperty("dataSchema")&&(n.dataSchema=e.dataSchema),n},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.cloud.discoveryengine.v1beta.BigQuerySource"},s),i.ImportErrorConfig=(Y.prototype.gcsPrefix=null,Object.defineProperty(Y.prototype,"destination",{get:c.oneOfGetter(t=["gcsPrefix"]),set:c.oneOfSetter(t)}),Y.create=function(e){return new Y(e)},Y.encode=function(e,t){return t=t||a.create(),null!=e.gcsPrefix&&Object.hasOwnProperty.call(e,"gcsPrefix")&&t.uint32(10).string(e.gcsPrefix),t},Y.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Y.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportErrorConfig;e.pos<n;){var r=e.uint32();r>>>3==1?o.gcsPrefix=e.string():e.skipType(7&r)}return o},Y.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Y.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.gcsPrefix&&e.hasOwnProperty("gcsPrefix")&&!c.isString(e.gcsPrefix)?"gcsPrefix: string expected":null},Y.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.ImportErrorConfig?e:(t=new p.google.cloud.discoveryengine.v1beta.ImportErrorConfig,null!=e.gcsPrefix&&(t.gcsPrefix=String(e.gcsPrefix)),t)},Y.toObject=function(e,t){t=t||{};var n={};return null!=e.gcsPrefix&&e.hasOwnProperty("gcsPrefix")&&(n.gcsPrefix=e.gcsPrefix,t.oneofs)&&(n.destination="gcsPrefix"),n},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.cloud.discoveryengine.v1beta.ImportErrorConfig"},Y),i.ImportUserEventsRequest=(g.prototype.inlineSource=null,g.prototype.gcsSource=null,g.prototype.bigquerySource=null,g.prototype.parent="",g.prototype.errorConfig=null,Object.defineProperty(g.prototype,"source",{get:c.oneOfGetter(t=["inlineSource","gcsSource","bigquerySource"]),set:c.oneOfSetter(t)}),g.create=function(e){return new g(e)},g.encode=function(e,t){return t=t||a.create(),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.inlineSource&&Object.hasOwnProperty.call(e,"inlineSource")&&p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.encode(e.inlineSource,t.uint32(18).fork()).ldelim(),null!=e.gcsSource&&Object.hasOwnProperty.call(e,"gcsSource")&&p.google.cloud.discoveryengine.v1beta.GcsSource.encode(e.gcsSource,t.uint32(26).fork()).ldelim(),null!=e.bigquerySource&&Object.hasOwnProperty.call(e,"bigquerySource")&&p.google.cloud.discoveryengine.v1beta.BigQuerySource.encode(e.bigquerySource,t.uint32(34).fork()).ldelim(),null!=e.errorConfig&&Object.hasOwnProperty.call(e,"errorConfig")&&p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(e.errorConfig,t.uint32(42).fork()).ldelim(),t},g.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},g.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 2:o.inlineSource=p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.decode(e,e.uint32());break;case 3:o.gcsSource=p.google.cloud.discoveryengine.v1beta.GcsSource.decode(e,e.uint32());break;case 4:o.bigquerySource=p.google.cloud.discoveryengine.v1beta.BigQuerySource.decode(e,e.uint32());break;case 1:o.parent=e.string();break;case 5:o.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},g.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},g.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t,n={};if(null!=e.inlineSource&&e.hasOwnProperty("inlineSource")&&(n.source=1,t=p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify(e.inlineSource)))return"inlineSource."+t;if(null!=e.gcsSource&&e.hasOwnProperty("gcsSource")){if(1===n.source)return"source: multiple values";if(n.source=1,t=p.google.cloud.discoveryengine.v1beta.GcsSource.verify(e.gcsSource))return"gcsSource."+t}if(null!=e.bigquerySource&&e.hasOwnProperty("bigquerySource")){if(1===n.source)return"source: multiple values";if(n.source=1,t=p.google.cloud.discoveryengine.v1beta.BigQuerySource.verify(e.bigquerySource))return"bigquerySource."+t}if(null!=e.parent&&e.hasOwnProperty("parent")&&!c.isString(e.parent))return"parent: string expected";if(null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(t=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(e.errorConfig)))return"errorConfig."+t;return null},g.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest;if(null!=e.inlineSource){if("object"!=typeof e.inlineSource)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.inlineSource: object expected");t.inlineSource=p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.fromObject(e.inlineSource)}if(null!=e.gcsSource){if("object"!=typeof e.gcsSource)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.gcsSource: object expected");t.gcsSource=p.google.cloud.discoveryengine.v1beta.GcsSource.fromObject(e.gcsSource)}if(null!=e.bigquerySource){if("object"!=typeof e.bigquerySource)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.bigquerySource: object expected");t.bigquerySource=p.google.cloud.discoveryengine.v1beta.BigQuerySource.fromObject(e.bigquerySource)}if(null!=e.parent&&(t.parent=String(e.parent)),null!=e.errorConfig){if("object"!=typeof e.errorConfig)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.errorConfig: object expected");t.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(e.errorConfig)}return t},g.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.parent="",n.errorConfig=null),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=e.parent),null!=e.inlineSource&&e.hasOwnProperty("inlineSource")&&(n.inlineSource=p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.toObject(e.inlineSource,t),t.oneofs)&&(n.source="inlineSource"),null!=e.gcsSource&&e.hasOwnProperty("gcsSource")&&(n.gcsSource=p.google.cloud.discoveryengine.v1beta.GcsSource.toObject(e.gcsSource,t),t.oneofs)&&(n.source="gcsSource"),null!=e.bigquerySource&&e.hasOwnProperty("bigquerySource")&&(n.bigquerySource=p.google.cloud.discoveryengine.v1beta.BigQuerySource.toObject(e.bigquerySource,t),t.oneofs)&&(n.source="bigquerySource"),null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(n.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(e.errorConfig,t)),n},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.cloud.discoveryengine.v1beta.ImportUserEventsRequest"},g.InlineSource=(W.prototype.userEvents=c.emptyArray,W.create=function(e){return new W(e)},W.encode=function(e,t){if(t=t||a.create(),null!=e.userEvents&&e.userEvents.length)for(var n=0;n<e.userEvents.length;++n)p.google.cloud.discoveryengine.v1beta.UserEvent.encode(e.userEvents[n],t.uint32(10).fork()).ldelim();return t},W.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},W.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource;e.pos<n;){var r=e.uint32();r>>>3==1?(o.userEvents&&o.userEvents.length||(o.userEvents=[]),o.userEvents.push(p.google.cloud.discoveryengine.v1beta.UserEvent.decode(e,e.uint32()))):e.skipType(7&r)}return o},W.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},W.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.userEvents&&e.hasOwnProperty("userEvents")){if(!Array.isArray(e.userEvents))return"userEvents: array expected";for(var t=0;t<e.userEvents.length;++t){var n=p.google.cloud.discoveryengine.v1beta.UserEvent.verify(e.userEvents[t]);if(n)return"userEvents."+n}}return null},W.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource;if(e.userEvents){if(!Array.isArray(e.userEvents))throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.userEvents: array expected");t.userEvents=[];for(var n=0;n<e.userEvents.length;++n){if("object"!=typeof e.userEvents[n])throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.userEvents: object expected");t.userEvents[n]=p.google.cloud.discoveryengine.v1beta.UserEvent.fromObject(e.userEvents[n])}}return t},W.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.userEvents=[]),e.userEvents&&e.userEvents.length){n.userEvents=[];for(var o=0;o<e.userEvents.length;++o)n.userEvents[o]=p.google.cloud.discoveryengine.v1beta.UserEvent.toObject(e.userEvents[o],t)}return n},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.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource"},W),g),i.ImportUserEventsResponse=(Q.prototype.errorSamples=c.emptyArray,Q.prototype.errorConfig=null,Q.prototype.joinedEventsCount=c.Long?c.Long.fromBits(0,0,!1):0,Q.prototype.unjoinedEventsCount=c.Long?c.Long.fromBits(0,0,!1):0,Q.create=function(e){return new Q(e)},Q.encode=function(e,t){if(t=t||a.create(),null!=e.errorSamples&&e.errorSamples.length)for(var n=0;n<e.errorSamples.length;++n)p.google.rpc.Status.encode(e.errorSamples[n],t.uint32(10).fork()).ldelim();return null!=e.errorConfig&&Object.hasOwnProperty.call(e,"errorConfig")&&p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(e.errorConfig,t.uint32(18).fork()).ldelim(),null!=e.joinedEventsCount&&Object.hasOwnProperty.call(e,"joinedEventsCount")&&t.uint32(24).int64(e.joinedEventsCount),null!=e.unjoinedEventsCount&&Object.hasOwnProperty.call(e,"unjoinedEventsCount")&&t.uint32(32).int64(e.unjoinedEventsCount),t},Q.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Q.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.errorSamples&&o.errorSamples.length||(o.errorSamples=[]),o.errorSamples.push(p.google.rpc.Status.decode(e,e.uint32()));break;case 2:o.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(e,e.uint32());break;case 3:o.joinedEventsCount=e.int64();break;case 4:o.unjoinedEventsCount=e.int64();break;default:e.skipType(7&r)}}return o},Q.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Q.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.errorSamples&&e.hasOwnProperty("errorSamples")){if(!Array.isArray(e.errorSamples))return"errorSamples: array expected";for(var t=0;t<e.errorSamples.length;++t)if(n=p.google.rpc.Status.verify(e.errorSamples[t]))return"errorSamples."+n}var n;if(null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(n=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(e.errorConfig)))return"errorConfig."+n;return null!=e.joinedEventsCount&&e.hasOwnProperty("joinedEventsCount")&&!(c.isInteger(e.joinedEventsCount)||e.joinedEventsCount&&c.isInteger(e.joinedEventsCount.low)&&c.isInteger(e.joinedEventsCount.high))?"joinedEventsCount: integer|Long expected":null!=e.unjoinedEventsCount&&e.hasOwnProperty("unjoinedEventsCount")&&!(c.isInteger(e.unjoinedEventsCount)||e.unjoinedEventsCount&&c.isInteger(e.unjoinedEventsCount.low)&&c.isInteger(e.unjoinedEventsCount.high))?"unjoinedEventsCount: integer|Long expected":null},Q.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse;if(e.errorSamples){if(!Array.isArray(e.errorSamples))throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorSamples: array expected");t.errorSamples=[];for(var n=0;n<e.errorSamples.length;++n){if("object"!=typeof e.errorSamples[n])throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorSamples: object expected");t.errorSamples[n]=p.google.rpc.Status.fromObject(e.errorSamples[n])}}if(null!=e.errorConfig){if("object"!=typeof e.errorConfig)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorConfig: object expected");t.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(e.errorConfig)}return null!=e.joinedEventsCount&&(c.Long?(t.joinedEventsCount=c.Long.fromValue(e.joinedEventsCount)).unsigned=!1:"string"==typeof e.joinedEventsCount?t.joinedEventsCount=parseInt(e.joinedEventsCount,10):"number"==typeof e.joinedEventsCount?t.joinedEventsCount=e.joinedEventsCount:"object"==typeof e.joinedEventsCount&&(t.joinedEventsCount=new c.LongBits(e.joinedEventsCount.low>>>0,e.joinedEventsCount.high>>>0).toNumber())),null!=e.unjoinedEventsCount&&(c.Long?(t.unjoinedEventsCount=c.Long.fromValue(e.unjoinedEventsCount)).unsigned=!1:"string"==typeof e.unjoinedEventsCount?t.unjoinedEventsCount=parseInt(e.unjoinedEventsCount,10):"number"==typeof e.unjoinedEventsCount?t.unjoinedEventsCount=e.unjoinedEventsCount:"object"==typeof e.unjoinedEventsCount&&(t.unjoinedEventsCount=new c.LongBits(e.unjoinedEventsCount.low>>>0,e.unjoinedEventsCount.high>>>0).toNumber())),t},Q.toObject=function(e,t){var n,o={};if(((t=t||{}).arrays||t.defaults)&&(o.errorSamples=[]),t.defaults&&(o.errorConfig=null,c.Long?(n=new c.Long(0,0,!1),o.joinedEventsCount=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.joinedEventsCount=t.longs===String?"0":0,c.Long?(n=new c.Long(0,0,!1),o.unjoinedEventsCount=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.unjoinedEventsCount=t.longs===String?"0":0),e.errorSamples&&e.errorSamples.length){o.errorSamples=[];for(var r=0;r<e.errorSamples.length;++r)o.errorSamples[r]=p.google.rpc.Status.toObject(e.errorSamples[r],t)}return null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(o.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(e.errorConfig,t)),null!=e.joinedEventsCount&&e.hasOwnProperty("joinedEventsCount")&&("number"==typeof e.joinedEventsCount?o.joinedEventsCount=t.longs===String?String(e.joinedEventsCount):e.joinedEventsCount:o.joinedEventsCount=t.longs===String?c.Long.prototype.toString.call(e.joinedEventsCount):t.longs===Number?new c.LongBits(e.joinedEventsCount.low>>>0,e.joinedEventsCount.high>>>0).toNumber():e.joinedEventsCount),null!=e.unjoinedEventsCount&&e.hasOwnProperty("unjoinedEventsCount")&&("number"==typeof e.unjoinedEventsCount?o.unjoinedEventsCount=t.longs===String?String(e.unjoinedEventsCount):e.unjoinedEventsCount:o.unjoinedEventsCount=t.longs===String?c.Long.prototype.toString.call(e.unjoinedEventsCount):t.longs===Number?new c.LongBits(e.unjoinedEventsCount.low>>>0,e.unjoinedEventsCount.high>>>0).toNumber():e.unjoinedEventsCount),o},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.cloud.discoveryengine.v1beta.ImportUserEventsResponse"},Q),i.ImportUserEventsMetadata=(K.prototype.createTime=null,K.prototype.updateTime=null,K.prototype.successCount=c.Long?c.Long.fromBits(0,0,!1):0,K.prototype.failureCount=c.Long?c.Long.fromBits(0,0,!1):0,K.create=function(e){return new K(e)},K.encode=function(e,t){return t=t||a.create(),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&p.google.protobuf.Timestamp.encode(e.createTime,t.uint32(10).fork()).ldelim(),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&p.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(18).fork()).ldelim(),null!=e.successCount&&Object.hasOwnProperty.call(e,"successCount")&&t.uint32(24).int64(e.successCount),null!=e.failureCount&&Object.hasOwnProperty.call(e,"failureCount")&&t.uint32(32).int64(e.failureCount),t},K.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},K.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.createTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;case 2:o.updateTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;case 3:o.successCount=e.int64();break;case 4:o.failureCount=e.int64();break;default:e.skipType(7&r)}}return o},K.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},K.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t;if(null!=e.createTime&&e.hasOwnProperty("createTime")&&(t=p.google.protobuf.Timestamp.verify(e.createTime)))return"createTime."+t;if(null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(t=p.google.protobuf.Timestamp.verify(e.updateTime)))return"updateTime."+t;return null!=e.successCount&&e.hasOwnProperty("successCount")&&!(c.isInteger(e.successCount)||e.successCount&&c.isInteger(e.successCount.low)&&c.isInteger(e.successCount.high))?"successCount: integer|Long expected":null!=e.failureCount&&e.hasOwnProperty("failureCount")&&!(c.isInteger(e.failureCount)||e.failureCount&&c.isInteger(e.failureCount.low)&&c.isInteger(e.failureCount.high))?"failureCount: integer|Long expected":null},K.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata;if(null!=e.createTime){if("object"!=typeof e.createTime)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.createTime: object expected");t.createTime=p.google.protobuf.Timestamp.fromObject(e.createTime)}if(null!=e.updateTime){if("object"!=typeof e.updateTime)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.updateTime: object expected");t.updateTime=p.google.protobuf.Timestamp.fromObject(e.updateTime)}return null!=e.successCount&&(c.Long?(t.successCount=c.Long.fromValue(e.successCount)).unsigned=!1:"string"==typeof e.successCount?t.successCount=parseInt(e.successCount,10):"number"==typeof e.successCount?t.successCount=e.successCount:"object"==typeof e.successCount&&(t.successCount=new c.LongBits(e.successCount.low>>>0,e.successCount.high>>>0).toNumber())),null!=e.failureCount&&(c.Long?(t.failureCount=c.Long.fromValue(e.failureCount)).unsigned=!1:"string"==typeof e.failureCount?t.failureCount=parseInt(e.failureCount,10):"number"==typeof e.failureCount?t.failureCount=e.failureCount:"object"==typeof e.failureCount&&(t.failureCount=new c.LongBits(e.failureCount.low>>>0,e.failureCount.high>>>0).toNumber())),t},K.toObject=function(e,t){var n,o={};return(t=t||{}).defaults&&(o.createTime=null,o.updateTime=null,c.Long?(n=new c.Long(0,0,!1),o.successCount=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.successCount=t.longs===String?"0":0,c.Long?(n=new c.Long(0,0,!1),o.failureCount=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.failureCount=t.longs===String?"0":0),null!=e.createTime&&e.hasOwnProperty("createTime")&&(o.createTime=p.google.protobuf.Timestamp.toObject(e.createTime,t)),null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(o.updateTime=p.google.protobuf.Timestamp.toObject(e.updateTime,t)),null!=e.successCount&&e.hasOwnProperty("successCount")&&("number"==typeof e.successCount?o.successCount=t.longs===String?String(e.successCount):e.successCount:o.successCount=t.longs===String?c.Long.prototype.toString.call(e.successCount):t.longs===Number?new c.LongBits(e.successCount.low>>>0,e.successCount.high>>>0).toNumber():e.successCount),null!=e.failureCount&&e.hasOwnProperty("failureCount")&&("number"==typeof e.failureCount?o.failureCount=t.longs===String?String(e.failureCount):e.failureCount:o.failureCount=t.longs===String?c.Long.prototype.toString.call(e.failureCount):t.longs===Number?new c.LongBits(e.failureCount.low>>>0,e.failureCount.high>>>0).toNumber():e.failureCount),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.cloud.discoveryengine.v1beta.ImportUserEventsMetadata"},K),i.ImportDocumentsMetadata=(X.prototype.createTime=null,X.prototype.updateTime=null,X.prototype.successCount=c.Long?c.Long.fromBits(0,0,!1):0,X.prototype.failureCount=c.Long?c.Long.fromBits(0,0,!1):0,X.create=function(e){return new X(e)},X.encode=function(e,t){return t=t||a.create(),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&p.google.protobuf.Timestamp.encode(e.createTime,t.uint32(10).fork()).ldelim(),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&p.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(18).fork()).ldelim(),null!=e.successCount&&Object.hasOwnProperty.call(e,"successCount")&&t.uint32(24).int64(e.successCount),null!=e.failureCount&&Object.hasOwnProperty.call(e,"failureCount")&&t.uint32(32).int64(e.failureCount),t},X.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},X.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.createTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;case 2:o.updateTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;case 3:o.successCount=e.int64();break;case 4:o.failureCount=e.int64();break;default:e.skipType(7&r)}}return o},X.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},X.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t;if(null!=e.createTime&&e.hasOwnProperty("createTime")&&(t=p.google.protobuf.Timestamp.verify(e.createTime)))return"createTime."+t;if(null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(t=p.google.protobuf.Timestamp.verify(e.updateTime)))return"updateTime."+t;return null!=e.successCount&&e.hasOwnProperty("successCount")&&!(c.isInteger(e.successCount)||e.successCount&&c.isInteger(e.successCount.low)&&c.isInteger(e.successCount.high))?"successCount: integer|Long expected":null!=e.failureCount&&e.hasOwnProperty("failureCount")&&!(c.isInteger(e.failureCount)||e.failureCount&&c.isInteger(e.failureCount.low)&&c.isInteger(e.failureCount.high))?"failureCount: integer|Long expected":null},X.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata;if(null!=e.createTime){if("object"!=typeof e.createTime)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.createTime: object expected");t.createTime=p.google.protobuf.Timestamp.fromObject(e.createTime)}if(null!=e.updateTime){if("object"!=typeof e.updateTime)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.updateTime: object expected");t.updateTime=p.google.protobuf.Timestamp.fromObject(e.updateTime)}return null!=e.successCount&&(c.Long?(t.successCount=c.Long.fromValue(e.successCount)).unsigned=!1:"string"==typeof e.successCount?t.successCount=parseInt(e.successCount,10):"number"==typeof e.successCount?t.successCount=e.successCount:"object"==typeof e.successCount&&(t.successCount=new c.LongBits(e.successCount.low>>>0,e.successCount.high>>>0).toNumber())),null!=e.failureCount&&(c.Long?(t.failureCount=c.Long.fromValue(e.failureCount)).unsigned=!1:"string"==typeof e.failureCount?t.failureCount=parseInt(e.failureCount,10):"number"==typeof e.failureCount?t.failureCount=e.failureCount:"object"==typeof e.failureCount&&(t.failureCount=new c.LongBits(e.failureCount.low>>>0,e.failureCount.high>>>0).toNumber())),t},X.toObject=function(e,t){var n,o={};return(t=t||{}).defaults&&(o.createTime=null,o.updateTime=null,c.Long?(n=new c.Long(0,0,!1),o.successCount=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.successCount=t.longs===String?"0":0,c.Long?(n=new c.Long(0,0,!1),o.failureCount=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.failureCount=t.longs===String?"0":0),null!=e.createTime&&e.hasOwnProperty("createTime")&&(o.createTime=p.google.protobuf.Timestamp.toObject(e.createTime,t)),null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(o.updateTime=p.google.protobuf.Timestamp.toObject(e.updateTime,t)),null!=e.successCount&&e.hasOwnProperty("successCount")&&("number"==typeof e.successCount?o.successCount=t.longs===String?String(e.successCount):e.successCount:o.successCount=t.longs===String?c.Long.prototype.toString.call(e.successCount):t.longs===Number?new c.LongBits(e.successCount.low>>>0,e.successCount.high>>>0).toNumber():e.successCount),null!=e.failureCount&&e.hasOwnProperty("failureCount")&&("number"==typeof e.failureCount?o.failureCount=t.longs===String?String(e.failureCount):e.failureCount:o.failureCount=t.longs===String?c.Long.prototype.toString.call(e.failureCount):t.longs===Number?new c.LongBits(e.failureCount.low>>>0,e.failureCount.high>>>0).toNumber():e.failureCount),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.cloud.discoveryengine.v1beta.ImportDocumentsMetadata"},X),i.ImportDocumentsRequest=(d.prototype.inlineSource=null,d.prototype.gcsSource=null,d.prototype.bigquerySource=null,d.prototype.parent="",d.prototype.errorConfig=null,d.prototype.reconciliationMode=0,Object.defineProperty(d.prototype,"source",{get:c.oneOfGetter(t=["inlineSource","gcsSource","bigquerySource"]),set:c.oneOfSetter(t)}),d.create=function(e){return new d(e)},d.encode=function(e,t){return t=t||a.create(),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.inlineSource&&Object.hasOwnProperty.call(e,"inlineSource")&&p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.encode(e.inlineSource,t.uint32(18).fork()).ldelim(),null!=e.gcsSource&&Object.hasOwnProperty.call(e,"gcsSource")&&p.google.cloud.discoveryengine.v1beta.GcsSource.encode(e.gcsSource,t.uint32(26).fork()).ldelim(),null!=e.bigquerySource&&Object.hasOwnProperty.call(e,"bigquerySource")&&p.google.cloud.discoveryengine.v1beta.BigQuerySource.encode(e.bigquerySource,t.uint32(34).fork()).ldelim(),null!=e.errorConfig&&Object.hasOwnProperty.call(e,"errorConfig")&&p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(e.errorConfig,t.uint32(42).fork()).ldelim(),null!=e.reconciliationMode&&Object.hasOwnProperty.call(e,"reconciliationMode")&&t.uint32(48).int32(e.reconciliationMode),t},d.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},d.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 2:o.inlineSource=p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.decode(e,e.uint32());break;case 3:o.gcsSource=p.google.cloud.discoveryengine.v1beta.GcsSource.decode(e,e.uint32());break;case 4:o.bigquerySource=p.google.cloud.discoveryengine.v1beta.BigQuerySource.decode(e,e.uint32());break;case 1:o.parent=e.string();break;case 5:o.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(e,e.uint32());break;case 6:o.reconciliationMode=e.int32();break;default:e.skipType(7&r)}}return o},d.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},d.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t,n={};if(null!=e.inlineSource&&e.hasOwnProperty("inlineSource")&&(n.source=1,t=p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify(e.inlineSource)))return"inlineSource."+t;if(null!=e.gcsSource&&e.hasOwnProperty("gcsSource")){if(1===n.source)return"source: multiple values";if(n.source=1,t=p.google.cloud.discoveryengine.v1beta.GcsSource.verify(e.gcsSource))return"gcsSource."+t}if(null!=e.bigquerySource&&e.hasOwnProperty("bigquerySource")){if(1===n.source)return"source: multiple values";if(n.source=1,t=p.google.cloud.discoveryengine.v1beta.BigQuerySource.verify(e.bigquerySource))return"bigquerySource."+t}if(null!=e.parent&&e.hasOwnProperty("parent")&&!c.isString(e.parent))return"parent: string expected";if(null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(t=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(e.errorConfig)))return"errorConfig."+t;if(null!=e.reconciliationMode&&e.hasOwnProperty("reconciliationMode"))switch(e.reconciliationMode){default:return"reconciliationMode: enum value expected";case 0:case 1:case 2:}return null},d.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest;if(null!=e.inlineSource){if("object"!=typeof e.inlineSource)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.inlineSource: object expected");t.inlineSource=p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.fromObject(e.inlineSource)}if(null!=e.gcsSource){if("object"!=typeof e.gcsSource)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.gcsSource: object expected");t.gcsSource=p.google.cloud.discoveryengine.v1beta.GcsSource.fromObject(e.gcsSource)}if(null!=e.bigquerySource){if("object"!=typeof e.bigquerySource)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.bigquerySource: object expected");t.bigquerySource=p.google.cloud.discoveryengine.v1beta.BigQuerySource.fromObject(e.bigquerySource)}if(null!=e.parent&&(t.parent=String(e.parent)),null!=e.errorConfig){if("object"!=typeof e.errorConfig)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.errorConfig: object expected");t.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(e.errorConfig)}switch(e.reconciliationMode){default:"number"==typeof e.reconciliationMode&&(t.reconciliationMode=e.reconciliationMode);break;case"RECONCILIATION_MODE_UNSPECIFIED":case 0:t.reconciliationMode=0;break;case"INCREMENTAL":case 1:t.reconciliationMode=1;break;case"FULL":case 2:t.reconciliationMode=2}return t},d.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.parent="",n.errorConfig=null,n.reconciliationMode=t.enums===String?"RECONCILIATION_MODE_UNSPECIFIED":0),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=e.parent),null!=e.inlineSource&&e.hasOwnProperty("inlineSource")&&(n.inlineSource=p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.toObject(e.inlineSource,t),t.oneofs)&&(n.source="inlineSource"),null!=e.gcsSource&&e.hasOwnProperty("gcsSource")&&(n.gcsSource=p.google.cloud.discoveryengine.v1beta.GcsSource.toObject(e.gcsSource,t),t.oneofs)&&(n.source="gcsSource"),null!=e.bigquerySource&&e.hasOwnProperty("bigquerySource")&&(n.bigquerySource=p.google.cloud.discoveryengine.v1beta.BigQuerySource.toObject(e.bigquerySource,t),t.oneofs)&&(n.source="bigquerySource"),null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(n.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(e.errorConfig,t)),null!=e.reconciliationMode&&e.hasOwnProperty("reconciliationMode")&&(n.reconciliationMode=t.enums!==String||void 0===p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode[e.reconciliationMode]?e.reconciliationMode:p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode[e.reconciliationMode]),n},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.cloud.discoveryengine.v1beta.ImportDocumentsRequest"},d.InlineSource=(Z.prototype.documents=c.emptyArray,Z.create=function(e){return new Z(e)},Z.encode=function(e,t){if(t=t||a.create(),null!=e.documents&&e.documents.length)for(var n=0;n<e.documents.length;++n)p.google.cloud.discoveryengine.v1beta.Document.encode(e.documents[n],t.uint32(10).fork()).ldelim();return t},Z.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Z.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource;e.pos<n;){var r=e.uint32();r>>>3==1?(o.documents&&o.documents.length||(o.documents=[]),o.documents.push(p.google.cloud.discoveryengine.v1beta.Document.decode(e,e.uint32()))):e.skipType(7&r)}return o},Z.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Z.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.documents&&e.hasOwnProperty("documents")){if(!Array.isArray(e.documents))return"documents: array expected";for(var t=0;t<e.documents.length;++t){var n=p.google.cloud.discoveryengine.v1beta.Document.verify(e.documents[t]);if(n)return"documents."+n}}return null},Z.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource;if(e.documents){if(!Array.isArray(e.documents))throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.documents: array expected");t.documents=[];for(var n=0;n<e.documents.length;++n){if("object"!=typeof e.documents[n])throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.documents: object expected");t.documents[n]=p.google.cloud.discoveryengine.v1beta.Document.fromObject(e.documents[n])}}return t},Z.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.documents=[]),e.documents&&e.documents.length){n.documents=[];for(var o=0;o<e.documents.length;++o)n.documents[o]=p.google.cloud.discoveryengine.v1beta.Document.toObject(e.documents[o],t)}return n},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.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource"},Z),d.ReconciliationMode=(t={},(n=Object.create(t))[t[0]="RECONCILIATION_MODE_UNSPECIFIED"]=0,n[t[1]="INCREMENTAL"]=1,n[t[2]="FULL"]=2,n),d),i.ImportDocumentsResponse=($.prototype.errorSamples=c.emptyArray,$.prototype.errorConfig=null,$.create=function(e){return new $(e)},$.encode=function(e,t){if(t=t||a.create(),null!=e.errorSamples&&e.errorSamples.length)for(var n=0;n<e.errorSamples.length;++n)p.google.rpc.Status.encode(e.errorSamples[n],t.uint32(10).fork()).ldelim();return null!=e.errorConfig&&Object.hasOwnProperty.call(e,"errorConfig")&&p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(e.errorConfig,t.uint32(18).fork()).ldelim(),t},$.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},$.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.errorSamples&&o.errorSamples.length||(o.errorSamples=[]),o.errorSamples.push(p.google.rpc.Status.decode(e,e.uint32()));break;case 2:o.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},$.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},$.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.errorSamples&&e.hasOwnProperty("errorSamples")){if(!Array.isArray(e.errorSamples))return"errorSamples: array expected";for(var t=0;t<e.errorSamples.length;++t)if(n=p.google.rpc.Status.verify(e.errorSamples[t]))return"errorSamples."+n}var n;if(null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(n=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(e.errorConfig)))return"errorConfig."+n;return null},$.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse;if(e.errorSamples){if(!Array.isArray(e.errorSamples))throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorSamples: array expected");t.errorSamples=[];for(var n=0;n<e.errorSamples.length;++n){if("object"!=typeof e.errorSamples[n])throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorSamples: object expected");t.errorSamples[n]=p.google.rpc.Status.fromObject(e.errorSamples[n])}}if(null!=e.errorConfig){if("object"!=typeof e.errorConfig)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorConfig: object expected");t.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(e.errorConfig)}return t},$.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.errorSamples=[]),t.defaults&&(n.errorConfig=null),e.errorSamples&&e.errorSamples.length){n.errorSamples=[];for(var o=0;o<e.errorSamples.length;++o)n.errorSamples[o]=p.google.rpc.Status.toObject(e.errorSamples[o],t)}return null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(n.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(e.errorConfig,t)),n},$.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},$.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.cloud.discoveryengine.v1beta.ImportDocumentsResponse"},$),i.UserEvent=(f.prototype.eventType="",f.prototype.userPseudoId="",f.prototype.eventTime=null,f.prototype.userInfo=null,f.prototype.directUserRequest=!1,f.prototype.sessionId="",f.prototype.pageInfo=null,f.prototype.attributionToken="",f.prototype.filter="",f.prototype.documents=c.emptyArray,f.prototype.panel=null,f.prototype.searchInfo=null,f.prototype.completionInfo=null,f.prototype.transactionInfo=null,f.prototype.tagIds=c.emptyArray,f.prototype.promotionIds=c.emptyArray,f.prototype.attributes=c.emptyObject,f.prototype.mediaInfo=null,f.create=function(e){return new f(e)},f.encode=function(e,t){if(t=t||a.create(),null!=e.eventType&&Object.hasOwnProperty.call(e,"eventType")&&t.uint32(10).string(e.eventType),null!=e.userPseudoId&&Object.hasOwnProperty.call(e,"userPseudoId")&&t.uint32(18).string(e.userPseudoId),null!=e.eventTime&&Object.hasOwnProperty.call(e,"eventTime")&&p.google.protobuf.Timestamp.encode(e.eventTime,t.uint32(26).fork()).ldelim(),null!=e.userInfo&&Object.hasOwnProperty.call(e,"userInfo")&&p.google.cloud.discoveryengine.v1beta.UserInfo.encode(e.userInfo,t.uint32(34).fork()).ldelim(),null!=e.directUserRequest&&Object.hasOwnProperty.call(e,"directUserRequest")&&t.uint32(40).bool(e.directUserRequest),null!=e.sessionId&&Object.hasOwnProperty.call(e,"sessionId")&&t.uint32(50).string(e.sessionId),null!=e.pageInfo&&Object.hasOwnProperty.call(e,"pageInfo")&&p.google.cloud.discoveryengine.v1beta.PageInfo.encode(e.pageInfo,t.uint32(58).fork()).ldelim(),null!=e.attributionToken&&Object.hasOwnProperty.call(e,"attributionToken")&&t.uint32(66).string(e.attributionToken),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&t.uint32(74).string(e.filter),null!=e.documents&&e.documents.length)for(var n=0;n<e.documents.length;++n)p.google.cloud.discoveryengine.v1beta.DocumentInfo.encode(e.documents[n],t.uint32(82).fork()).ldelim();if(null!=e.panel&&Object.hasOwnProperty.call(e,"panel")&&p.google.cloud.discoveryengine.v1beta.PanelInfo.encode(e.panel,t.uint32(90).fork()).ldelim(),null!=e.searchInfo&&Object.hasOwnProperty.call(e,"searchInfo")&&p.google.cloud.discoveryengine.v1beta.SearchInfo.encode(e.searchInfo,t.uint32(98).fork()).ldelim(),null!=e.completionInfo&&Object.hasOwnProperty.call(e,"completionInfo")&&p.google.cloud.discoveryengine.v1beta.CompletionInfo.encode(e.completionInfo,t.uint32(106).fork()).ldelim(),null!=e.transactionInfo&&Object.hasOwnProperty.call(e,"transactionInfo")&&p.google.cloud.discoveryengine.v1beta.TransactionInfo.encode(e.transactionInfo,t.uint32(114).fork()).ldelim(),null!=e.tagIds&&e.tagIds.length)for(n=0;n<e.tagIds.length;++n)t.uint32(122).string(e.tagIds[n]);if(null!=e.promotionIds&&e.promotionIds.length)for(n=0;n<e.promotionIds.length;++n)t.uint32(130).string(e.promotionIds[n]);if(null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes"))for(var o=Object.keys(e.attributes),n=0;n<o.length;++n)t.uint32(138).fork().uint32(10).string(o[n]),p.google.cloud.discoveryengine.v1beta.CustomAttribute.encode(e.attributes[o[n]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.mediaInfo&&Object.hasOwnProperty.call(e,"mediaInfo")&&p.google.cloud.discoveryengine.v1beta.MediaInfo.encode(e.mediaInfo,t.uint32(146).fork()).ldelim(),t},f.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},f.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.UserEvent;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.eventType=e.string();break;case 2:o.userPseudoId=e.string();break;case 3:o.eventTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;case 4:o.userInfo=p.google.cloud.discoveryengine.v1beta.UserInfo.decode(e,e.uint32());break;case 5:o.directUserRequest=e.bool();break;case 6:o.sessionId=e.string();break;case 7:o.pageInfo=p.google.cloud.discoveryengine.v1beta.PageInfo.decode(e,e.uint32());break;case 8:o.attributionToken=e.string();break;case 9:o.filter=e.string();break;case 10:o.documents&&o.documents.length||(o.documents=[]),o.documents.push(p.google.cloud.discoveryengine.v1beta.DocumentInfo.decode(e,e.uint32()));break;case 11:o.panel=p.google.cloud.discoveryengine.v1beta.PanelInfo.decode(e,e.uint32());break;case 12:o.searchInfo=p.google.cloud.discoveryengine.v1beta.SearchInfo.decode(e,e.uint32());break;case 13:o.completionInfo=p.google.cloud.discoveryengine.v1beta.CompletionInfo.decode(e,e.uint32());break;case 14:o.transactionInfo=p.google.cloud.discoveryengine.v1beta.TransactionInfo.decode(e,e.uint32());break;case 15:o.tagIds&&o.tagIds.length||(o.tagIds=[]),o.tagIds.push(e.string());break;case 16:o.promotionIds&&o.promotionIds.length||(o.promotionIds=[]),o.promotionIds.push(e.string());break;case 17:o.attributes===c.emptyObject&&(o.attributes={});for(var i=e.uint32()+e.pos,a="",l=null;e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:a=e.string();break;case 2:l=p.google.cloud.discoveryengine.v1beta.CustomAttribute.decode(e,e.uint32());break;default:e.skipType(7&s)}}o.attributes[a]=l;break;case 18:o.mediaInfo=p.google.cloud.discoveryengine.v1beta.MediaInfo.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},f.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},f.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.eventType&&e.hasOwnProperty("eventType")&&!c.isString(e.eventType))return"eventType: string expected";if(null!=e.userPseudoId&&e.hasOwnProperty("userPseudoId")&&!c.isString(e.userPseudoId))return"userPseudoId: string expected";if(null!=e.eventTime&&e.hasOwnProperty("eventTime")&&(n=p.google.protobuf.Timestamp.verify(e.eventTime)))return"eventTime."+n;if(null!=e.userInfo&&e.hasOwnProperty("userInfo")&&(n=p.google.cloud.discoveryengine.v1beta.UserInfo.verify(e.userInfo)))return"userInfo."+n;if(null!=e.directUserRequest&&e.hasOwnProperty("directUserRequest")&&"boolean"!=typeof e.directUserRequest)return"directUserRequest: boolean expected";if(null!=e.sessionId&&e.hasOwnProperty("sessionId")&&!c.isString(e.sessionId))return"sessionId: string expected";if(null!=e.pageInfo&&e.hasOwnProperty("pageInfo")&&(n=p.google.cloud.discoveryengine.v1beta.PageInfo.verify(e.pageInfo)))return"pageInfo."+n;if(null!=e.attributionToken&&e.hasOwnProperty("attributionToken")&&!c.isString(e.attributionToken))return"attributionToken: string expected";if(null!=e.filter&&e.hasOwnProperty("filter")&&!c.isString(e.filter))return"filter: string expected";if(null!=e.documents&&e.hasOwnProperty("documents")){if(!Array.isArray(e.documents))return"documents: array expected";for(var t=0;t<e.documents.length;++t)if(n=p.google.cloud.discoveryengine.v1beta.DocumentInfo.verify(e.documents[t]))return"documents."+n}if(null!=e.panel&&e.hasOwnProperty("panel")&&(n=p.google.cloud.discoveryengine.v1beta.PanelInfo.verify(e.panel)))return"panel."+n;if(null!=e.searchInfo&&e.hasOwnProperty("searchInfo")&&(n=p.google.cloud.discoveryengine.v1beta.SearchInfo.verify(e.searchInfo)))return"searchInfo."+n;if(null!=e.completionInfo&&e.hasOwnProperty("completionInfo")&&(n=p.google.cloud.discoveryengine.v1beta.CompletionInfo.verify(e.completionInfo)))return"completionInfo."+n;if(null!=e.transactionInfo&&e.hasOwnProperty("transactionInfo")&&(n=p.google.cloud.discoveryengine.v1beta.TransactionInfo.verify(e.transactionInfo)))return"transactionInfo."+n;if(null!=e.tagIds&&e.hasOwnProperty("tagIds")){if(!Array.isArray(e.tagIds))return"tagIds: array expected";for(t=0;t<e.tagIds.length;++t)if(!c.isString(e.tagIds[t]))return"tagIds: string[] expected"}if(null!=e.promotionIds&&e.hasOwnProperty("promotionIds")){if(!Array.isArray(e.promotionIds))return"promotionIds: array expected";for(t=0;t<e.promotionIds.length;++t)if(!c.isString(e.promotionIds[t]))return"promotionIds: string[] expected"}if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!c.isObject(e.attributes))return"attributes: object expected";for(var n,o=Object.keys(e.attributes),t=0;t<o.length;++t)if(n=p.google.cloud.discoveryengine.v1beta.CustomAttribute.verify(e.attributes[o[t]]))return"attributes."+n}if(null!=e.mediaInfo&&e.hasOwnProperty("mediaInfo")&&(n=p.google.cloud.discoveryengine.v1beta.MediaInfo.verify(e.mediaInfo)))return"mediaInfo."+n;return null},f.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.UserEvent)return e;var t=new p.google.cloud.discoveryengine.v1beta.UserEvent;if(null!=e.eventType&&(t.eventType=String(e.eventType)),null!=e.userPseudoId&&(t.userPseudoId=String(e.userPseudoId)),null!=e.eventTime){if("object"!=typeof e.eventTime)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.eventTime: object expected");t.eventTime=p.google.protobuf.Timestamp.fromObject(e.eventTime)}if(null!=e.userInfo){if("object"!=typeof e.userInfo)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.userInfo: object expected");t.userInfo=p.google.cloud.discoveryengine.v1beta.UserInfo.fromObject(e.userInfo)}if(null!=e.directUserRequest&&(t.directUserRequest=Boolean(e.directUserRequest)),null!=e.sessionId&&(t.sessionId=String(e.sessionId)),null!=e.pageInfo){if("object"!=typeof e.pageInfo)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.pageInfo: object expected");t.pageInfo=p.google.cloud.discoveryengine.v1beta.PageInfo.fromObject(e.pageInfo)}if(null!=e.attributionToken&&(t.attributionToken=String(e.attributionToken)),null!=e.filter&&(t.filter=String(e.filter)),e.documents){if(!Array.isArray(e.documents))throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.documents: array expected");t.documents=[];for(var n=0;n<e.documents.length;++n){if("object"!=typeof e.documents[n])throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.documents: object expected");t.documents[n]=p.google.cloud.discoveryengine.v1beta.DocumentInfo.fromObject(e.documents[n])}}if(null!=e.panel){if("object"!=typeof e.panel)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.panel: object expected");t.panel=p.google.cloud.discoveryengine.v1beta.PanelInfo.fromObject(e.panel)}if(null!=e.searchInfo){if("object"!=typeof e.searchInfo)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.searchInfo: object expected");t.searchInfo=p.google.cloud.discoveryengine.v1beta.SearchInfo.fromObject(e.searchInfo)}if(null!=e.completionInfo){if("object"!=typeof e.completionInfo)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.completionInfo: object expected");t.completionInfo=p.google.cloud.discoveryengine.v1beta.CompletionInfo.fromObject(e.completionInfo)}if(null!=e.transactionInfo){if("object"!=typeof e.transactionInfo)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.transactionInfo: object expected");t.transactionInfo=p.google.cloud.discoveryengine.v1beta.TransactionInfo.fromObject(e.transactionInfo)}if(e.tagIds){if(!Array.isArray(e.tagIds))throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.tagIds: array expected");t.tagIds=[];for(n=0;n<e.tagIds.length;++n)t.tagIds[n]=String(e.tagIds[n])}if(e.promotionIds){if(!Array.isArray(e.promotionIds))throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.promotionIds: array expected");t.promotionIds=[];for(n=0;n<e.promotionIds.length;++n)t.promotionIds[n]=String(e.promotionIds[n])}if(e.attributes){if("object"!=typeof e.attributes)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.attributes: object expected");t.attributes={};for(var o=Object.keys(e.attributes),n=0;n<o.length;++n){if("object"!=typeof e.attributes[o[n]])throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.attributes: object expected");t.attributes[o[n]]=p.google.cloud.discoveryengine.v1beta.CustomAttribute.fromObject(e.attributes[o[n]])}}if(null!=e.mediaInfo){if("object"!=typeof e.mediaInfo)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.mediaInfo: object expected");t.mediaInfo=p.google.cloud.discoveryengine.v1beta.MediaInfo.fromObject(e.mediaInfo)}return t},f.toObject=function(e,t){var n,o={};if(((t=t||{}).arrays||t.defaults)&&(o.documents=[],o.tagIds=[],o.promotionIds=[]),(t.objects||t.defaults)&&(o.attributes={}),t.defaults&&(o.eventType="",o.userPseudoId="",o.eventTime=null,o.userInfo=null,o.directUserRequest=!1,o.sessionId="",o.pageInfo=null,o.attributionToken="",o.filter="",o.panel=null,o.searchInfo=null,o.completionInfo=null,o.transactionInfo=null,o.mediaInfo=null),null!=e.eventType&&e.hasOwnProperty("eventType")&&(o.eventType=e.eventType),null!=e.userPseudoId&&e.hasOwnProperty("userPseudoId")&&(o.userPseudoId=e.userPseudoId),null!=e.eventTime&&e.hasOwnProperty("eventTime")&&(o.eventTime=p.google.protobuf.Timestamp.toObject(e.eventTime,t)),null!=e.userInfo&&e.hasOwnProperty("userInfo")&&(o.userInfo=p.google.cloud.discoveryengine.v1beta.UserInfo.toObject(e.userInfo,t)),null!=e.directUserRequest&&e.hasOwnProperty("directUserRequest")&&(o.directUserRequest=e.directUserRequest),null!=e.sessionId&&e.hasOwnProperty("sessionId")&&(o.sessionId=e.sessionId),null!=e.pageInfo&&e.hasOwnProperty("pageInfo")&&(o.pageInfo=p.google.cloud.discoveryengine.v1beta.PageInfo.toObject(e.pageInfo,t)),null!=e.attributionToken&&e.hasOwnProperty("attributionToken")&&(o.attributionToken=e.attributionToken),null!=e.filter&&e.hasOwnProperty("filter")&&(o.filter=e.filter),e.documents&&e.documents.length){o.documents=[];for(var r=0;r<e.documents.length;++r)o.documents[r]=p.google.cloud.discoveryengine.v1beta.DocumentInfo.toObject(e.documents[r],t)}if(null!=e.panel&&e.hasOwnProperty("panel")&&(o.panel=p.google.cloud.discoveryengine.v1beta.PanelInfo.toObject(e.panel,t)),null!=e.searchInfo&&e.hasOwnProperty("searchInfo")&&(o.searchInfo=p.google.cloud.discoveryengine.v1beta.SearchInfo.toObject(e.searchInfo,t)),null!=e.completionInfo&&e.hasOwnProperty("completionInfo")&&(o.completionInfo=p.google.cloud.discoveryengine.v1beta.CompletionInfo.toObject(e.completionInfo,t)),null!=e.transactionInfo&&e.hasOwnProperty("transactionInfo")&&(o.transactionInfo=p.google.cloud.discoveryengine.v1beta.TransactionInfo.toObject(e.transactionInfo,t)),e.tagIds&&e.tagIds.length){o.tagIds=[];for(r=0;r<e.tagIds.length;++r)o.tagIds[r]=e.tagIds[r]}if(e.promotionIds&&e.promotionIds.length){o.promotionIds=[];for(r=0;r<e.promotionIds.length;++r)o.promotionIds[r]=e.promotionIds[r]}if(e.attributes&&(n=Object.keys(e.attributes)).length){o.attributes={};for(r=0;r<n.length;++r)o.attributes[n[r]]=p.google.cloud.discoveryengine.v1beta.CustomAttribute.toObject(e.attributes[n[r]],t)}return null!=e.mediaInfo&&e.hasOwnProperty("mediaInfo")&&(o.mediaInfo=p.google.cloud.discoveryengine.v1beta.MediaInfo.toObject(e.mediaInfo,t)),o},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.cloud.discoveryengine.v1beta.UserEvent"},f),i.PageInfo=(ee.prototype.pageviewId="",ee.prototype.pageCategory="",ee.prototype.uri="",ee.prototype.referrerUri="",ee.create=function(e){return new ee(e)},ee.encode=function(e,t){return t=t||a.create(),null!=e.pageviewId&&Object.hasOwnProperty.call(e,"pageviewId")&&t.uint32(10).string(e.pageviewId),null!=e.pageCategory&&Object.hasOwnProperty.call(e,"pageCategory")&&t.uint32(18).string(e.pageCategory),null!=e.uri&&Object.hasOwnProperty.call(e,"uri")&&t.uint32(26).string(e.uri),null!=e.referrerUri&&Object.hasOwnProperty.call(e,"referrerUri")&&t.uint32(34).string(e.referrerUri),t},ee.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ee.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.PageInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.pageviewId=e.string();break;case 2:o.pageCategory=e.string();break;case 3:o.uri=e.string();break;case 4:o.referrerUri=e.string();break;default:e.skipType(7&r)}}return o},ee.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},ee.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.pageviewId&&e.hasOwnProperty("pageviewId")&&!c.isString(e.pageviewId)?"pageviewId: string expected":null!=e.pageCategory&&e.hasOwnProperty("pageCategory")&&!c.isString(e.pageCategory)?"pageCategory: string expected":null!=e.uri&&e.hasOwnProperty("uri")&&!c.isString(e.uri)?"uri: string expected":null!=e.referrerUri&&e.hasOwnProperty("referrerUri")&&!c.isString(e.referrerUri)?"referrerUri: string expected":null},ee.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.PageInfo?e:(t=new p.google.cloud.discoveryengine.v1beta.PageInfo,null!=e.pageviewId&&(t.pageviewId=String(e.pageviewId)),null!=e.pageCategory&&(t.pageCategory=String(e.pageCategory)),null!=e.uri&&(t.uri=String(e.uri)),null!=e.referrerUri&&(t.referrerUri=String(e.referrerUri)),t)},ee.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.pageviewId="",n.pageCategory="",n.uri="",n.referrerUri=""),null!=e.pageviewId&&e.hasOwnProperty("pageviewId")&&(n.pageviewId=e.pageviewId),null!=e.pageCategory&&e.hasOwnProperty("pageCategory")&&(n.pageCategory=e.pageCategory),null!=e.uri&&e.hasOwnProperty("uri")&&(n.uri=e.uri),null!=e.referrerUri&&e.hasOwnProperty("referrerUri")&&(n.referrerUri=e.referrerUri),n},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.cloud.discoveryengine.v1beta.PageInfo"},ee),i.SearchInfo=(te.prototype.searchQuery="",te.prototype.orderBy="",te.prototype.offset=null,Object.defineProperty(te.prototype,"_offset",{get:c.oneOfGetter(t=["offset"]),set:c.oneOfSetter(t)}),te.create=function(e){return new te(e)},te.encode=function(e,t){return t=t||a.create(),null!=e.searchQuery&&Object.hasOwnProperty.call(e,"searchQuery")&&t.uint32(10).string(e.searchQuery),null!=e.orderBy&&Object.hasOwnProperty.call(e,"orderBy")&&t.uint32(18).string(e.orderBy),null!=e.offset&&Object.hasOwnProperty.call(e,"offset")&&t.uint32(24).int32(e.offset),t},te.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},te.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.searchQuery=e.string();break;case 2:o.orderBy=e.string();break;case 3:o.offset=e.int32();break;default:e.skipType(7&r)}}return o},te.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},te.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.searchQuery&&e.hasOwnProperty("searchQuery")&&!c.isString(e.searchQuery)?"searchQuery: string expected":null!=e.orderBy&&e.hasOwnProperty("orderBy")&&!c.isString(e.orderBy)?"orderBy: string expected":null!=e.offset&&e.hasOwnProperty("offset")&&!c.isInteger(e.offset)?"offset: integer expected":null},te.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.SearchInfo?e:(t=new p.google.cloud.discoveryengine.v1beta.SearchInfo,null!=e.searchQuery&&(t.searchQuery=String(e.searchQuery)),null!=e.orderBy&&(t.orderBy=String(e.orderBy)),null!=e.offset&&(t.offset=0|e.offset),t)},te.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.searchQuery="",n.orderBy=""),null!=e.searchQuery&&e.hasOwnProperty("searchQuery")&&(n.searchQuery=e.searchQuery),null!=e.orderBy&&e.hasOwnProperty("orderBy")&&(n.orderBy=e.orderBy),null!=e.offset&&e.hasOwnProperty("offset")&&(n.offset=e.offset,t.oneofs)&&(n._offset="offset"),n},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.cloud.discoveryengine.v1beta.SearchInfo"},te),i.CompletionInfo=(ne.prototype.selectedSuggestion="",ne.prototype.selectedPosition=0,ne.create=function(e){return new ne(e)},ne.encode=function(e,t){return t=t||a.create(),null!=e.selectedSuggestion&&Object.hasOwnProperty.call(e,"selectedSuggestion")&&t.uint32(10).string(e.selectedSuggestion),null!=e.selectedPosition&&Object.hasOwnProperty.call(e,"selectedPosition")&&t.uint32(16).int32(e.selectedPosition),t},ne.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ne.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.CompletionInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.selectedSuggestion=e.string();break;case 2:o.selectedPosition=e.int32();break;default:e.skipType(7&r)}}return o},ne.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},ne.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.selectedSuggestion&&e.hasOwnProperty("selectedSuggestion")&&!c.isString(e.selectedSuggestion)?"selectedSuggestion: string expected":null!=e.selectedPosition&&e.hasOwnProperty("selectedPosition")&&!c.isInteger(e.selectedPosition)?"selectedPosition: integer expected":null},ne.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.CompletionInfo?e:(t=new p.google.cloud.discoveryengine.v1beta.CompletionInfo,null!=e.selectedSuggestion&&(t.selectedSuggestion=String(e.selectedSuggestion)),null!=e.selectedPosition&&(t.selectedPosition=0|e.selectedPosition),t)},ne.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.selectedSuggestion="",n.selectedPosition=0),null!=e.selectedSuggestion&&e.hasOwnProperty("selectedSuggestion")&&(n.selectedSuggestion=e.selectedSuggestion),null!=e.selectedPosition&&e.hasOwnProperty("selectedPosition")&&(n.selectedPosition=e.selectedPosition),n},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.cloud.discoveryengine.v1beta.CompletionInfo"},ne),i.TransactionInfo=(y.prototype.value=null,y.prototype.currency="",y.prototype.transactionId="",y.prototype.tax=null,y.prototype.cost=null,y.prototype.discountValue=null,Object.defineProperty(y.prototype,"_value",{get:c.oneOfGetter(n=["value"]),set:c.oneOfSetter(n)}),Object.defineProperty(y.prototype,"_tax",{get:c.oneOfGetter(n=["tax"]),set:c.oneOfSetter(n)}),Object.defineProperty(y.prototype,"_cost",{get:c.oneOfGetter(n=["cost"]),set:c.oneOfSetter(n)}),Object.defineProperty(y.prototype,"_discountValue",{get:c.oneOfGetter(n=["discountValue"]),set:c.oneOfSetter(n)}),y.create=function(e){return new y(e)},y.encode=function(e,t){return t=t||a.create(),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.currency&&Object.hasOwnProperty.call(e,"currency")&&t.uint32(18).string(e.currency),null!=e.transactionId&&Object.hasOwnProperty.call(e,"transactionId")&&t.uint32(26).string(e.transactionId),null!=e.tax&&Object.hasOwnProperty.call(e,"tax")&&t.uint32(37).float(e.tax),null!=e.cost&&Object.hasOwnProperty.call(e,"cost")&&t.uint32(45).float(e.cost),null!=e.discountValue&&Object.hasOwnProperty.call(e,"discountValue")&&t.uint32(53).float(e.discountValue),t},y.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},y.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.TransactionInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.value=e.float();break;case 2:o.currency=e.string();break;case 3:o.transactionId=e.string();break;case 4:o.tax=e.float();break;case 5:o.cost=e.float();break;case 6:o.discountValue=e.float();break;default:e.skipType(7&r)}}return o},y.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},y.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.value&&e.hasOwnProperty("value")&&"number"!=typeof e.value?"value: number expected":null!=e.currency&&e.hasOwnProperty("currency")&&!c.isString(e.currency)?"currency: string expected":null!=e.transactionId&&e.hasOwnProperty("transactionId")&&!c.isString(e.transactionId)?"transactionId: string expected":null!=e.tax&&e.hasOwnProperty("tax")&&"number"!=typeof e.tax?"tax: number expected":null!=e.cost&&e.hasOwnProperty("cost")&&"number"!=typeof e.cost?"cost: number expected":null!=e.discountValue&&e.hasOwnProperty("discountValue")&&"number"!=typeof e.discountValue?"discountValue: number expected":null},y.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.TransactionInfo?e:(t=new p.google.cloud.discoveryengine.v1beta.TransactionInfo,null!=e.value&&(t.value=Number(e.value)),null!=e.currency&&(t.currency=String(e.currency)),null!=e.transactionId&&(t.transactionId=String(e.transactionId)),null!=e.tax&&(t.tax=Number(e.tax)),null!=e.cost&&(t.cost=Number(e.cost)),null!=e.discountValue&&(t.discountValue=Number(e.discountValue)),t)},y.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.currency="",n.transactionId=""),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs)&&(n._value="value"),null!=e.currency&&e.hasOwnProperty("currency")&&(n.currency=e.currency),null!=e.transactionId&&e.hasOwnProperty("transactionId")&&(n.transactionId=e.transactionId),null!=e.tax&&e.hasOwnProperty("tax")&&(n.tax=t.json&&!isFinite(e.tax)?String(e.tax):e.tax,t.oneofs)&&(n._tax="tax"),null!=e.cost&&e.hasOwnProperty("cost")&&(n.cost=t.json&&!isFinite(e.cost)?String(e.cost):e.cost,t.oneofs)&&(n._cost="cost"),null!=e.discountValue&&e.hasOwnProperty("discountValue")&&(n.discountValue=t.json&&!isFinite(e.discountValue)?String(e.discountValue):e.discountValue,t.oneofs)&&(n._discountValue="discountValue"),n},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.cloud.discoveryengine.v1beta.TransactionInfo"},y),i.DocumentInfo=(m.prototype.id=null,m.prototype.name=null,m.prototype.quantity=null,m.prototype.promotionIds=c.emptyArray,Object.defineProperty(m.prototype,"documentDescriptor",{get:c.oneOfGetter(t=["id","name"]),set:c.oneOfSetter(t)}),Object.defineProperty(m.prototype,"_quantity",{get:c.oneOfGetter(t=["quantity"]),set:c.oneOfSetter(t)}),m.create=function(e){return new m(e)},m.encode=function(e,t){if(t=t||a.create(),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),null!=e.quantity&&Object.hasOwnProperty.call(e,"quantity")&&t.uint32(24).int32(e.quantity),null!=e.promotionIds&&e.promotionIds.length)for(var n=0;n<e.promotionIds.length;++n)t.uint32(34).string(e.promotionIds[n]);return t},m.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},m.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.DocumentInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.id=e.string();break;case 2:o.name=e.string();break;case 3:o.quantity=e.int32();break;case 4:o.promotionIds&&o.promotionIds.length||(o.promotionIds=[]),o.promotionIds.push(e.string());break;default:e.skipType(7&r)}}return o},m.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},m.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.id&&e.hasOwnProperty("id")&&(t.documentDescriptor=1,!c.isString(e.id)))return"id: string expected";if(null!=e.name&&e.hasOwnProperty("name")){if(1===t.documentDescriptor)return"documentDescriptor: multiple values";if(t.documentDescriptor=1,!c.isString(e.name))return"name: string expected"}if(null!=e.quantity&&e.hasOwnProperty("quantity")&&(t._quantity=1,!c.isInteger(e.quantity)))return"quantity: integer expected";if(null!=e.promotionIds&&e.hasOwnProperty("promotionIds")){if(!Array.isArray(e.promotionIds))return"promotionIds: array expected";for(var n=0;n<e.promotionIds.length;++n)if(!c.isString(e.promotionIds[n]))return"promotionIds: string[] expected"}return null},m.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.DocumentInfo)return e;var t=new p.google.cloud.discoveryengine.v1beta.DocumentInfo;if(null!=e.id&&(t.id=String(e.id)),null!=e.name&&(t.name=String(e.name)),null!=e.quantity&&(t.quantity=0|e.quantity),e.promotionIds){if(!Array.isArray(e.promotionIds))throw TypeError(".google.cloud.discoveryengine.v1beta.DocumentInfo.promotionIds: array expected");t.promotionIds=[];for(var n=0;n<e.promotionIds.length;++n)t.promotionIds[n]=String(e.promotionIds[n])}return t},m.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.promotionIds=[]),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id,t.oneofs)&&(n.documentDescriptor="id"),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name,t.oneofs)&&(n.documentDescriptor="name"),null!=e.quantity&&e.hasOwnProperty("quantity")&&(n.quantity=e.quantity,t.oneofs)&&(n._quantity="quantity"),e.promotionIds&&e.promotionIds.length){n.promotionIds=[];for(var o=0;o<e.promotionIds.length;++o)n.promotionIds[o]=e.promotionIds[o]}return n},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.cloud.discoveryengine.v1beta.DocumentInfo"},m),i.PanelInfo=(b.prototype.panelId="",b.prototype.displayName="",b.prototype.panelPosition=null,b.prototype.totalPanels=null,Object.defineProperty(b.prototype,"_panelPosition",{get:c.oneOfGetter(n=["panelPosition"]),set:c.oneOfSetter(n)}),Object.defineProperty(b.prototype,"_totalPanels",{get:c.oneOfGetter(n=["totalPanels"]),set:c.oneOfSetter(n)}),b.create=function(e){return new b(e)},b.encode=function(e,t){return t=t||a.create(),null!=e.panelId&&Object.hasOwnProperty.call(e,"panelId")&&t.uint32(18).string(e.panelId),null!=e.displayName&&Object.hasOwnProperty.call(e,"displayName")&&t.uint32(26).string(e.displayName),null!=e.panelPosition&&Object.hasOwnProperty.call(e,"panelPosition")&&t.uint32(32).int32(e.panelPosition),null!=e.totalPanels&&Object.hasOwnProperty.call(e,"totalPanels")&&t.uint32(40).int32(e.totalPanels),t},b.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},b.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.PanelInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 2:o.panelId=e.string();break;case 3:o.displayName=e.string();break;case 4:o.panelPosition=e.int32();break;case 5:o.totalPanels=e.int32();break;default:e.skipType(7&r)}}return o},b.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},b.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.panelId&&e.hasOwnProperty("panelId")&&!c.isString(e.panelId)?"panelId: string expected":null!=e.displayName&&e.hasOwnProperty("displayName")&&!c.isString(e.displayName)?"displayName: string expected":null!=e.panelPosition&&e.hasOwnProperty("panelPosition")&&!c.isInteger(e.panelPosition)?"panelPosition: integer expected":null!=e.totalPanels&&e.hasOwnProperty("totalPanels")&&!c.isInteger(e.totalPanels)?"totalPanels: integer expected":null},b.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.PanelInfo?e:(t=new p.google.cloud.discoveryengine.v1beta.PanelInfo,null!=e.panelId&&(t.panelId=String(e.panelId)),null!=e.displayName&&(t.displayName=String(e.displayName)),null!=e.panelPosition&&(t.panelPosition=0|e.panelPosition),null!=e.totalPanels&&(t.totalPanels=0|e.totalPanels),t)},b.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.panelId="",n.displayName=""),null!=e.panelId&&e.hasOwnProperty("panelId")&&(n.panelId=e.panelId),null!=e.displayName&&e.hasOwnProperty("displayName")&&(n.displayName=e.displayName),null!=e.panelPosition&&e.hasOwnProperty("panelPosition")&&(n.panelPosition=e.panelPosition,t.oneofs)&&(n._panelPosition="panelPosition"),null!=e.totalPanels&&e.hasOwnProperty("totalPanels")&&(n.totalPanels=e.totalPanels,t.oneofs)&&(n._totalPanels="totalPanels"),n},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.cloud.discoveryengine.v1beta.PanelInfo"},b),i.MediaInfo=(oe.prototype.mediaProgressDuration=null,oe.prototype.mediaProgressPercentage=null,Object.defineProperty(oe.prototype,"_mediaProgressPercentage",{get:c.oneOfGetter(t=["mediaProgressPercentage"]),set:c.oneOfSetter(t)}),oe.create=function(e){return new oe(e)},oe.encode=function(e,t){return t=t||a.create(),null!=e.mediaProgressDuration&&Object.hasOwnProperty.call(e,"mediaProgressDuration")&&p.google.protobuf.Duration.encode(e.mediaProgressDuration,t.uint32(10).fork()).ldelim(),null!=e.mediaProgressPercentage&&Object.hasOwnProperty.call(e,"mediaProgressPercentage")&&t.uint32(21).float(e.mediaProgressPercentage),t},oe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},oe.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.MediaInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.mediaProgressDuration=p.google.protobuf.Duration.decode(e,e.uint32());break;case 2:o.mediaProgressPercentage=e.float();break;default:e.skipType(7&r)}}return o},oe.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},oe.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.mediaProgressDuration&&e.hasOwnProperty("mediaProgressDuration")){var t=p.google.protobuf.Duration.verify(e.mediaProgressDuration);if(t)return"mediaProgressDuration."+t}return null!=e.mediaProgressPercentage&&e.hasOwnProperty("mediaProgressPercentage")&&"number"!=typeof e.mediaProgressPercentage?"mediaProgressPercentage: number expected":null},oe.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.MediaInfo)return e;var t=new p.google.cloud.discoveryengine.v1beta.MediaInfo;if(null!=e.mediaProgressDuration){if("object"!=typeof e.mediaProgressDuration)throw TypeError(".google.cloud.discoveryengine.v1beta.MediaInfo.mediaProgressDuration: object expected");t.mediaProgressDuration=p.google.protobuf.Duration.fromObject(e.mediaProgressDuration)}return null!=e.mediaProgressPercentage&&(t.mediaProgressPercentage=Number(e.mediaProgressPercentage)),t},oe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.mediaProgressDuration=null),null!=e.mediaProgressDuration&&e.hasOwnProperty("mediaProgressDuration")&&(n.mediaProgressDuration=p.google.protobuf.Duration.toObject(e.mediaProgressDuration,t)),null!=e.mediaProgressPercentage&&e.hasOwnProperty("mediaProgressPercentage")&&(n.mediaProgressPercentage=t.json&&!isFinite(e.mediaProgressPercentage)?String(e.mediaProgressPercentage):e.mediaProgressPercentage,t.oneofs)&&(n._mediaProgressPercentage="mediaProgressPercentage"),n},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.cloud.discoveryengine.v1beta.MediaInfo"},oe),i.RecommendationService=(((re.prototype=Object.create(o.rpc.Service.prototype)).constructor=re).create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(re.prototype.recommend=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.RecommendRequest,p.google.cloud.discoveryengine.v1beta.RecommendResponse,t,n)},"name",{value:"Recommend"}),re),i.RecommendRequest=(h.prototype.servingConfig="",h.prototype.userEvent=null,h.prototype.pageSize=0,h.prototype.filter="",h.prototype.validateOnly=!1,h.prototype.params=c.emptyObject,h.prototype.userLabels=c.emptyObject,h.create=function(e){return new h(e)},h.encode=function(e,t){if(t=t||a.create(),null!=e.servingConfig&&Object.hasOwnProperty.call(e,"servingConfig")&&t.uint32(10).string(e.servingConfig),null!=e.userEvent&&Object.hasOwnProperty.call(e,"userEvent")&&p.google.cloud.discoveryengine.v1beta.UserEvent.encode(e.userEvent,t.uint32(18).fork()).ldelim(),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&t.uint32(24).int32(e.pageSize),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&t.uint32(34).string(e.filter),null!=e.validateOnly&&Object.hasOwnProperty.call(e,"validateOnly")&&t.uint32(40).bool(e.validateOnly),null!=e.params&&Object.hasOwnProperty.call(e,"params"))for(var n=Object.keys(e.params),o=0;o<n.length;++o)t.uint32(50).fork().uint32(10).string(n[o]),p.google.protobuf.Value.encode(e.params[n[o]],t.uint32(18).fork()).ldelim().ldelim();if(null!=e.userLabels&&Object.hasOwnProperty.call(e,"userLabels"))for(n=Object.keys(e.userLabels),o=0;o<n.length;++o)t.uint32(66).fork().uint32(10).string(n[o]).uint32(18).string(e.userLabels[n[o]]).ldelim();return t},h.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},h.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.RecommendRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.servingConfig=e.string();break;case 2:o.userEvent=p.google.cloud.discoveryengine.v1beta.UserEvent.decode(e,e.uint32());break;case 3:o.pageSize=e.int32();break;case 4:o.filter=e.string();break;case 5:o.validateOnly=e.bool();break;case 6:o.params===c.emptyObject&&(o.params={});for(var i=e.uint32()+e.pos,a="",l=null;e.pos<i;)switch((s=e.uint32())>>>3){case 1:a=e.string();break;case 2:l=p.google.protobuf.Value.decode(e,e.uint32());break;default:e.skipType(7&s)}o.params[a]=l;break;case 8:o.userLabels===c.emptyObject&&(o.userLabels={});var s,i=e.uint32()+e.pos;for(l=a="";e.pos<i;)switch((s=e.uint32())>>>3){case 1:a=e.string();break;case 2:l=e.string();break;default:e.skipType(7&s)}o.userLabels[a]=l;break;default:e.skipType(7&r)}}return o},h.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},h.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.servingConfig&&e.hasOwnProperty("servingConfig")&&!c.isString(e.servingConfig))return"servingConfig: string expected";if(null!=e.userEvent&&e.hasOwnProperty("userEvent")&&(t=p.google.cloud.discoveryengine.v1beta.UserEvent.verify(e.userEvent)))return"userEvent."+t;if(null!=e.pageSize&&e.hasOwnProperty("pageSize")&&!c.isInteger(e.pageSize))return"pageSize: integer expected";if(null!=e.filter&&e.hasOwnProperty("filter")&&!c.isString(e.filter))return"filter: string expected";if(null!=e.validateOnly&&e.hasOwnProperty("validateOnly")&&"boolean"!=typeof e.validateOnly)return"validateOnly: boolean expected";if(null!=e.params&&e.hasOwnProperty("params")){if(!c.isObject(e.params))return"params: object expected";for(var t,n=Object.keys(e.params),o=0;o<n.length;++o)if(t=p.google.protobuf.Value.verify(e.params[n[o]]))return"params."+t}if(null!=e.userLabels&&e.hasOwnProperty("userLabels")){if(!c.isObject(e.userLabels))return"userLabels: object expected";for(n=Object.keys(e.userLabels),o=0;o<n.length;++o)if(!c.isString(e.userLabels[n[o]]))return"userLabels: string{k:string} expected"}return null},h.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.RecommendRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.RecommendRequest;if(null!=e.servingConfig&&(t.servingConfig=String(e.servingConfig)),null!=e.userEvent){if("object"!=typeof e.userEvent)throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.userEvent: object expected");t.userEvent=p.google.cloud.discoveryengine.v1beta.UserEvent.fromObject(e.userEvent)}if(null!=e.pageSize&&(t.pageSize=0|e.pageSize),null!=e.filter&&(t.filter=String(e.filter)),null!=e.validateOnly&&(t.validateOnly=Boolean(e.validateOnly)),e.params){if("object"!=typeof e.params)throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.params: object expected");t.params={};for(var n=Object.keys(e.params),o=0;o<n.length;++o){if("object"!=typeof e.params[n[o]])throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.params: object expected");t.params[n[o]]=p.google.protobuf.Value.fromObject(e.params[n[o]])}}if(e.userLabels){if("object"!=typeof e.userLabels)throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.userLabels: object expected");t.userLabels={};for(n=Object.keys(e.userLabels),o=0;o<n.length;++o)t.userLabels[n[o]]=String(e.userLabels[n[o]])}return t},h.toObject=function(e,t){var n,o={};if(((t=t||{}).objects||t.defaults)&&(o.params={},o.userLabels={}),t.defaults&&(o.servingConfig="",o.userEvent=null,o.pageSize=0,o.filter="",o.validateOnly=!1),null!=e.servingConfig&&e.hasOwnProperty("servingConfig")&&(o.servingConfig=e.servingConfig),null!=e.userEvent&&e.hasOwnProperty("userEvent")&&(o.userEvent=p.google.cloud.discoveryengine.v1beta.UserEvent.toObject(e.userEvent,t)),null!=e.pageSize&&e.hasOwnProperty("pageSize")&&(o.pageSize=e.pageSize),null!=e.filter&&e.hasOwnProperty("filter")&&(o.filter=e.filter),null!=e.validateOnly&&e.hasOwnProperty("validateOnly")&&(o.validateOnly=e.validateOnly),e.params&&(n=Object.keys(e.params)).length){o.params={};for(var r=0;r<n.length;++r)o.params[n[r]]=p.google.protobuf.Value.toObject(e.params[n[r]],t)}if(e.userLabels&&(n=Object.keys(e.userLabels)).length){o.userLabels={};for(r=0;r<n.length;++r)o.userLabels[n[r]]=e.userLabels[n[r]]}return 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.cloud.discoveryengine.v1beta.RecommendRequest"},h),i.RecommendResponse=(ie.prototype.results=c.emptyArray,ie.prototype.attributionToken="",ie.prototype.missingIds=c.emptyArray,ie.prototype.validateOnly=!1,ie.create=function(e){return new ie(e)},ie.encode=function(e,t){if(t=t||a.create(),null!=e.results&&e.results.length)for(var n=0;n<e.results.length;++n)p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.encode(e.results[n],t.uint32(10).fork()).ldelim();if(null!=e.attributionToken&&Object.hasOwnProperty.call(e,"attributionToken")&&t.uint32(18).string(e.attributionToken),null!=e.missingIds&&e.missingIds.length)for(n=0;n<e.missingIds.length;++n)t.uint32(26).string(e.missingIds[n]);return null!=e.validateOnly&&Object.hasOwnProperty.call(e,"validateOnly")&&t.uint32(32).bool(e.validateOnly),t},ie.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ie.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.RecommendResponse;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.results&&o.results.length||(o.results=[]),o.results.push(p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.decode(e,e.uint32()));break;case 2:o.attributionToken=e.string();break;case 3:o.missingIds&&o.missingIds.length||(o.missingIds=[]),o.missingIds.push(e.string());break;case 4:o.validateOnly=e.bool();break;default:e.skipType(7&r)}}return o},ie.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},ie.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.results&&e.hasOwnProperty("results")){if(!Array.isArray(e.results))return"results: array expected";for(var t=0;t<e.results.length;++t){var n=p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify(e.results[t]);if(n)return"results."+n}}if(null!=e.attributionToken&&e.hasOwnProperty("attributionToken")&&!c.isString(e.attributionToken))return"attributionToken: string expected";if(null!=e.missingIds&&e.hasOwnProperty("missingIds")){if(!Array.isArray(e.missingIds))return"missingIds: array expected";for(t=0;t<e.missingIds.length;++t)if(!c.isString(e.missingIds[t]))return"missingIds: string[] expected"}return null!=e.validateOnly&&e.hasOwnProperty("validateOnly")&&"boolean"!=typeof e.validateOnly?"validateOnly: boolean expected":null},ie.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.RecommendResponse)return e;var t=new p.google.cloud.discoveryengine.v1beta.RecommendResponse;if(e.results){if(!Array.isArray(e.results))throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.results: array expected");t.results=[];for(var n=0;n<e.results.length;++n){if("object"!=typeof e.results[n])throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.results: object expected");t.results[n]=p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.fromObject(e.results[n])}}if(null!=e.attributionToken&&(t.attributionToken=String(e.attributionToken)),e.missingIds){if(!Array.isArray(e.missingIds))throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.missingIds: array expected");t.missingIds=[];for(n=0;n<e.missingIds.length;++n)t.missingIds[n]=String(e.missingIds[n])}return null!=e.validateOnly&&(t.validateOnly=Boolean(e.validateOnly)),t},ie.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.results=[],n.missingIds=[]),t.defaults&&(n.attributionToken="",n.validateOnly=!1),e.results&&e.results.length){n.results=[];for(var o=0;o<e.results.length;++o)n.results[o]=p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.toObject(e.results[o],t)}if(null!=e.attributionToken&&e.hasOwnProperty("attributionToken")&&(n.attributionToken=e.attributionToken),e.missingIds&&e.missingIds.length){n.missingIds=[];for(o=0;o<e.missingIds.length;++o)n.missingIds[o]=e.missingIds[o]}return null!=e.validateOnly&&e.hasOwnProperty("validateOnly")&&(n.validateOnly=e.validateOnly),n},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.cloud.discoveryengine.v1beta.RecommendResponse"},ie.RecommendationResult=(ae.prototype.id="",ae.prototype.document=null,ae.prototype.metadata=c.emptyObject,ae.create=function(e){return new ae(e)},ae.encode=function(e,t){if(t=t||a.create(),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&p.google.cloud.discoveryengine.v1beta.Document.encode(e.document,t.uint32(18).fork()).ldelim(),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata"))for(var n=Object.keys(e.metadata),o=0;o<n.length;++o)t.uint32(26).fork().uint32(10).string(n[o]),p.google.protobuf.Value.encode(e.metadata[n[o]],t.uint32(18).fork()).ldelim().ldelim();return t},ae.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ae.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.id=e.string();break;case 2:o.document=p.google.cloud.discoveryengine.v1beta.Document.decode(e,e.uint32());break;case 3:o.metadata===c.emptyObject&&(o.metadata={});for(var i=e.uint32()+e.pos,a="",l=null;e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:a=e.string();break;case 2:l=p.google.protobuf.Value.decode(e,e.uint32());break;default:e.skipType(7&s)}}o.metadata[a]=l;break;default:e.skipType(7&r)}}return o},ae.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},ae.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!c.isString(e.id))return"id: string expected";if(null!=e.document&&e.hasOwnProperty("document")&&(t=p.google.cloud.discoveryengine.v1beta.Document.verify(e.document)))return"document."+t;if(null!=e.metadata&&e.hasOwnProperty("metadata")){if(!c.isObject(e.metadata))return"metadata: object expected";for(var t,n=Object.keys(e.metadata),o=0;o<n.length;++o)if(t=p.google.protobuf.Value.verify(e.metadata[n[o]]))return"metadata."+t}return null},ae.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult)return e;var t=new p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult;if(null!=e.id&&(t.id=String(e.id)),null!=e.document){if("object"!=typeof e.document)throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document: object expected");t.document=p.google.cloud.discoveryengine.v1beta.Document.fromObject(e.document)}if(e.metadata){if("object"!=typeof e.metadata)throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata: object expected");t.metadata={};for(var n=Object.keys(e.metadata),o=0;o<n.length;++o){if("object"!=typeof e.metadata[n[o]])throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata: object expected");t.metadata[n[o]]=p.google.protobuf.Value.fromObject(e.metadata[n[o]])}}return t},ae.toObject=function(e,t){var n,o={};if(((t=t||{}).objects||t.defaults)&&(o.metadata={}),t.defaults&&(o.id="",o.document=null),null!=e.id&&e.hasOwnProperty("id")&&(o.id=e.id),null!=e.document&&e.hasOwnProperty("document")&&(o.document=p.google.cloud.discoveryengine.v1beta.Document.toObject(e.document,t)),e.metadata&&(n=Object.keys(e.metadata)).length){o.metadata={};for(var r=0;r<n.length;++r)o.metadata[n[r]]=p.google.protobuf.Value.toObject(e.metadata[n[r]],t)}return 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.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult"},ae),ie),i.UserEventService=(((le.prototype=Object.create(o.rpc.Service.prototype)).constructor=le).create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(le.prototype.writeUserEvent=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.WriteUserEventRequest,p.google.cloud.discoveryengine.v1beta.UserEvent,t,n)},"name",{value:"WriteUserEvent"}),Object.defineProperty(le.prototype.collectUserEvent=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.CollectUserEventRequest,p.google.api.HttpBody,t,n)},"name",{value:"CollectUserEvent"}),Object.defineProperty(le.prototype.importUserEvents=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest,p.google.longrunning.Operation,t,n)},"name",{value:"ImportUserEvents"}),le),i.WriteUserEventRequest=(se.prototype.parent="",se.prototype.userEvent=null,Object.defineProperty(se.prototype,"_userEvent",{get:c.oneOfGetter(n=["userEvent"]),set:c.oneOfSetter(n)}),se.create=function(e){return new se(e)},se.encode=function(e,t){return t=t||a.create(),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.userEvent&&Object.hasOwnProperty.call(e,"userEvent")&&p.google.cloud.discoveryengine.v1beta.UserEvent.encode(e.userEvent,t.uint32(18).fork()).ldelim(),t},se.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},se.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.WriteUserEventRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.parent=e.string();break;case 2:o.userEvent=p.google.cloud.discoveryengine.v1beta.UserEvent.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},se.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},se.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.parent&&e.hasOwnProperty("parent")&&!c.isString(e.parent))return"parent: string expected";if(null!=e.userEvent&&e.hasOwnProperty("userEvent")){e=p.google.cloud.discoveryengine.v1beta.UserEvent.verify(e.userEvent);if(e)return"userEvent."+e}return null},se.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.WriteUserEventRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.WriteUserEventRequest;if(null!=e.parent&&(t.parent=String(e.parent)),null!=e.userEvent){if("object"!=typeof e.userEvent)throw TypeError(".google.cloud.discoveryengine.v1beta.WriteUserEventRequest.userEvent: object expected");t.userEvent=p.google.cloud.discoveryengine.v1beta.UserEvent.fromObject(e.userEvent)}return t},se.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.parent=""),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=e.parent),null!=e.userEvent&&e.hasOwnProperty("userEvent")&&(n.userEvent=p.google.cloud.discoveryengine.v1beta.UserEvent.toObject(e.userEvent,t),t.oneofs)&&(n._userEvent="userEvent"),n},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.cloud.discoveryengine.v1beta.WriteUserEventRequest"},se),i.CollectUserEventRequest=(O.prototype.parent="",O.prototype.userEvent="",O.prototype.uri=null,O.prototype.ets=null,Object.defineProperty(O.prototype,"_uri",{get:c.oneOfGetter(t=["uri"]),set:c.oneOfSetter(t)}),Object.defineProperty(O.prototype,"_ets",{get:c.oneOfGetter(t=["ets"]),set:c.oneOfSetter(t)}),O.create=function(e){return new O(e)},O.encode=function(e,t){return t=t||a.create(),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.userEvent&&Object.hasOwnProperty.call(e,"userEvent")&&t.uint32(18).string(e.userEvent),null!=e.uri&&Object.hasOwnProperty.call(e,"uri")&&t.uint32(26).string(e.uri),null!=e.ets&&Object.hasOwnProperty.call(e,"ets")&&t.uint32(32).int64(e.ets),t},O.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},O.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.CollectUserEventRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.parent=e.string();break;case 2:o.userEvent=e.string();break;case 3:o.uri=e.string();break;case 4:o.ets=e.int64();break;default:e.skipType(7&r)}}return o},O.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},O.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.parent&&e.hasOwnProperty("parent")&&!c.isString(e.parent)?"parent: string expected":null!=e.userEvent&&e.hasOwnProperty("userEvent")&&!c.isString(e.userEvent)?"userEvent: string expected":null!=e.uri&&e.hasOwnProperty("uri")&&!c.isString(e.uri)?"uri: string expected":null==e.ets||!e.hasOwnProperty("ets")||c.isInteger(e.ets)||e.ets&&c.isInteger(e.ets.low)&&c.isInteger(e.ets.high)?null:"ets: integer|Long expected"},O.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.CollectUserEventRequest?e:(t=new p.google.cloud.discoveryengine.v1beta.CollectUserEventRequest,null!=e.parent&&(t.parent=String(e.parent)),null!=e.userEvent&&(t.userEvent=String(e.userEvent)),null!=e.uri&&(t.uri=String(e.uri)),null!=e.ets&&(c.Long?(t.ets=c.Long.fromValue(e.ets)).unsigned=!1:"string"==typeof e.ets?t.ets=parseInt(e.ets,10):"number"==typeof e.ets?t.ets=e.ets:"object"==typeof e.ets&&(t.ets=new c.LongBits(e.ets.low>>>0,e.ets.high>>>0).toNumber())),t)},O.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.parent="",n.userEvent=""),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=e.parent),null!=e.userEvent&&e.hasOwnProperty("userEvent")&&(n.userEvent=e.userEvent),null!=e.uri&&e.hasOwnProperty("uri")&&(n.uri=e.uri,t.oneofs)&&(n._uri="uri"),null!=e.ets&&e.hasOwnProperty("ets")&&("number"==typeof e.ets?n.ets=t.longs===String?String(e.ets):e.ets:n.ets=t.longs===String?c.Long.prototype.toString.call(e.ets):t.longs===Number?new c.LongBits(e.ets.low>>>0,e.ets.high>>>0).toNumber():e.ets,t.oneofs)&&(n._ets="ets"),n},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.cloud.discoveryengine.v1beta.CollectUserEventRequest"},O),i),e),r),L.api=((n={}).ResourceDescriptor=(v.prototype.type="",v.prototype.pattern=c.emptyArray,v.prototype.nameField="",v.prototype.history=0,v.prototype.plural="",v.prototype.singular="",v.prototype.style=c.emptyArray,v.create=function(e){return new v(e)},v.encode=function(e,t){if(t=t||a.create(),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(10).string(e.type),null!=e.pattern&&e.pattern.length)for(var n=0;n<e.pattern.length;++n)t.uint32(18).string(e.pattern[n]);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(n=0;n<e.style.length;++n)t.int32(e.style[n]);t.ldelim()}return t},v.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},v.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.ResourceDescriptor;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.type=e.string();break;case 2:o.pattern&&o.pattern.length||(o.pattern=[]),o.pattern.push(e.string());break;case 3:o.nameField=e.string();break;case 4:o.history=e.int32();break;case 5:o.plural=e.string();break;case 6:o.singular=e.string();break;case 10:if(o.style&&o.style.length||(o.style=[]),2==(7&r))for(var i=e.uint32()+e.pos;e.pos<i;)o.style.push(e.int32());else o.style.push(e.int32());break;default:e.skipType(7&r)}}return o},v.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},v.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type")&&!c.isString(e.type))return"type: string expected";if(null!=e.pattern&&e.hasOwnProperty("pattern")){if(!Array.isArray(e.pattern))return"pattern: array expected";for(var t=0;t<e.pattern.length;++t)if(!c.isString(e.pattern[t]))return"pattern: string[] expected"}if(null!=e.nameField&&e.hasOwnProperty("nameField")&&!c.isString(e.nameField))return"nameField: string expected";if(null!=e.history&&e.hasOwnProperty("history"))switch(e.history){default:return"history: enum value expected";case 0:case 1:case 2:}if(null!=e.plural&&e.hasOwnProperty("plural")&&!c.isString(e.plural))return"plural: string expected";if(null!=e.singular&&e.hasOwnProperty("singular")&&!c.isString(e.singular))return"singular: string expected";if(null!=e.style&&e.hasOwnProperty("style")){if(!Array.isArray(e.style))return"style: array expected";for(t=0;t<e.style.length;++t)switch(e.style[t]){default:return"style: enum value[] expected";case 0:case 1:}}return null},v.fromObject=function(e){if(e instanceof p.google.api.ResourceDescriptor)return e;var t=new p.google.api.ResourceDescriptor;if(null!=e.type&&(t.type=String(e.type)),e.pattern){if(!Array.isArray(e.pattern))throw TypeError(".google.api.ResourceDescriptor.pattern: array expected");t.pattern=[];for(var n=0;n<e.pattern.length;++n)t.pattern[n]=String(e.pattern[n])}switch(null!=e.nameField&&(t.nameField=String(e.nameField)),e.history){default:"number"==typeof e.history&&(t.history=e.history);break;case"HISTORY_UNSPECIFIED":case 0:t.history=0;break;case"ORIGINALLY_SINGLE_PATTERN":case 1:t.history=1;break;case"FUTURE_MULTI_PATTERN":case 2:t.history=2}if(null!=e.plural&&(t.plural=String(e.plural)),null!=e.singular&&(t.singular=String(e.singular)),e.style){if(!Array.isArray(e.style))throw TypeError(".google.api.ResourceDescriptor.style: array expected");t.style=[];for(n=0;n<e.style.length;++n)switch(e.style[n]){default:if("number"==typeof e.style[n]){t.style[n]=e.style[n];break}case"STYLE_UNSPECIFIED":case 0:t.style[n]=0;break;case"DECLARATIVE_FRIENDLY":case 1:t.style[n]=1}}return t},v.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.pattern=[],n.style=[]),t.defaults&&(n.type="",n.nameField="",n.history=t.enums===String?"HISTORY_UNSPECIFIED":0,n.plural="",n.singular=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),e.pattern&&e.pattern.length){n.pattern=[];for(var o=0;o<e.pattern.length;++o)n.pattern[o]=e.pattern[o]}if(null!=e.nameField&&e.hasOwnProperty("nameField")&&(n.nameField=e.nameField),null!=e.history&&e.hasOwnProperty("history")&&(n.history=t.enums!==String||void 0===p.google.api.ResourceDescriptor.History[e.history]?e.history:p.google.api.ResourceDescriptor.History[e.history]),null!=e.plural&&e.hasOwnProperty("plural")&&(n.plural=e.plural),null!=e.singular&&e.hasOwnProperty("singular")&&(n.singular=e.singular),e.style&&e.style.length){n.style=[];for(o=0;o<e.style.length;++o)n.style[o]=t.enums!==String||void 0===p.google.api.ResourceDescriptor.Style[e.style[o]]?e.style[o]:p.google.api.ResourceDescriptor.Style[e.style[o]]}return n},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.api.ResourceDescriptor"},v.History=(t={},(i=Object.create(t))[t[0]="HISTORY_UNSPECIFIED"]=0,i[t[1]="ORIGINALLY_SINGLE_PATTERN"]=1,i[t[2]="FUTURE_MULTI_PATTERN"]=2,i),v.Style=(t={},(i=Object.create(t))[t[0]="STYLE_UNSPECIFIED"]=0,i[t[1]="DECLARATIVE_FRIENDLY"]=1,i),v),n.ResourceReference=(ue.prototype.type="",ue.prototype.childType="",ue.create=function(e){return new ue(e)},ue.encode=function(e,t){return t=t||a.create(),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},ue.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ue.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.ResourceReference;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.type=e.string();break;case 2:o.childType=e.string();break;default:e.skipType(7&r)}}return o},ue.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},ue.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type&&e.hasOwnProperty("type")&&!c.isString(e.type)?"type: string expected":null!=e.childType&&e.hasOwnProperty("childType")&&!c.isString(e.childType)?"childType: string expected":null},ue.fromObject=function(e){var t;return e instanceof p.google.api.ResourceReference?e:(t=new p.google.api.ResourceReference,null!=e.type&&(t.type=String(e.type)),null!=e.childType&&(t.childType=String(e.childType)),t)},ue.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.type="",n.childType=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.childType&&e.hasOwnProperty("childType")&&(n.childType=e.childType),n},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.api.ResourceReference"},ue),n.FieldBehavior=(t={},(i=Object.create(t))[t[0]="FIELD_BEHAVIOR_UNSPECIFIED"]=0,i[t[1]="OPTIONAL"]=1,i[t[2]="REQUIRED"]=2,i[t[3]="OUTPUT_ONLY"]=3,i[t[4]="INPUT_ONLY"]=4,i[t[5]="IMMUTABLE"]=5,i[t[6]="UNORDERED_LIST"]=6,i[t[7]="NON_EMPTY_DEFAULT"]=7,i),n.Http=(ce.prototype.rules=c.emptyArray,ce.prototype.fullyDecodeReservedExpansion=!1,ce.create=function(e){return new ce(e)},ce.encode=function(e,t){if(t=t||a.create(),null!=e.rules&&e.rules.length)for(var n=0;n<e.rules.length;++n)p.google.api.HttpRule.encode(e.rules[n],t.uint32(10).fork()).ldelim();return null!=e.fullyDecodeReservedExpansion&&Object.hasOwnProperty.call(e,"fullyDecodeReservedExpansion")&&t.uint32(16).bool(e.fullyDecodeReservedExpansion),t},ce.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ce.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.Http;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.rules&&o.rules.length||(o.rules=[]),o.rules.push(p.google.api.HttpRule.decode(e,e.uint32()));break;case 2:o.fullyDecodeReservedExpansion=e.bool();break;default:e.skipType(7&r)}}return o},ce.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},ce.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.rules&&e.hasOwnProperty("rules")){if(!Array.isArray(e.rules))return"rules: array expected";for(var t=0;t<e.rules.length;++t){var n=p.google.api.HttpRule.verify(e.rules[t]);if(n)return"rules."+n}}return null!=e.fullyDecodeReservedExpansion&&e.hasOwnProperty("fullyDecodeReservedExpansion")&&"boolean"!=typeof e.fullyDecodeReservedExpansion?"fullyDecodeReservedExpansion: boolean expected":null},ce.fromObject=function(e){if(e instanceof p.google.api.Http)return e;var t=new p.google.api.Http;if(e.rules){if(!Array.isArray(e.rules))throw TypeError(".google.api.Http.rules: array expected");t.rules=[];for(var n=0;n<e.rules.length;++n){if("object"!=typeof e.rules[n])throw TypeError(".google.api.Http.rules: object expected");t.rules[n]=p.google.api.HttpRule.fromObject(e.rules[n])}}return null!=e.fullyDecodeReservedExpansion&&(t.fullyDecodeReservedExpansion=Boolean(e.fullyDecodeReservedExpansion)),t},ce.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.rules=[]),t.defaults&&(n.fullyDecodeReservedExpansion=!1),e.rules&&e.rules.length){n.rules=[];for(var o=0;o<e.rules.length;++o)n.rules[o]=p.google.api.HttpRule.toObject(e.rules[o],t)}return null!=e.fullyDecodeReservedExpansion&&e.hasOwnProperty("fullyDecodeReservedExpansion")&&(n.fullyDecodeReservedExpansion=e.fullyDecodeReservedExpansion),n},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.api.Http"},ce),n.HttpRule=(w.prototype.selector="",w.prototype.get=null,w.prototype.put=null,w.prototype.post=null,w.prototype.delete=null,w.prototype.patch=null,w.prototype.custom=null,w.prototype.body="",w.prototype.responseBody="",w.prototype.additionalBindings=c.emptyArray,Object.defineProperty(w.prototype,"pattern",{get:c.oneOfGetter(t=["get","put","post","delete","patch","custom"]),set:c.oneOfSetter(t)}),w.create=function(e){return new w(e)},w.encode=function(e,t){if(t=t||a.create(),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")&&p.google.api.CustomHttpPattern.encode(e.custom,t.uint32(66).fork()).ldelim(),null!=e.additionalBindings&&e.additionalBindings.length)for(var n=0;n<e.additionalBindings.length;++n)p.google.api.HttpRule.encode(e.additionalBindings[n],t.uint32(90).fork()).ldelim();return null!=e.responseBody&&Object.hasOwnProperty.call(e,"responseBody")&&t.uint32(98).string(e.responseBody),t},w.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},w.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.HttpRule;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.selector=e.string();break;case 2:o.get=e.string();break;case 3:o.put=e.string();break;case 4:o.post=e.string();break;case 5:o.delete=e.string();break;case 6:o.patch=e.string();break;case 8:o.custom=p.google.api.CustomHttpPattern.decode(e,e.uint32());break;case 7:o.body=e.string();break;case 12:o.responseBody=e.string();break;case 11:o.additionalBindings&&o.additionalBindings.length||(o.additionalBindings=[]),o.additionalBindings.push(p.google.api.HttpRule.decode(e,e.uint32()));break;default:e.skipType(7&r)}}return o},w.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},w.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.selector&&e.hasOwnProperty("selector")&&!c.isString(e.selector))return"selector: string expected";if(null!=e.get&&e.hasOwnProperty("get")&&(t.pattern=1,!c.isString(e.get)))return"get: string expected";if(null!=e.put&&e.hasOwnProperty("put")){if(1===t.pattern)return"pattern: multiple values";if(t.pattern=1,!c.isString(e.put))return"put: string expected"}if(null!=e.post&&e.hasOwnProperty("post")){if(1===t.pattern)return"pattern: multiple values";if(t.pattern=1,!c.isString(e.post))return"post: string expected"}if(null!=e.delete&&e.hasOwnProperty("delete")){if(1===t.pattern)return"pattern: multiple values";if(t.pattern=1,!c.isString(e.delete))return"delete: string expected"}if(null!=e.patch&&e.hasOwnProperty("patch")){if(1===t.pattern)return"pattern: multiple values";if(t.pattern=1,!c.isString(e.patch))return"patch: string expected"}if(null!=e.custom&&e.hasOwnProperty("custom")){if(1===t.pattern)return"pattern: multiple values";if(t.pattern=1,n=p.google.api.CustomHttpPattern.verify(e.custom))return"custom."+n}if(null!=e.body&&e.hasOwnProperty("body")&&!c.isString(e.body))return"body: string expected";if(null!=e.responseBody&&e.hasOwnProperty("responseBody")&&!c.isString(e.responseBody))return"responseBody: string expected";if(null!=e.additionalBindings&&e.hasOwnProperty("additionalBindings")){if(!Array.isArray(e.additionalBindings))return"additionalBindings: array expected";for(var n,o=0;o<e.additionalBindings.length;++o)if(n=p.google.api.HttpRule.verify(e.additionalBindings[o]))return"additionalBindings."+n}return null},w.fromObject=function(e){if(e instanceof p.google.api.HttpRule)return e;var t=new p.google.api.HttpRule;if(null!=e.selector&&(t.selector=String(e.selector)),null!=e.get&&(t.get=String(e.get)),null!=e.put&&(t.put=String(e.put)),null!=e.post&&(t.post=String(e.post)),null!=e.delete&&(t.delete=String(e.delete)),null!=e.patch&&(t.patch=String(e.patch)),null!=e.custom){if("object"!=typeof e.custom)throw TypeError(".google.api.HttpRule.custom: object expected");t.custom=p.google.api.CustomHttpPattern.fromObject(e.custom)}if(null!=e.body&&(t.body=String(e.body)),null!=e.responseBody&&(t.responseBody=String(e.responseBody)),e.additionalBindings){if(!Array.isArray(e.additionalBindings))throw TypeError(".google.api.HttpRule.additionalBindings: array expected");t.additionalBindings=[];for(var n=0;n<e.additionalBindings.length;++n){if("object"!=typeof e.additionalBindings[n])throw TypeError(".google.api.HttpRule.additionalBindings: object expected");t.additionalBindings[n]=p.google.api.HttpRule.fromObject(e.additionalBindings[n])}}return t},w.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.additionalBindings=[]),t.defaults&&(n.selector="",n.body="",n.responseBody=""),null!=e.selector&&e.hasOwnProperty("selector")&&(n.selector=e.selector),null!=e.get&&e.hasOwnProperty("get")&&(n.get=e.get,t.oneofs)&&(n.pattern="get"),null!=e.put&&e.hasOwnProperty("put")&&(n.put=e.put,t.oneofs)&&(n.pattern="put"),null!=e.post&&e.hasOwnProperty("post")&&(n.post=e.post,t.oneofs)&&(n.pattern="post"),null!=e.delete&&e.hasOwnProperty("delete")&&(n.delete=e.delete,t.oneofs)&&(n.pattern="delete"),null!=e.patch&&e.hasOwnProperty("patch")&&(n.patch=e.patch,t.oneofs)&&(n.pattern="patch"),null!=e.body&&e.hasOwnProperty("body")&&(n.body=e.body),null!=e.custom&&e.hasOwnProperty("custom")&&(n.custom=p.google.api.CustomHttpPattern.toObject(e.custom,t),t.oneofs)&&(n.pattern="custom"),e.additionalBindings&&e.additionalBindings.length){n.additionalBindings=[];for(var o=0;o<e.additionalBindings.length;++o)n.additionalBindings[o]=p.google.api.HttpRule.toObject(e.additionalBindings[o],t)}return null!=e.responseBody&&e.hasOwnProperty("responseBody")&&(n.responseBody=e.responseBody),n},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.api.HttpRule"},w),n.CustomHttpPattern=(pe.prototype.kind="",pe.prototype.path="",pe.create=function(e){return new pe(e)},pe.encode=function(e,t){return t=t||a.create(),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},pe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},pe.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.CustomHttpPattern;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.kind=e.string();break;case 2:o.path=e.string();break;default:e.skipType(7&r)}}return o},pe.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},pe.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.kind&&e.hasOwnProperty("kind")&&!c.isString(e.kind)?"kind: string expected":null!=e.path&&e.hasOwnProperty("path")&&!c.isString(e.path)?"path: string expected":null},pe.fromObject=function(e){var t;return e instanceof p.google.api.CustomHttpPattern?e:(t=new p.google.api.CustomHttpPattern,null!=e.kind&&(t.kind=String(e.kind)),null!=e.path&&(t.path=String(e.path)),t)},pe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.kind="",n.path=""),null!=e.kind&&e.hasOwnProperty("kind")&&(n.kind=e.kind),null!=e.path&&e.hasOwnProperty("path")&&(n.path=e.path),n},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.api.CustomHttpPattern"},pe),n.CommonLanguageSettings=(ge.prototype.referenceDocsUri="",ge.prototype.destinations=c.emptyArray,ge.create=function(e){return new ge(e)},ge.encode=function(e,t){if(t=t||a.create(),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 n=0;n<e.destinations.length;++n)t.int32(e.destinations[n]);t.ldelim()}return t},ge.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ge.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.CommonLanguageSettings;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.referenceDocsUri=e.string();break;case 2:if(o.destinations&&o.destinations.length||(o.destinations=[]),2==(7&r))for(var i=e.uint32()+e.pos;e.pos<i;)o.destinations.push(e.int32());else o.destinations.push(e.int32());break;default:e.skipType(7&r)}}return o},ge.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},ge.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.referenceDocsUri&&e.hasOwnProperty("referenceDocsUri")&&!c.isString(e.referenceDocsUri))return"referenceDocsUri: string expected";if(null!=e.destinations&&e.hasOwnProperty("destinations")){if(!Array.isArray(e.destinations))return"destinations: array expected";for(var t=0;t<e.destinations.length;++t)switch(e.destinations[t]){default:return"destinations: enum value[] expected";case 0:case 10:case 20:}}return null},ge.fromObject=function(e){if(e instanceof p.google.api.CommonLanguageSettings)return e;var t=new p.google.api.CommonLanguageSettings;if(null!=e.referenceDocsUri&&(t.referenceDocsUri=String(e.referenceDocsUri)),e.destinations){if(!Array.isArray(e.destinations))throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected");t.destinations=[];for(var n=0;n<e.destinations.length;++n)switch(e.destinations[n]){default:if("number"==typeof e.destinations[n]){t.destinations[n]=e.destinations[n];break}case"CLIENT_LIBRARY_DESTINATION_UNSPECIFIED":case 0:t.destinations[n]=0;break;case"GITHUB":case 10:t.destinations[n]=10;break;case"PACKAGE_MANAGER":case 20:t.destinations[n]=20}}return t},ge.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.destinations=[]),t.defaults&&(n.referenceDocsUri=""),null!=e.referenceDocsUri&&e.hasOwnProperty("referenceDocsUri")&&(n.referenceDocsUri=e.referenceDocsUri),e.destinations&&e.destinations.length){n.destinations=[];for(var o=0;o<e.destinations.length;++o)n.destinations[o]=t.enums!==String||void 0===p.google.api.ClientLibraryDestination[e.destinations[o]]?e.destinations[o]:p.google.api.ClientLibraryDestination[e.destinations[o]]}return n},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.api.CommonLanguageSettings"},ge),n.ClientLibrarySettings=(S.prototype.version="",S.prototype.launchStage=0,S.prototype.restNumericEnums=!1,S.prototype.javaSettings=null,S.prototype.cppSettings=null,S.prototype.phpSettings=null,S.prototype.pythonSettings=null,S.prototype.nodeSettings=null,S.prototype.dotnetSettings=null,S.prototype.rubySettings=null,S.prototype.goSettings=null,S.create=function(e){return new S(e)},S.encode=function(e,t){return t=t||a.create(),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")&&p.google.api.JavaSettings.encode(e.javaSettings,t.uint32(170).fork()).ldelim(),null!=e.cppSettings&&Object.hasOwnProperty.call(e,"cppSettings")&&p.google.api.CppSettings.encode(e.cppSettings,t.uint32(178).fork()).ldelim(),null!=e.phpSettings&&Object.hasOwnProperty.call(e,"phpSettings")&&p.google.api.PhpSettings.encode(e.phpSettings,t.uint32(186).fork()).ldelim(),null!=e.pythonSettings&&Object.hasOwnProperty.call(e,"pythonSettings")&&p.google.api.PythonSettings.encode(e.pythonSettings,t.uint32(194).fork()).ldelim(),null!=e.nodeSettings&&Object.hasOwnProperty.call(e,"nodeSettings")&&p.google.api.NodeSettings.encode(e.nodeSettings,t.uint32(202).fork()).ldelim(),null!=e.dotnetSettings&&Object.hasOwnProperty.call(e,"dotnetSettings")&&p.google.api.DotnetSettings.encode(e.dotnetSettings,t.uint32(210).fork()).ldelim(),null!=e.rubySettings&&Object.hasOwnProperty.call(e,"rubySettings")&&p.google.api.RubySettings.encode(e.rubySettings,t.uint32(218).fork()).ldelim(),null!=e.goSettings&&Object.hasOwnProperty.call(e,"goSettings")&&p.google.api.GoSettings.encode(e.goSettings,t.uint32(226).fork()).ldelim(),t},S.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},S.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.ClientLibrarySettings;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.version=e.string();break;case 2:o.launchStage=e.int32();break;case 3:o.restNumericEnums=e.bool();break;case 21:o.javaSettings=p.google.api.JavaSettings.decode(e,e.uint32());break;case 22:o.cppSettings=p.google.api.CppSettings.decode(e,e.uint32());break;case 23:o.phpSettings=p.google.api.PhpSettings.decode(e,e.uint32());break;case 24:o.pythonSettings=p.google.api.PythonSettings.decode(e,e.uint32());break;case 25:o.nodeSettings=p.google.api.NodeSettings.decode(e,e.uint32());break;case 26:o.dotnetSettings=p.google.api.DotnetSettings.decode(e,e.uint32());break;case 27:o.rubySettings=p.google.api.RubySettings.decode(e,e.uint32());break;case 28:o.goSettings=p.google.api.GoSettings.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},S.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},S.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.version&&e.hasOwnProperty("version")&&!c.isString(e.version))return"version: string expected";if(null!=e.launchStage&&e.hasOwnProperty("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&&e.hasOwnProperty("restNumericEnums")&&"boolean"!=typeof e.restNumericEnums)return"restNumericEnums: boolean expected";var t;if(null!=e.javaSettings&&e.hasOwnProperty("javaSettings")&&(t=p.google.api.JavaSettings.verify(e.javaSettings)))return"javaSettings."+t;if(null!=e.cppSettings&&e.hasOwnProperty("cppSettings")&&(t=p.google.api.CppSettings.verify(e.cppSettings)))return"cppSettings."+t;if(null!=e.phpSettings&&e.hasOwnProperty("phpSettings")&&(t=p.google.api.PhpSettings.verify(e.phpSettings)))return"phpSettings."+t;if(null!=e.pythonSettings&&e.hasOwnProperty("pythonSettings")&&(t=p.google.api.PythonSettings.verify(e.pythonSettings)))return"pythonSettings."+t;if(null!=e.nodeSettings&&e.hasOwnProperty("nodeSettings")&&(t=p.google.api.NodeSettings.verify(e.nodeSettings)))return"nodeSettings."+t;if(null!=e.dotnetSettings&&e.hasOwnProperty("dotnetSettings")&&(t=p.google.api.DotnetSettings.verify(e.dotnetSettings)))return"dotnetSettings."+t;if(null!=e.rubySettings&&e.hasOwnProperty("rubySettings")&&(t=p.google.api.RubySettings.verify(e.rubySettings)))return"rubySettings."+t;if(null!=e.goSettings&&e.hasOwnProperty("goSettings")&&(t=p.google.api.GoSettings.verify(e.goSettings)))return"goSettings."+t;return null},S.fromObject=function(e){if(e instanceof p.google.api.ClientLibrarySettings)return e;var t=new p.google.api.ClientLibrarySettings;switch(null!=e.version&&(t.version=String(e.version)),e.launchStage){default:"number"==typeof e.launchStage&&(t.launchStage=e.launchStage);break;case"LAUNCH_STAGE_UNSPECIFIED":case 0:t.launchStage=0;break;case"UNIMPLEMENTED":case 6:t.launchStage=6;break;case"PRELAUNCH":case 7:t.launchStage=7;break;case"EARLY_ACCESS":case 1:t.launchStage=1;break;case"ALPHA":case 2:t.launchStage=2;break;case"BETA":case 3:t.launchStage=3;break;case"GA":case 4:t.launchStage=4;break;case"DEPRECATED":case 5:t.launchStage=5}if(null!=e.restNumericEnums&&(t.restNumericEnums=Boolean(e.restNumericEnums)),null!=e.javaSettings){if("object"!=typeof e.javaSettings)throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected");t.javaSettings=p.google.api.JavaSettings.fromObject(e.javaSettings)}if(null!=e.cppSettings){if("object"!=typeof e.cppSettings)throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected");t.cppSettings=p.google.api.CppSettings.fromObject(e.cppSettings)}if(null!=e.phpSettings){if("object"!=typeof e.phpSettings)throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected");t.phpSettings=p.google.api.PhpSettings.fromObject(e.phpSettings)}if(null!=e.pythonSettings){if("object"!=typeof e.pythonSettings)throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected");t.pythonSettings=p.google.api.PythonSettings.fromObject(e.pythonSettings)}if(null!=e.nodeSettings){if("object"!=typeof e.nodeSettings)throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected");t.nodeSettings=p.google.api.NodeSettings.fromObject(e.nodeSettings)}if(null!=e.dotnetSettings){if("object"!=typeof e.dotnetSettings)throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected");t.dotnetSettings=p.google.api.DotnetSettings.fromObject(e.dotnetSettings)}if(null!=e.rubySettings){if("object"!=typeof e.rubySettings)throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected");t.rubySettings=p.google.api.RubySettings.fromObject(e.rubySettings)}if(null!=e.goSettings){if("object"!=typeof e.goSettings)throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected");t.goSettings=p.google.api.GoSettings.fromObject(e.goSettings)}return t},S.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.version="",n.launchStage=t.enums===String?"LAUNCH_STAGE_UNSPECIFIED":0,n.restNumericEnums=!1,n.javaSettings=null,n.cppSettings=null,n.phpSettings=null,n.pythonSettings=null,n.nodeSettings=null,n.dotnetSettings=null,n.rubySettings=null,n.goSettings=null),null!=e.version&&e.hasOwnProperty("version")&&(n.version=e.version),null!=e.launchStage&&e.hasOwnProperty("launchStage")&&(n.launchStage=t.enums!==String||void 0===p.google.api.LaunchStage[e.launchStage]?e.launchStage:p.google.api.LaunchStage[e.launchStage]),null!=e.restNumericEnums&&e.hasOwnProperty("restNumericEnums")&&(n.restNumericEnums=e.restNumericEnums),null!=e.javaSettings&&e.hasOwnProperty("javaSettings")&&(n.javaSettings=p.google.api.JavaSettings.toObject(e.javaSettings,t)),null!=e.cppSettings&&e.hasOwnProperty("cppSettings")&&(n.cppSettings=p.google.api.CppSettings.toObject(e.cppSettings,t)),null!=e.phpSettings&&e.hasOwnProperty("phpSettings")&&(n.phpSettings=p.google.api.PhpSettings.toObject(e.phpSettings,t)),null!=e.pythonSettings&&e.hasOwnProperty("pythonSettings")&&(n.pythonSettings=p.google.api.PythonSettings.toObject(e.pythonSettings,t)),null!=e.nodeSettings&&e.hasOwnProperty("nodeSettings")&&(n.nodeSettings=p.google.api.NodeSettings.toObject(e.nodeSettings,t)),null!=e.dotnetSettings&&e.hasOwnProperty("dotnetSettings")&&(n.dotnetSettings=p.google.api.DotnetSettings.toObject(e.dotnetSettings,t)),null!=e.rubySettings&&e.hasOwnProperty("rubySettings")&&(n.rubySettings=p.google.api.RubySettings.toObject(e.rubySettings,t)),null!=e.goSettings&&e.hasOwnProperty("goSettings")&&(n.goSettings=p.google.api.GoSettings.toObject(e.goSettings,t)),n},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.api.ClientLibrarySettings"},S),n.Publishing=(j.prototype.methodSettings=c.emptyArray,j.prototype.newIssueUri="",j.prototype.documentationUri="",j.prototype.apiShortName="",j.prototype.githubLabel="",j.prototype.codeownerGithubTeams=c.emptyArray,j.prototype.docTagPrefix="",j.prototype.organization=0,j.prototype.librarySettings=c.emptyArray,j.create=function(e){return new j(e)},j.encode=function(e,t){if(t=t||a.create(),null!=e.methodSettings&&e.methodSettings.length)for(var n=0;n<e.methodSettings.length;++n)p.google.api.MethodSettings.encode(e.methodSettings[n],t.uint32(18).fork()).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(n=0;n<e.codeownerGithubTeams.length;++n)t.uint32(842).string(e.codeownerGithubTeams[n]);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(n=0;n<e.librarySettings.length;++n)p.google.api.ClientLibrarySettings.encode(e.librarySettings[n],t.uint32(874).fork()).ldelim();return t},j.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},j.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.Publishing;e.pos<n;){var r=e.uint32();switch(r>>>3){case 2:o.methodSettings&&o.methodSettings.length||(o.methodSettings=[]),o.methodSettings.push(p.google.api.MethodSettings.decode(e,e.uint32()));break;case 101:o.newIssueUri=e.string();break;case 102:o.documentationUri=e.string();break;case 103:o.apiShortName=e.string();break;case 104:o.githubLabel=e.string();break;case 105:o.codeownerGithubTeams&&o.codeownerGithubTeams.length||(o.codeownerGithubTeams=[]),o.codeownerGithubTeams.push(e.string());break;case 106:o.docTagPrefix=e.string();break;case 107:o.organization=e.int32();break;case 109:o.librarySettings&&o.librarySettings.length||(o.librarySettings=[]),o.librarySettings.push(p.google.api.ClientLibrarySettings.decode(e,e.uint32()));break;default:e.skipType(7&r)}}return o},j.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},j.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.methodSettings&&e.hasOwnProperty("methodSettings")){if(!Array.isArray(e.methodSettings))return"methodSettings: array expected";for(var t=0;t<e.methodSettings.length;++t)if(n=p.google.api.MethodSettings.verify(e.methodSettings[t]))return"methodSettings."+n}if(null!=e.newIssueUri&&e.hasOwnProperty("newIssueUri")&&!c.isString(e.newIssueUri))return"newIssueUri: string expected";if(null!=e.documentationUri&&e.hasOwnProperty("documentationUri")&&!c.isString(e.documentationUri))return"documentationUri: string expected";if(null!=e.apiShortName&&e.hasOwnProperty("apiShortName")&&!c.isString(e.apiShortName))return"apiShortName: string expected";if(null!=e.githubLabel&&e.hasOwnProperty("githubLabel")&&!c.isString(e.githubLabel))return"githubLabel: string expected";if(null!=e.codeownerGithubTeams&&e.hasOwnProperty("codeownerGithubTeams")){if(!Array.isArray(e.codeownerGithubTeams))return"codeownerGithubTeams: array expected";for(t=0;t<e.codeownerGithubTeams.length;++t)if(!c.isString(e.codeownerGithubTeams[t]))return"codeownerGithubTeams: string[] expected"}if(null!=e.docTagPrefix&&e.hasOwnProperty("docTagPrefix")&&!c.isString(e.docTagPrefix))return"docTagPrefix: string expected";if(null!=e.organization&&e.hasOwnProperty("organization"))switch(e.organization){default:return"organization: enum value expected";case 0:case 1:case 2:case 3:case 4:}if(null!=e.librarySettings&&e.hasOwnProperty("librarySettings")){if(!Array.isArray(e.librarySettings))return"librarySettings: array expected";for(var n,t=0;t<e.librarySettings.length;++t)if(n=p.google.api.ClientLibrarySettings.verify(e.librarySettings[t]))return"librarySettings."+n}return null},j.fromObject=function(e){if(e instanceof p.google.api.Publishing)return e;var t=new p.google.api.Publishing;if(e.methodSettings){if(!Array.isArray(e.methodSettings))throw TypeError(".google.api.Publishing.methodSettings: array expected");t.methodSettings=[];for(var n=0;n<e.methodSettings.length;++n){if("object"!=typeof e.methodSettings[n])throw TypeError(".google.api.Publishing.methodSettings: object expected");t.methodSettings[n]=p.google.api.MethodSettings.fromObject(e.methodSettings[n])}}if(null!=e.newIssueUri&&(t.newIssueUri=String(e.newIssueUri)),null!=e.documentationUri&&(t.documentationUri=String(e.documentationUri)),null!=e.apiShortName&&(t.apiShortName=String(e.apiShortName)),null!=e.githubLabel&&(t.githubLabel=String(e.githubLabel)),e.codeownerGithubTeams){if(!Array.isArray(e.codeownerGithubTeams))throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected");t.codeownerGithubTeams=[];for(n=0;n<e.codeownerGithubTeams.length;++n)t.codeownerGithubTeams[n]=String(e.codeownerGithubTeams[n])}switch(null!=e.docTagPrefix&&(t.docTagPrefix=String(e.docTagPrefix)),e.organization){default:"number"==typeof e.organization&&(t.organization=e.organization);break;case"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED":case 0:t.organization=0;break;case"CLOUD":case 1:t.organization=1;break;case"ADS":case 2:t.organization=2;break;case"PHOTOS":case 3:t.organization=3;break;case"STREET_VIEW":case 4:t.organization=4}if(e.librarySettings){if(!Array.isArray(e.librarySettings))throw TypeError(".google.api.Publishing.librarySettings: array expected");t.librarySettings=[];for(n=0;n<e.librarySettings.length;++n){if("object"!=typeof e.librarySettings[n])throw TypeError(".google.api.Publishing.librarySettings: object expected");t.librarySettings[n]=p.google.api.ClientLibrarySettings.fromObject(e.librarySettings[n])}}return t},j.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.methodSettings=[],n.codeownerGithubTeams=[],n.librarySettings=[]),t.defaults&&(n.newIssueUri="",n.documentationUri="",n.apiShortName="",n.githubLabel="",n.docTagPrefix="",n.organization=t.enums===String?"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED":0),e.methodSettings&&e.methodSettings.length){n.methodSettings=[];for(var o=0;o<e.methodSettings.length;++o)n.methodSettings[o]=p.google.api.MethodSettings.toObject(e.methodSettings[o],t)}if(null!=e.newIssueUri&&e.hasOwnProperty("newIssueUri")&&(n.newIssueUri=e.newIssueUri),null!=e.documentationUri&&e.hasOwnProperty("documentationUri")&&(n.documentationUri=e.documentationUri),null!=e.apiShortName&&e.hasOwnProperty("apiShortName")&&(n.apiShortName=e.apiShortName),null!=e.githubLabel&&e.hasOwnProperty("githubLabel")&&(n.githubLabel=e.githubLabel),e.codeownerGithubTeams&&e.codeownerGithubTeams.length){n.codeownerGithubTeams=[];for(o=0;o<e.codeownerGithubTeams.length;++o)n.codeownerGithubTeams[o]=e.codeownerGithubTeams[o]}if(null!=e.docTagPrefix&&e.hasOwnProperty("docTagPrefix")&&(n.docTagPrefix=e.docTagPrefix),null!=e.organization&&e.hasOwnProperty("organization")&&(n.organization=t.enums!==String||void 0===p.google.api.ClientLibraryOrganization[e.organization]?e.organization:p.google.api.ClientLibraryOrganization[e.organization]),e.librarySettings&&e.librarySettings.length){n.librarySettings=[];for(o=0;o<e.librarySettings.length;++o)n.librarySettings[o]=p.google.api.ClientLibrarySettings.toObject(e.librarySettings[o],t)}return n},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.api.Publishing"},j),n.JavaSettings=(de.prototype.libraryPackage="",de.prototype.serviceClassNames=c.emptyObject,de.prototype.common=null,de.create=function(e){return new de(e)},de.encode=function(e,t){if(t=t||a.create(),null!=e.libraryPackage&&Object.hasOwnProperty.call(e,"libraryPackage")&&t.uint32(10).string(e.libraryPackage),null!=e.serviceClassNames&&Object.hasOwnProperty.call(e,"serviceClassNames"))for(var n=Object.keys(e.serviceClassNames),o=0;o<n.length;++o)t.uint32(18).fork().uint32(10).string(n[o]).uint32(18).string(e.serviceClassNames[n[o]]).ldelim();return null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(26).fork()).ldelim(),t},de.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},de.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.JavaSettings;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.libraryPackage=e.string();break;case 2:o.serviceClassNames===c.emptyObject&&(o.serviceClassNames={});for(var i=e.uint32()+e.pos,a="",l="";e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:a=e.string();break;case 2:l=e.string();break;default:e.skipType(7&s)}}o.serviceClassNames[a]=l;break;case 3:o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},de.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},de.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.libraryPackage&&e.hasOwnProperty("libraryPackage")&&!c.isString(e.libraryPackage))return"libraryPackage: string expected";if(null!=e.serviceClassNames&&e.hasOwnProperty("serviceClassNames")){if(!c.isObject(e.serviceClassNames))return"serviceClassNames: object expected";for(var t=Object.keys(e.serviceClassNames),n=0;n<t.length;++n)if(!c.isString(e.serviceClassNames[t[n]]))return"serviceClassNames: string{k:string} expected"}if(null!=e.common&&e.hasOwnProperty("common")){var o=p.google.api.CommonLanguageSettings.verify(e.common);if(o)return"common."+o}return null},de.fromObject=function(e){if(e instanceof p.google.api.JavaSettings)return e;var t=new p.google.api.JavaSettings;if(null!=e.libraryPackage&&(t.libraryPackage=String(e.libraryPackage)),e.serviceClassNames){if("object"!=typeof e.serviceClassNames)throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected");t.serviceClassNames={};for(var n=Object.keys(e.serviceClassNames),o=0;o<n.length;++o)t.serviceClassNames[n[o]]=String(e.serviceClassNames[n[o]])}if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.JavaSettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},de.toObject=function(e,t){var n,o={};if(((t=t||{}).objects||t.defaults)&&(o.serviceClassNames={}),t.defaults&&(o.libraryPackage="",o.common=null),null!=e.libraryPackage&&e.hasOwnProperty("libraryPackage")&&(o.libraryPackage=e.libraryPackage),e.serviceClassNames&&(n=Object.keys(e.serviceClassNames)).length){o.serviceClassNames={};for(var r=0;r<n.length;++r)o.serviceClassNames[n[r]]=e.serviceClassNames[n[r]]}return null!=e.common&&e.hasOwnProperty("common")&&(o.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),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.api.JavaSettings"},de),n.CppSettings=(fe.prototype.common=null,fe.create=function(e){return new fe(e)},fe.encode=function(e,t){return t=t||a.create(),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork()).ldelim(),t},fe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},fe.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.CppSettings;e.pos<n;){var r=e.uint32();r>>>3==1?o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32()):e.skipType(7&r)}return o},fe.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},fe.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.common&&e.hasOwnProperty("common")){e=p.google.api.CommonLanguageSettings.verify(e.common);if(e)return"common."+e}return null},fe.fromObject=function(e){if(e instanceof p.google.api.CppSettings)return e;var t=new p.google.api.CppSettings;if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.CppSettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},fe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.common=null),null!=e.common&&e.hasOwnProperty("common")&&(n.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),n},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.api.CppSettings"},fe),n.PhpSettings=(ye.prototype.common=null,ye.create=function(e){return new ye(e)},ye.encode=function(e,t){return t=t||a.create(),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork()).ldelim(),t},ye.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ye.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.PhpSettings;e.pos<n;){var r=e.uint32();r>>>3==1?o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32()):e.skipType(7&r)}return o},ye.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},ye.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.common&&e.hasOwnProperty("common")){e=p.google.api.CommonLanguageSettings.verify(e.common);if(e)return"common."+e}return null},ye.fromObject=function(e){if(e instanceof p.google.api.PhpSettings)return e;var t=new p.google.api.PhpSettings;if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.PhpSettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},ye.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.common=null),null!=e.common&&e.hasOwnProperty("common")&&(n.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),n},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.api.PhpSettings"},ye),n.PythonSettings=(me.prototype.common=null,me.create=function(e){return new me(e)},me.encode=function(e,t){return t=t||a.create(),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork()).ldelim(),t},me.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},me.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.PythonSettings;e.pos<n;){var r=e.uint32();r>>>3==1?o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32()):e.skipType(7&r)}return o},me.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},me.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.common&&e.hasOwnProperty("common")){e=p.google.api.CommonLanguageSettings.verify(e.common);if(e)return"common."+e}return null},me.fromObject=function(e){if(e instanceof p.google.api.PythonSettings)return e;var t=new p.google.api.PythonSettings;if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.PythonSettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},me.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.common=null),null!=e.common&&e.hasOwnProperty("common")&&(n.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),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.api.PythonSettings"},me),n.NodeSettings=(be.prototype.common=null,be.create=function(e){return new be(e)},be.encode=function(e,t){return t=t||a.create(),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork()).ldelim(),t},be.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},be.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.NodeSettings;e.pos<n;){var r=e.uint32();r>>>3==1?o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32()):e.skipType(7&r)}return o},be.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},be.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.common&&e.hasOwnProperty("common")){e=p.google.api.CommonLanguageSettings.verify(e.common);if(e)return"common."+e}return null},be.fromObject=function(e){if(e instanceof p.google.api.NodeSettings)return e;var t=new p.google.api.NodeSettings;if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.NodeSettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},be.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.common=null),null!=e.common&&e.hasOwnProperty("common")&&(n.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),n},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.api.NodeSettings"},be),n.DotnetSettings=(he.prototype.common=null,he.create=function(e){return new he(e)},he.encode=function(e,t){return t=t||a.create(),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork()).ldelim(),t},he.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},he.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.DotnetSettings;e.pos<n;){var r=e.uint32();r>>>3==1?o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32()):e.skipType(7&r)}return o},he.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},he.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.common&&e.hasOwnProperty("common")){e=p.google.api.CommonLanguageSettings.verify(e.common);if(e)return"common."+e}return null},he.fromObject=function(e){if(e instanceof p.google.api.DotnetSettings)return e;var t=new p.google.api.DotnetSettings;if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.DotnetSettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},he.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.common=null),null!=e.common&&e.hasOwnProperty("common")&&(n.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),n},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.api.DotnetSettings"},he),n.RubySettings=(Oe.prototype.common=null,Oe.create=function(e){return new Oe(e)},Oe.encode=function(e,t){return t=t||a.create(),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork()).ldelim(),t},Oe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Oe.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.RubySettings;e.pos<n;){var r=e.uint32();r>>>3==1?o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32()):e.skipType(7&r)}return o},Oe.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Oe.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.common&&e.hasOwnProperty("common")){e=p.google.api.CommonLanguageSettings.verify(e.common);if(e)return"common."+e}return null},Oe.fromObject=function(e){if(e instanceof p.google.api.RubySettings)return e;var t=new p.google.api.RubySettings;if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.RubySettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},Oe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.common=null),null!=e.common&&e.hasOwnProperty("common")&&(n.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),n},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.api.RubySettings"},Oe),n.GoSettings=(ve.prototype.common=null,ve.create=function(e){return new ve(e)},ve.encode=function(e,t){return t=t||a.create(),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork()).ldelim(),t},ve.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ve.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.GoSettings;e.pos<n;){var r=e.uint32();r>>>3==1?o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32()):e.skipType(7&r)}return o},ve.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},ve.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.common&&e.hasOwnProperty("common")){e=p.google.api.CommonLanguageSettings.verify(e.common);if(e)return"common."+e}return null},ve.fromObject=function(e){if(e instanceof p.google.api.GoSettings)return e;var t=new p.google.api.GoSettings;if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.GoSettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},ve.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.common=null),null!=e.common&&e.hasOwnProperty("common")&&(n.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),n},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.api.GoSettings"},ve),n.MethodSettings=(we.prototype.selector="",we.prototype.longRunning=null,we.create=function(e){return new we(e)},we.encode=function(e,t){return t=t||a.create(),null!=e.selector&&Object.hasOwnProperty.call(e,"selector")&&t.uint32(10).string(e.selector),null!=e.longRunning&&Object.hasOwnProperty.call(e,"longRunning")&&p.google.api.MethodSettings.LongRunning.encode(e.longRunning,t.uint32(18).fork()).ldelim(),t},we.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},we.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.MethodSettings;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.selector=e.string();break;case 2:o.longRunning=p.google.api.MethodSettings.LongRunning.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},we.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},we.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.selector&&e.hasOwnProperty("selector")&&!c.isString(e.selector))return"selector: string expected";if(null!=e.longRunning&&e.hasOwnProperty("longRunning")){e=p.google.api.MethodSettings.LongRunning.verify(e.longRunning);if(e)return"longRunning."+e}return null},we.fromObject=function(e){if(e instanceof p.google.api.MethodSettings)return e;var t=new p.google.api.MethodSettings;if(null!=e.selector&&(t.selector=String(e.selector)),null!=e.longRunning){if("object"!=typeof e.longRunning)throw TypeError(".google.api.MethodSettings.longRunning: object expected");t.longRunning=p.google.api.MethodSettings.LongRunning.fromObject(e.longRunning)}return t},we.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.selector="",n.longRunning=null),null!=e.selector&&e.hasOwnProperty("selector")&&(n.selector=e.selector),null!=e.longRunning&&e.hasOwnProperty("longRunning")&&(n.longRunning=p.google.api.MethodSettings.LongRunning.toObject(e.longRunning,t)),n},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.api.MethodSettings"},we.LongRunning=(Se.prototype.initialPollDelay=null,Se.prototype.pollDelayMultiplier=0,Se.prototype.maxPollDelay=null,Se.prototype.totalPollTimeout=null,Se.create=function(e){return new Se(e)},Se.encode=function(e,t){return t=t||a.create(),null!=e.initialPollDelay&&Object.hasOwnProperty.call(e,"initialPollDelay")&&p.google.protobuf.Duration.encode(e.initialPollDelay,t.uint32(10).fork()).ldelim(),null!=e.pollDelayMultiplier&&Object.hasOwnProperty.call(e,"pollDelayMultiplier")&&t.uint32(21).float(e.pollDelayMultiplier),null!=e.maxPollDelay&&Object.hasOwnProperty.call(e,"maxPollDelay")&&p.google.protobuf.Duration.encode(e.maxPollDelay,t.uint32(26).fork()).ldelim(),null!=e.totalPollTimeout&&Object.hasOwnProperty.call(e,"totalPollTimeout")&&p.google.protobuf.Duration.encode(e.totalPollTimeout,t.uint32(34).fork()).ldelim(),t},Se.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Se.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.MethodSettings.LongRunning;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.initialPollDelay=p.google.protobuf.Duration.decode(e,e.uint32());break;case 2:o.pollDelayMultiplier=e.float();break;case 3:o.maxPollDelay=p.google.protobuf.Duration.decode(e,e.uint32());break;case 4:o.totalPollTimeout=p.google.protobuf.Duration.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},Se.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Se.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t;if(null!=e.initialPollDelay&&e.hasOwnProperty("initialPollDelay")&&(t=p.google.protobuf.Duration.verify(e.initialPollDelay)))return"initialPollDelay."+t;if(null!=e.pollDelayMultiplier&&e.hasOwnProperty("pollDelayMultiplier")&&"number"!=typeof e.pollDelayMultiplier)return"pollDelayMultiplier: number expected";if(null!=e.maxPollDelay&&e.hasOwnProperty("maxPollDelay")&&(t=p.google.protobuf.Duration.verify(e.maxPollDelay)))return"maxPollDelay."+t;if(null!=e.totalPollTimeout&&e.hasOwnProperty("totalPollTimeout")&&(t=p.google.protobuf.Duration.verify(e.totalPollTimeout)))return"totalPollTimeout."+t;return null},Se.fromObject=function(e){if(e instanceof p.google.api.MethodSettings.LongRunning)return e;var t=new p.google.api.MethodSettings.LongRunning;if(null!=e.initialPollDelay){if("object"!=typeof e.initialPollDelay)throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected");t.initialPollDelay=p.google.protobuf.Duration.fromObject(e.initialPollDelay)}if(null!=e.pollDelayMultiplier&&(t.pollDelayMultiplier=Number(e.pollDelayMultiplier)),null!=e.maxPollDelay){if("object"!=typeof e.maxPollDelay)throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected");t.maxPollDelay=p.google.protobuf.Duration.fromObject(e.maxPollDelay)}if(null!=e.totalPollTimeout){if("object"!=typeof e.totalPollTimeout)throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected");t.totalPollTimeout=p.google.protobuf.Duration.fromObject(e.totalPollTimeout)}return t},Se.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.initialPollDelay=null,n.pollDelayMultiplier=0,n.maxPollDelay=null,n.totalPollTimeout=null),null!=e.initialPollDelay&&e.hasOwnProperty("initialPollDelay")&&(n.initialPollDelay=p.google.protobuf.Duration.toObject(e.initialPollDelay,t)),null!=e.pollDelayMultiplier&&e.hasOwnProperty("pollDelayMultiplier")&&(n.pollDelayMultiplier=t.json&&!isFinite(e.pollDelayMultiplier)?String(e.pollDelayMultiplier):e.pollDelayMultiplier),null!=e.maxPollDelay&&e.hasOwnProperty("maxPollDelay")&&(n.maxPollDelay=p.google.protobuf.Duration.toObject(e.maxPollDelay,t)),null!=e.totalPollTimeout&&e.hasOwnProperty("totalPollTimeout")&&(n.totalPollTimeout=p.google.protobuf.Duration.toObject(e.totalPollTimeout,t)),n},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.api.MethodSettings.LongRunning"},Se),we),n.ClientLibraryOrganization=(i={},(t=Object.create(i))[i[0]="CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"]=0,t[i[1]="CLOUD"]=1,t[i[2]="ADS"]=2,t[i[3]="PHOTOS"]=3,t[i[4]="STREET_VIEW"]=4,t),n.ClientLibraryDestination=(i={},(t=Object.create(i))[i[0]="CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"]=0,t[i[10]="GITHUB"]=10,t[i[20]="PACKAGE_MANAGER"]=20,t),n.LaunchStage=(i={},(t=Object.create(i))[i[0]="LAUNCH_STAGE_UNSPECIFIED"]=0,t[i[6]="UNIMPLEMENTED"]=6,t[i[7]="PRELAUNCH"]=7,t[i[1]="EARLY_ACCESS"]=1,t[i[2]="ALPHA"]=2,t[i[3]="BETA"]=3,t[i[4]="GA"]=4,t[i[5]="DEPRECATED"]=5,t),n.HttpBody=(je.prototype.contentType="",je.prototype.data=c.newBuffer([]),je.prototype.extensions=c.emptyArray,je.create=function(e){return new je(e)},je.encode=function(e,t){if(t=t||a.create(),null!=e.contentType&&Object.hasOwnProperty.call(e,"contentType")&&t.uint32(10).string(e.contentType),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(18).bytes(e.data),null!=e.extensions&&e.extensions.length)for(var n=0;n<e.extensions.length;++n)p.google.protobuf.Any.encode(e.extensions[n],t.uint32(26).fork()).ldelim();return t},je.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},je.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.HttpBody;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.contentType=e.string();break;case 2:o.data=e.bytes();break;case 3:o.extensions&&o.extensions.length||(o.extensions=[]),o.extensions.push(p.google.protobuf.Any.decode(e,e.uint32()));break;default:e.skipType(7&r)}}return o},je.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},je.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.contentType&&e.hasOwnProperty("contentType")&&!c.isString(e.contentType))return"contentType: string expected";if(null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||c.isString(e.data)))return"data: buffer expected";if(null!=e.extensions&&e.hasOwnProperty("extensions")){if(!Array.isArray(e.extensions))return"extensions: array expected";for(var t=0;t<e.extensions.length;++t){var n=p.google.protobuf.Any.verify(e.extensions[t]);if(n)return"extensions."+n}}return null},je.fromObject=function(e){if(e instanceof p.google.api.HttpBody)return e;var t=new p.google.api.HttpBody;if(null!=e.contentType&&(t.contentType=String(e.contentType)),null!=e.data&&("string"==typeof e.data?c.base64.decode(e.data,t.data=c.newBuffer(c.base64.length(e.data)),0):0<=e.data.length&&(t.data=e.data)),e.extensions){if(!Array.isArray(e.extensions))throw TypeError(".google.api.HttpBody.extensions: array expected");t.extensions=[];for(var n=0;n<e.extensions.length;++n){if("object"!=typeof e.extensions[n])throw TypeError(".google.api.HttpBody.extensions: object expected");t.extensions[n]=p.google.protobuf.Any.fromObject(e.extensions[n])}}return t},je.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.extensions=[]),t.defaults&&(n.contentType="",t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=c.newBuffer(n.data)))),null!=e.contentType&&e.hasOwnProperty("contentType")&&(n.contentType=e.contentType),null!=e.data&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?c.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),e.extensions&&e.extensions.length){n.extensions=[];for(var o=0;o<e.extensions.length;++o)n.extensions[o]=p.google.protobuf.Any.toObject(e.extensions[o],t)}return n},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.api.HttpBody"},je),n),L.protobuf=((e={}).FileDescriptorSet=(Pe.prototype.file=c.emptyArray,Pe.create=function(e){return new Pe(e)},Pe.encode=function(e,t){if(t=t||a.create(),null!=e.file&&e.file.length)for(var n=0;n<e.file.length;++n)p.google.protobuf.FileDescriptorProto.encode(e.file[n],t.uint32(10).fork()).ldelim();return t},Pe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Pe.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.FileDescriptorSet;e.pos<n;){var r=e.uint32();r>>>3==1?(o.file&&o.file.length||(o.file=[]),o.file.push(p.google.protobuf.FileDescriptorProto.decode(e,e.uint32()))):e.skipType(7&r)}return o},Pe.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Pe.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.file&&e.hasOwnProperty("file")){if(!Array.isArray(e.file))return"file: array expected";for(var t=0;t<e.file.length;++t){var n=p.google.protobuf.FileDescriptorProto.verify(e.file[t]);if(n)return"file."+n}}return null},Pe.fromObject=function(e){if(e instanceof p.google.protobuf.FileDescriptorSet)return e;var t=new p.google.protobuf.FileDescriptorSet;if(e.file){if(!Array.isArray(e.file))throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected");t.file=[];for(var n=0;n<e.file.length;++n){if("object"!=typeof e.file[n])throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected");t.file[n]=p.google.protobuf.FileDescriptorProto.fromObject(e.file[n])}}return t},Pe.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.file=[]),e.file&&e.file.length){n.file=[];for(var o=0;o<e.file.length;++o)n.file[o]=p.google.protobuf.FileDescriptorProto.toObject(e.file[o],t)}return n},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.protobuf.FileDescriptorSet"},Pe),e.FileDescriptorProto=(P.prototype.name="",P.prototype.package="",P.prototype.dependency=c.emptyArray,P.prototype.publicDependency=c.emptyArray,P.prototype.weakDependency=c.emptyArray,P.prototype.messageType=c.emptyArray,P.prototype.enumType=c.emptyArray,P.prototype.service=c.emptyArray,P.prototype.extension=c.emptyArray,P.prototype.options=null,P.prototype.sourceCodeInfo=null,P.prototype.syntax="",P.prototype.edition="",P.create=function(e){return new P(e)},P.encode=function(e,t){if(t=t||a.create(),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 n=0;n<e.dependency.length;++n)t.uint32(26).string(e.dependency[n]);if(null!=e.messageType&&e.messageType.length)for(n=0;n<e.messageType.length;++n)p.google.protobuf.DescriptorProto.encode(e.messageType[n],t.uint32(34).fork()).ldelim();if(null!=e.enumType&&e.enumType.length)for(n=0;n<e.enumType.length;++n)p.google.protobuf.EnumDescriptorProto.encode(e.enumType[n],t.uint32(42).fork()).ldelim();if(null!=e.service&&e.service.length)for(n=0;n<e.service.length;++n)p.google.protobuf.ServiceDescriptorProto.encode(e.service[n],t.uint32(50).fork()).ldelim();if(null!=e.extension&&e.extension.length)for(n=0;n<e.extension.length;++n)p.google.protobuf.FieldDescriptorProto.encode(e.extension[n],t.uint32(58).fork()).ldelim();if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&p.google.protobuf.FileOptions.encode(e.options,t.uint32(66).fork()).ldelim(),null!=e.sourceCodeInfo&&Object.hasOwnProperty.call(e,"sourceCodeInfo")&&p.google.protobuf.SourceCodeInfo.encode(e.sourceCodeInfo,t.uint32(74).fork()).ldelim(),null!=e.publicDependency&&e.publicDependency.length)for(n=0;n<e.publicDependency.length;++n)t.uint32(80).int32(e.publicDependency[n]);if(null!=e.weakDependency&&e.weakDependency.length)for(n=0;n<e.weakDependency.length;++n)t.uint32(88).int32(e.weakDependency[n]);return null!=e.syntax&&Object.hasOwnProperty.call(e,"syntax")&&t.uint32(98).string(e.syntax),null!=e.edition&&Object.hasOwnProperty.call(e,"edition")&&t.uint32(106).string(e.edition),t},P.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},P.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.FileDescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.package=e.string();break;case 3:o.dependency&&o.dependency.length||(o.dependency=[]),o.dependency.push(e.string());break;case 10:if(o.publicDependency&&o.publicDependency.length||(o.publicDependency=[]),2==(7&r))for(var i=e.uint32()+e.pos;e.pos<i;)o.publicDependency.push(e.int32());else o.publicDependency.push(e.int32());break;case 11:if(o.weakDependency&&o.weakDependency.length||(o.weakDependency=[]),2==(7&r))for(i=e.uint32()+e.pos;e.pos<i;)o.weakDependency.push(e.int32());else o.weakDependency.push(e.int32());break;case 4:o.messageType&&o.messageType.length||(o.messageType=[]),o.messageType.push(p.google.protobuf.DescriptorProto.decode(e,e.uint32()));break;case 5:o.enumType&&o.enumType.length||(o.enumType=[]),o.enumType.push(p.google.protobuf.EnumDescriptorProto.decode(e,e.uint32()));break;case 6:o.service&&o.service.length||(o.service=[]),o.service.push(p.google.protobuf.ServiceDescriptorProto.decode(e,e.uint32()));break;case 7:o.extension&&o.extension.length||(o.extension=[]),o.extension.push(p.google.protobuf.FieldDescriptorProto.decode(e,e.uint32()));break;case 8:o.options=p.google.protobuf.FileOptions.decode(e,e.uint32());break;case 9:o.sourceCodeInfo=p.google.protobuf.SourceCodeInfo.decode(e,e.uint32());break;case 12:o.syntax=e.string();break;case 13:o.edition=e.string();break;default:e.skipType(7&r)}}return o},P.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},P.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name))return"name: string expected";if(null!=e.package&&e.hasOwnProperty("package")&&!c.isString(e.package))return"package: string expected";if(null!=e.dependency&&e.hasOwnProperty("dependency")){if(!Array.isArray(e.dependency))return"dependency: array expected";for(var t=0;t<e.dependency.length;++t)if(!c.isString(e.dependency[t]))return"dependency: string[] expected"}if(null!=e.publicDependency&&e.hasOwnProperty("publicDependency")){if(!Array.isArray(e.publicDependency))return"publicDependency: array expected";for(t=0;t<e.publicDependency.length;++t)if(!c.isInteger(e.publicDependency[t]))return"publicDependency: integer[] expected"}if(null!=e.weakDependency&&e.hasOwnProperty("weakDependency")){if(!Array.isArray(e.weakDependency))return"weakDependency: array expected";for(t=0;t<e.weakDependency.length;++t)if(!c.isInteger(e.weakDependency[t]))return"weakDependency: integer[] expected"}if(null!=e.messageType&&e.hasOwnProperty("messageType")){if(!Array.isArray(e.messageType))return"messageType: array expected";for(t=0;t<e.messageType.length;++t)if(n=p.google.protobuf.DescriptorProto.verify(e.messageType[t]))return"messageType."+n}if(null!=e.enumType&&e.hasOwnProperty("enumType")){if(!Array.isArray(e.enumType))return"enumType: array expected";for(t=0;t<e.enumType.length;++t)if(n=p.google.protobuf.EnumDescriptorProto.verify(e.enumType[t]))return"enumType."+n}if(null!=e.service&&e.hasOwnProperty("service")){if(!Array.isArray(e.service))return"service: array expected";for(t=0;t<e.service.length;++t)if(n=p.google.protobuf.ServiceDescriptorProto.verify(e.service[t]))return"service."+n}if(null!=e.extension&&e.hasOwnProperty("extension")){if(!Array.isArray(e.extension))return"extension: array expected";for(t=0;t<e.extension.length;++t)if(n=p.google.protobuf.FieldDescriptorProto.verify(e.extension[t]))return"extension."+n}var n;if(null!=e.options&&e.hasOwnProperty("options")&&(n=p.google.protobuf.FileOptions.verify(e.options)))return"options."+n;if(null!=e.sourceCodeInfo&&e.hasOwnProperty("sourceCodeInfo")&&(n=p.google.protobuf.SourceCodeInfo.verify(e.sourceCodeInfo)))return"sourceCodeInfo."+n;return null!=e.syntax&&e.hasOwnProperty("syntax")&&!c.isString(e.syntax)?"syntax: string expected":null!=e.edition&&e.hasOwnProperty("edition")&&!c.isString(e.edition)?"edition: string expected":null},P.fromObject=function(e){if(e instanceof p.google.protobuf.FileDescriptorProto)return e;var t=new p.google.protobuf.FileDescriptorProto;if(null!=e.name&&(t.name=String(e.name)),null!=e.package&&(t.package=String(e.package)),e.dependency){if(!Array.isArray(e.dependency))throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected");t.dependency=[];for(var n=0;n<e.dependency.length;++n)t.dependency[n]=String(e.dependency[n])}if(e.publicDependency){if(!Array.isArray(e.publicDependency))throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected");t.publicDependency=[];for(n=0;n<e.publicDependency.length;++n)t.publicDependency[n]=0|e.publicDependency[n]}if(e.weakDependency){if(!Array.isArray(e.weakDependency))throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected");t.weakDependency=[];for(n=0;n<e.weakDependency.length;++n)t.weakDependency[n]=0|e.weakDependency[n]}if(e.messageType){if(!Array.isArray(e.messageType))throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected");t.messageType=[];for(n=0;n<e.messageType.length;++n){if("object"!=typeof e.messageType[n])throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected");t.messageType[n]=p.google.protobuf.DescriptorProto.fromObject(e.messageType[n])}}if(e.enumType){if(!Array.isArray(e.enumType))throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected");t.enumType=[];for(n=0;n<e.enumType.length;++n){if("object"!=typeof e.enumType[n])throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected");t.enumType[n]=p.google.protobuf.EnumDescriptorProto.fromObject(e.enumType[n])}}if(e.service){if(!Array.isArray(e.service))throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected");t.service=[];for(n=0;n<e.service.length;++n){if("object"!=typeof e.service[n])throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected");t.service[n]=p.google.protobuf.ServiceDescriptorProto.fromObject(e.service[n])}}if(e.extension){if(!Array.isArray(e.extension))throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected");t.extension=[];for(n=0;n<e.extension.length;++n){if("object"!=typeof e.extension[n])throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected");t.extension[n]=p.google.protobuf.FieldDescriptorProto.fromObject(e.extension[n])}}if(null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected");t.options=p.google.protobuf.FileOptions.fromObject(e.options)}if(null!=e.sourceCodeInfo){if("object"!=typeof e.sourceCodeInfo)throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected");t.sourceCodeInfo=p.google.protobuf.SourceCodeInfo.fromObject(e.sourceCodeInfo)}return null!=e.syntax&&(t.syntax=String(e.syntax)),null!=e.edition&&(t.edition=String(e.edition)),t},P.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.dependency=[],n.messageType=[],n.enumType=[],n.service=[],n.extension=[],n.publicDependency=[],n.weakDependency=[]),t.defaults&&(n.name="",n.package="",n.options=null,n.sourceCodeInfo=null,n.syntax="",n.edition=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.package&&e.hasOwnProperty("package")&&(n.package=e.package),e.dependency&&e.dependency.length){n.dependency=[];for(var o=0;o<e.dependency.length;++o)n.dependency[o]=e.dependency[o]}if(e.messageType&&e.messageType.length){n.messageType=[];for(o=0;o<e.messageType.length;++o)n.messageType[o]=p.google.protobuf.DescriptorProto.toObject(e.messageType[o],t)}if(e.enumType&&e.enumType.length){n.enumType=[];for(o=0;o<e.enumType.length;++o)n.enumType[o]=p.google.protobuf.EnumDescriptorProto.toObject(e.enumType[o],t)}if(e.service&&e.service.length){n.service=[];for(o=0;o<e.service.length;++o)n.service[o]=p.google.protobuf.ServiceDescriptorProto.toObject(e.service[o],t)}if(e.extension&&e.extension.length){n.extension=[];for(o=0;o<e.extension.length;++o)n.extension[o]=p.google.protobuf.FieldDescriptorProto.toObject(e.extension[o],t)}if(null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.FileOptions.toObject(e.options,t)),null!=e.sourceCodeInfo&&e.hasOwnProperty("sourceCodeInfo")&&(n.sourceCodeInfo=p.google.protobuf.SourceCodeInfo.toObject(e.sourceCodeInfo,t)),e.publicDependency&&e.publicDependency.length){n.publicDependency=[];for(o=0;o<e.publicDependency.length;++o)n.publicDependency[o]=e.publicDependency[o]}if(e.weakDependency&&e.weakDependency.length){n.weakDependency=[];for(o=0;o<e.weakDependency.length;++o)n.weakDependency[o]=e.weakDependency[o]}return null!=e.syntax&&e.hasOwnProperty("syntax")&&(n.syntax=e.syntax),null!=e.edition&&e.hasOwnProperty("edition")&&(n.edition=e.edition),n},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.protobuf.FileDescriptorProto"},P),e.DescriptorProto=(T.prototype.name="",T.prototype.field=c.emptyArray,T.prototype.extension=c.emptyArray,T.prototype.nestedType=c.emptyArray,T.prototype.enumType=c.emptyArray,T.prototype.extensionRange=c.emptyArray,T.prototype.oneofDecl=c.emptyArray,T.prototype.options=null,T.prototype.reservedRange=c.emptyArray,T.prototype.reservedName=c.emptyArray,T.create=function(e){return new T(e)},T.encode=function(e,t){if(t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.field&&e.field.length)for(var n=0;n<e.field.length;++n)p.google.protobuf.FieldDescriptorProto.encode(e.field[n],t.uint32(18).fork()).ldelim();if(null!=e.nestedType&&e.nestedType.length)for(n=0;n<e.nestedType.length;++n)p.google.protobuf.DescriptorProto.encode(e.nestedType[n],t.uint32(26).fork()).ldelim();if(null!=e.enumType&&e.enumType.length)for(n=0;n<e.enumType.length;++n)p.google.protobuf.EnumDescriptorProto.encode(e.enumType[n],t.uint32(34).fork()).ldelim();if(null!=e.extensionRange&&e.extensionRange.length)for(n=0;n<e.extensionRange.length;++n)p.google.protobuf.DescriptorProto.ExtensionRange.encode(e.extensionRange[n],t.uint32(42).fork()).ldelim();if(null!=e.extension&&e.extension.length)for(n=0;n<e.extension.length;++n)p.google.protobuf.FieldDescriptorProto.encode(e.extension[n],t.uint32(50).fork()).ldelim();if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&p.google.protobuf.MessageOptions.encode(e.options,t.uint32(58).fork()).ldelim(),null!=e.oneofDecl&&e.oneofDecl.length)for(n=0;n<e.oneofDecl.length;++n)p.google.protobuf.OneofDescriptorProto.encode(e.oneofDecl[n],t.uint32(66).fork()).ldelim();if(null!=e.reservedRange&&e.reservedRange.length)for(n=0;n<e.reservedRange.length;++n)p.google.protobuf.DescriptorProto.ReservedRange.encode(e.reservedRange[n],t.uint32(74).fork()).ldelim();if(null!=e.reservedName&&e.reservedName.length)for(n=0;n<e.reservedName.length;++n)t.uint32(82).string(e.reservedName[n]);return t},T.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},T.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.DescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.field&&o.field.length||(o.field=[]),o.field.push(p.google.protobuf.FieldDescriptorProto.decode(e,e.uint32()));break;case 6:o.extension&&o.extension.length||(o.extension=[]),o.extension.push(p.google.protobuf.FieldDescriptorProto.decode(e,e.uint32()));break;case 3:o.nestedType&&o.nestedType.length||(o.nestedType=[]),o.nestedType.push(p.google.protobuf.DescriptorProto.decode(e,e.uint32()));break;case 4:o.enumType&&o.enumType.length||(o.enumType=[]),o.enumType.push(p.google.protobuf.EnumDescriptorProto.decode(e,e.uint32()));break;case 5:o.extensionRange&&o.extensionRange.length||(o.extensionRange=[]),o.extensionRange.push(p.google.protobuf.DescriptorProto.ExtensionRange.decode(e,e.uint32()));break;case 8:o.oneofDecl&&o.oneofDecl.length||(o.oneofDecl=[]),o.oneofDecl.push(p.google.protobuf.OneofDescriptorProto.decode(e,e.uint32()));break;case 7:o.options=p.google.protobuf.MessageOptions.decode(e,e.uint32());break;case 9:o.reservedRange&&o.reservedRange.length||(o.reservedRange=[]),o.reservedRange.push(p.google.protobuf.DescriptorProto.ReservedRange.decode(e,e.uint32()));break;case 10:o.reservedName&&o.reservedName.length||(o.reservedName=[]),o.reservedName.push(e.string());break;default:e.skipType(7&r)}}return o},T.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},T.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name))return"name: string expected";if(null!=e.field&&e.hasOwnProperty("field")){if(!Array.isArray(e.field))return"field: array expected";for(var t=0;t<e.field.length;++t)if(n=p.google.protobuf.FieldDescriptorProto.verify(e.field[t]))return"field."+n}if(null!=e.extension&&e.hasOwnProperty("extension")){if(!Array.isArray(e.extension))return"extension: array expected";for(t=0;t<e.extension.length;++t)if(n=p.google.protobuf.FieldDescriptorProto.verify(e.extension[t]))return"extension."+n}if(null!=e.nestedType&&e.hasOwnProperty("nestedType")){if(!Array.isArray(e.nestedType))return"nestedType: array expected";for(t=0;t<e.nestedType.length;++t)if(n=p.google.protobuf.DescriptorProto.verify(e.nestedType[t]))return"nestedType."+n}if(null!=e.enumType&&e.hasOwnProperty("enumType")){if(!Array.isArray(e.enumType))return"enumType: array expected";for(t=0;t<e.enumType.length;++t)if(n=p.google.protobuf.EnumDescriptorProto.verify(e.enumType[t]))return"enumType."+n}if(null!=e.extensionRange&&e.hasOwnProperty("extensionRange")){if(!Array.isArray(e.extensionRange))return"extensionRange: array expected";for(t=0;t<e.extensionRange.length;++t)if(n=p.google.protobuf.DescriptorProto.ExtensionRange.verify(e.extensionRange[t]))return"extensionRange."+n}if(null!=e.oneofDecl&&e.hasOwnProperty("oneofDecl")){if(!Array.isArray(e.oneofDecl))return"oneofDecl: array expected";for(t=0;t<e.oneofDecl.length;++t)if(n=p.google.protobuf.OneofDescriptorProto.verify(e.oneofDecl[t]))return"oneofDecl."+n}if(null!=e.options&&e.hasOwnProperty("options")&&(n=p.google.protobuf.MessageOptions.verify(e.options)))return"options."+n;if(null!=e.reservedRange&&e.hasOwnProperty("reservedRange")){if(!Array.isArray(e.reservedRange))return"reservedRange: array expected";for(var n,t=0;t<e.reservedRange.length;++t)if(n=p.google.protobuf.DescriptorProto.ReservedRange.verify(e.reservedRange[t]))return"reservedRange."+n}if(null!=e.reservedName&&e.hasOwnProperty("reservedName")){if(!Array.isArray(e.reservedName))return"reservedName: array expected";for(t=0;t<e.reservedName.length;++t)if(!c.isString(e.reservedName[t]))return"reservedName: string[] expected"}return null},T.fromObject=function(e){if(e instanceof p.google.protobuf.DescriptorProto)return e;var t=new p.google.protobuf.DescriptorProto;if(null!=e.name&&(t.name=String(e.name)),e.field){if(!Array.isArray(e.field))throw TypeError(".google.protobuf.DescriptorProto.field: array expected");t.field=[];for(var n=0;n<e.field.length;++n){if("object"!=typeof e.field[n])throw TypeError(".google.protobuf.DescriptorProto.field: object expected");t.field[n]=p.google.protobuf.FieldDescriptorProto.fromObject(e.field[n])}}if(e.extension){if(!Array.isArray(e.extension))throw TypeError(".google.protobuf.DescriptorProto.extension: array expected");t.extension=[];for(n=0;n<e.extension.length;++n){if("object"!=typeof e.extension[n])throw TypeError(".google.protobuf.DescriptorProto.extension: object expected");t.extension[n]=p.google.protobuf.FieldDescriptorProto.fromObject(e.extension[n])}}if(e.nestedType){if(!Array.isArray(e.nestedType))throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected");t.nestedType=[];for(n=0;n<e.nestedType.length;++n){if("object"!=typeof e.nestedType[n])throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected");t.nestedType[n]=p.google.protobuf.DescriptorProto.fromObject(e.nestedType[n])}}if(e.enumType){if(!Array.isArray(e.enumType))throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected");t.enumType=[];for(n=0;n<e.enumType.length;++n){if("object"!=typeof e.enumType[n])throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected");t.enumType[n]=p.google.protobuf.EnumDescriptorProto.fromObject(e.enumType[n])}}if(e.extensionRange){if(!Array.isArray(e.extensionRange))throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected");t.extensionRange=[];for(n=0;n<e.extensionRange.length;++n){if("object"!=typeof e.extensionRange[n])throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected");t.extensionRange[n]=p.google.protobuf.DescriptorProto.ExtensionRange.fromObject(e.extensionRange[n])}}if(e.oneofDecl){if(!Array.isArray(e.oneofDecl))throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected");t.oneofDecl=[];for(n=0;n<e.oneofDecl.length;++n){if("object"!=typeof e.oneofDecl[n])throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected");t.oneofDecl[n]=p.google.protobuf.OneofDescriptorProto.fromObject(e.oneofDecl[n])}}if(null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.DescriptorProto.options: object expected");t.options=p.google.protobuf.MessageOptions.fromObject(e.options)}if(e.reservedRange){if(!Array.isArray(e.reservedRange))throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected");t.reservedRange=[];for(n=0;n<e.reservedRange.length;++n){if("object"!=typeof e.reservedRange[n])throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected");t.reservedRange[n]=p.google.protobuf.DescriptorProto.ReservedRange.fromObject(e.reservedRange[n])}}if(e.reservedName){if(!Array.isArray(e.reservedName))throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected");t.reservedName=[];for(n=0;n<e.reservedName.length;++n)t.reservedName[n]=String(e.reservedName[n])}return t},T.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.field=[],n.nestedType=[],n.enumType=[],n.extensionRange=[],n.extension=[],n.oneofDecl=[],n.reservedRange=[],n.reservedName=[]),t.defaults&&(n.name="",n.options=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),e.field&&e.field.length){n.field=[];for(var o=0;o<e.field.length;++o)n.field[o]=p.google.protobuf.FieldDescriptorProto.toObject(e.field[o],t)}if(e.nestedType&&e.nestedType.length){n.nestedType=[];for(o=0;o<e.nestedType.length;++o)n.nestedType[o]=p.google.protobuf.DescriptorProto.toObject(e.nestedType[o],t)}if(e.enumType&&e.enumType.length){n.enumType=[];for(o=0;o<e.enumType.length;++o)n.enumType[o]=p.google.protobuf.EnumDescriptorProto.toObject(e.enumType[o],t)}if(e.extensionRange&&e.extensionRange.length){n.extensionRange=[];for(o=0;o<e.extensionRange.length;++o)n.extensionRange[o]=p.google.protobuf.DescriptorProto.ExtensionRange.toObject(e.extensionRange[o],t)}if(e.extension&&e.extension.length){n.extension=[];for(o=0;o<e.extension.length;++o)n.extension[o]=p.google.protobuf.FieldDescriptorProto.toObject(e.extension[o],t)}if(null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.MessageOptions.toObject(e.options,t)),e.oneofDecl&&e.oneofDecl.length){n.oneofDecl=[];for(o=0;o<e.oneofDecl.length;++o)n.oneofDecl[o]=p.google.protobuf.OneofDescriptorProto.toObject(e.oneofDecl[o],t)}if(e.reservedRange&&e.reservedRange.length){n.reservedRange=[];for(o=0;o<e.reservedRange.length;++o)n.reservedRange[o]=p.google.protobuf.DescriptorProto.ReservedRange.toObject(e.reservedRange[o],t)}if(e.reservedName&&e.reservedName.length){n.reservedName=[];for(o=0;o<e.reservedName.length;++o)n.reservedName[o]=e.reservedName[o]}return n},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.protobuf.DescriptorProto"},T.ExtensionRange=(Te.prototype.start=0,Te.prototype.end=0,Te.prototype.options=null,Te.create=function(e){return new Te(e)},Te.encode=function(e,t){return t=t||a.create(),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")&&p.google.protobuf.ExtensionRangeOptions.encode(e.options,t.uint32(26).fork()).ldelim(),t},Te.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Te.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.DescriptorProto.ExtensionRange;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.start=e.int32();break;case 2:o.end=e.int32();break;case 3:o.options=p.google.protobuf.ExtensionRangeOptions.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},Te.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Te.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.start&&e.hasOwnProperty("start")&&!c.isInteger(e.start))return"start: integer expected";if(null!=e.end&&e.hasOwnProperty("end")&&!c.isInteger(e.end))return"end: integer expected";if(null!=e.options&&e.hasOwnProperty("options")){e=p.google.protobuf.ExtensionRangeOptions.verify(e.options);if(e)return"options."+e}return null},Te.fromObject=function(e){if(e instanceof p.google.protobuf.DescriptorProto.ExtensionRange)return e;var t=new p.google.protobuf.DescriptorProto.ExtensionRange;if(null!=e.start&&(t.start=0|e.start),null!=e.end&&(t.end=0|e.end),null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected");t.options=p.google.protobuf.ExtensionRangeOptions.fromObject(e.options)}return t},Te.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.start=0,n.end=0,n.options=null),null!=e.start&&e.hasOwnProperty("start")&&(n.start=e.start),null!=e.end&&e.hasOwnProperty("end")&&(n.end=e.end),null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.ExtensionRangeOptions.toObject(e.options,t)),n},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.protobuf.DescriptorProto.ExtensionRange"},Te),T.ReservedRange=(ke.prototype.start=0,ke.prototype.end=0,ke.create=function(e){return new ke(e)},ke.encode=function(e,t){return t=t||a.create(),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},ke.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ke.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.DescriptorProto.ReservedRange;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.start=e.int32();break;case 2:o.end=e.int32();break;default:e.skipType(7&r)}}return o},ke.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},ke.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.start&&e.hasOwnProperty("start")&&!c.isInteger(e.start)?"start: integer expected":null!=e.end&&e.hasOwnProperty("end")&&!c.isInteger(e.end)?"end: integer expected":null},ke.fromObject=function(e){var t;return e instanceof p.google.protobuf.DescriptorProto.ReservedRange?e:(t=new p.google.protobuf.DescriptorProto.ReservedRange,null!=e.start&&(t.start=0|e.start),null!=e.end&&(t.end=0|e.end),t)},ke.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.start=0,n.end=0),null!=e.start&&e.hasOwnProperty("start")&&(n.start=e.start),null!=e.end&&e.hasOwnProperty("end")&&(n.end=e.end),n},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.protobuf.DescriptorProto.ReservedRange"},ke),T),e.ExtensionRangeOptions=(Ie.prototype.uninterpretedOption=c.emptyArray,Ie.create=function(e){return new Ie(e)},Ie.encode=function(e,t){if(t=t||a.create(),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();return t},Ie.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ie.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.ExtensionRangeOptions;e.pos<n;){var r=e.uint32();r>>>3==999?(o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()))):e.skipType(7&r)}return o},Ie.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Ie.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t){var n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]);if(n)return"uninterpretedOption."+n}}return null},Ie.fromObject=function(e){if(e instanceof p.google.protobuf.ExtensionRangeOptions)return e;var t=new p.google.protobuf.ExtensionRangeOptions;if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}return t},Ie.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[]),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}return n},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.protobuf.ExtensionRangeOptions"},Ie),e.FieldDescriptorProto=(k.prototype.name="",k.prototype.number=0,k.prototype.label=1,k.prototype.type=1,k.prototype.typeName="",k.prototype.extendee="",k.prototype.defaultValue="",k.prototype.oneofIndex=0,k.prototype.jsonName="",k.prototype.options=null,k.prototype.proto3Optional=!1,k.create=function(e){return new k(e)},k.encode=function(e,t){return t=t||a.create(),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")&&p.google.protobuf.FieldOptions.encode(e.options,t.uint32(66).fork()).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},k.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},k.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.FieldDescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 3:o.number=e.int32();break;case 4:o.label=e.int32();break;case 5:o.type=e.int32();break;case 6:o.typeName=e.string();break;case 2:o.extendee=e.string();break;case 7:o.defaultValue=e.string();break;case 9:o.oneofIndex=e.int32();break;case 10:o.jsonName=e.string();break;case 8:o.options=p.google.protobuf.FieldOptions.decode(e,e.uint32());break;case 17:o.proto3Optional=e.bool();break;default:e.skipType(7&r)}}return o},k.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},k.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name))return"name: string expected";if(null!=e.number&&e.hasOwnProperty("number")&&!c.isInteger(e.number))return"number: integer expected";if(null!=e.label&&e.hasOwnProperty("label"))switch(e.label){default:return"label: enum value expected";case 1:case 2:case 3:}if(null!=e.type&&e.hasOwnProperty("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&&e.hasOwnProperty("typeName")&&!c.isString(e.typeName))return"typeName: string expected";if(null!=e.extendee&&e.hasOwnProperty("extendee")&&!c.isString(e.extendee))return"extendee: string expected";if(null!=e.defaultValue&&e.hasOwnProperty("defaultValue")&&!c.isString(e.defaultValue))return"defaultValue: string expected";if(null!=e.oneofIndex&&e.hasOwnProperty("oneofIndex")&&!c.isInteger(e.oneofIndex))return"oneofIndex: integer expected";if(null!=e.jsonName&&e.hasOwnProperty("jsonName")&&!c.isString(e.jsonName))return"jsonName: string expected";if(null!=e.options&&e.hasOwnProperty("options")){var t=p.google.protobuf.FieldOptions.verify(e.options);if(t)return"options."+t}return null!=e.proto3Optional&&e.hasOwnProperty("proto3Optional")&&"boolean"!=typeof e.proto3Optional?"proto3Optional: boolean expected":null},k.fromObject=function(e){if(e instanceof p.google.protobuf.FieldDescriptorProto)return e;var t=new p.google.protobuf.FieldDescriptorProto;switch(null!=e.name&&(t.name=String(e.name)),null!=e.number&&(t.number=0|e.number),e.label){default:"number"==typeof e.label&&(t.label=e.label);break;case"LABEL_OPTIONAL":case 1:t.label=1;break;case"LABEL_REQUIRED":case 2:t.label=2;break;case"LABEL_REPEATED":case 3:t.label=3}switch(e.type){default:"number"==typeof e.type&&(t.type=e.type);break;case"TYPE_DOUBLE":case 1:t.type=1;break;case"TYPE_FLOAT":case 2:t.type=2;break;case"TYPE_INT64":case 3:t.type=3;break;case"TYPE_UINT64":case 4:t.type=4;break;case"TYPE_INT32":case 5:t.type=5;break;case"TYPE_FIXED64":case 6:t.type=6;break;case"TYPE_FIXED32":case 7:t.type=7;break;case"TYPE_BOOL":case 8:t.type=8;break;case"TYPE_STRING":case 9:t.type=9;break;case"TYPE_GROUP":case 10:t.type=10;break;case"TYPE_MESSAGE":case 11:t.type=11;break;case"TYPE_BYTES":case 12:t.type=12;break;case"TYPE_UINT32":case 13:t.type=13;break;case"TYPE_ENUM":case 14:t.type=14;break;case"TYPE_SFIXED32":case 15:t.type=15;break;case"TYPE_SFIXED64":case 16:t.type=16;break;case"TYPE_SINT32":case 17:t.type=17;break;case"TYPE_SINT64":case 18:t.type=18}if(null!=e.typeName&&(t.typeName=String(e.typeName)),null!=e.extendee&&(t.extendee=String(e.extendee)),null!=e.defaultValue&&(t.defaultValue=String(e.defaultValue)),null!=e.oneofIndex&&(t.oneofIndex=0|e.oneofIndex),null!=e.jsonName&&(t.jsonName=String(e.jsonName)),null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected");t.options=p.google.protobuf.FieldOptions.fromObject(e.options)}return null!=e.proto3Optional&&(t.proto3Optional=Boolean(e.proto3Optional)),t},k.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name="",n.extendee="",n.number=0,n.label=t.enums===String?"LABEL_OPTIONAL":1,n.type=t.enums===String?"TYPE_DOUBLE":1,n.typeName="",n.defaultValue="",n.options=null,n.oneofIndex=0,n.jsonName="",n.proto3Optional=!1),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.extendee&&e.hasOwnProperty("extendee")&&(n.extendee=e.extendee),null!=e.number&&e.hasOwnProperty("number")&&(n.number=e.number),null!=e.label&&e.hasOwnProperty("label")&&(n.label=t.enums!==String||void 0===p.google.protobuf.FieldDescriptorProto.Label[e.label]?e.label:p.google.protobuf.FieldDescriptorProto.Label[e.label]),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums!==String||void 0===p.google.protobuf.FieldDescriptorProto.Type[e.type]?e.type:p.google.protobuf.FieldDescriptorProto.Type[e.type]),null!=e.typeName&&e.hasOwnProperty("typeName")&&(n.typeName=e.typeName),null!=e.defaultValue&&e.hasOwnProperty("defaultValue")&&(n.defaultValue=e.defaultValue),null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.FieldOptions.toObject(e.options,t)),null!=e.oneofIndex&&e.hasOwnProperty("oneofIndex")&&(n.oneofIndex=e.oneofIndex),null!=e.jsonName&&e.hasOwnProperty("jsonName")&&(n.jsonName=e.jsonName),null!=e.proto3Optional&&e.hasOwnProperty("proto3Optional")&&(n.proto3Optional=e.proto3Optional),n},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.protobuf.FieldDescriptorProto"},k.Type=(r={},(i=Object.create(r))[r[1]="TYPE_DOUBLE"]=1,i[r[2]="TYPE_FLOAT"]=2,i[r[3]="TYPE_INT64"]=3,i[r[4]="TYPE_UINT64"]=4,i[r[5]="TYPE_INT32"]=5,i[r[6]="TYPE_FIXED64"]=6,i[r[7]="TYPE_FIXED32"]=7,i[r[8]="TYPE_BOOL"]=8,i[r[9]="TYPE_STRING"]=9,i[r[10]="TYPE_GROUP"]=10,i[r[11]="TYPE_MESSAGE"]=11,i[r[12]="TYPE_BYTES"]=12,i[r[13]="TYPE_UINT32"]=13,i[r[14]="TYPE_ENUM"]=14,i[r[15]="TYPE_SFIXED32"]=15,i[r[16]="TYPE_SFIXED64"]=16,i[r[17]="TYPE_SINT32"]=17,i[r[18]="TYPE_SINT64"]=18,i),k.Label=(r={},(i=Object.create(r))[r[1]="LABEL_OPTIONAL"]=1,i[r[2]="LABEL_REQUIRED"]=2,i[r[3]="LABEL_REPEATED"]=3,i),k),e.OneofDescriptorProto=(De.prototype.name="",De.prototype.options=null,De.create=function(e){return new De(e)},De.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&p.google.protobuf.OneofOptions.encode(e.options,t.uint32(18).fork()).ldelim(),t},De.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},De.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.OneofDescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.options=p.google.protobuf.OneofOptions.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},De.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},De.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name))return"name: string expected";if(null!=e.options&&e.hasOwnProperty("options")){e=p.google.protobuf.OneofOptions.verify(e.options);if(e)return"options."+e}return null},De.fromObject=function(e){if(e instanceof p.google.protobuf.OneofDescriptorProto)return e;var t=new p.google.protobuf.OneofDescriptorProto;if(null!=e.name&&(t.name=String(e.name)),null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected");t.options=p.google.protobuf.OneofOptions.fromObject(e.options)}return t},De.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name="",n.options=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.OneofOptions.toObject(e.options,t)),n},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.protobuf.OneofDescriptorProto"},De),e.EnumDescriptorProto=(I.prototype.name="",I.prototype.value=c.emptyArray,I.prototype.options=null,I.prototype.reservedRange=c.emptyArray,I.prototype.reservedName=c.emptyArray,I.create=function(e){return new I(e)},I.encode=function(e,t){if(t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.value&&e.value.length)for(var n=0;n<e.value.length;++n)p.google.protobuf.EnumValueDescriptorProto.encode(e.value[n],t.uint32(18).fork()).ldelim();if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&p.google.protobuf.EnumOptions.encode(e.options,t.uint32(26).fork()).ldelim(),null!=e.reservedRange&&e.reservedRange.length)for(n=0;n<e.reservedRange.length;++n)p.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(e.reservedRange[n],t.uint32(34).fork()).ldelim();if(null!=e.reservedName&&e.reservedName.length)for(n=0;n<e.reservedName.length;++n)t.uint32(42).string(e.reservedName[n]);return t},I.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},I.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.EnumDescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.value&&o.value.length||(o.value=[]),o.value.push(p.google.protobuf.EnumValueDescriptorProto.decode(e,e.uint32()));break;case 3:o.options=p.google.protobuf.EnumOptions.decode(e,e.uint32());break;case 4:o.reservedRange&&o.reservedRange.length||(o.reservedRange=[]),o.reservedRange.push(p.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(e,e.uint32()));break;case 5:o.reservedName&&o.reservedName.length||(o.reservedName=[]),o.reservedName.push(e.string());break;default:e.skipType(7&r)}}return o},I.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},I.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name))return"name: string expected";if(null!=e.value&&e.hasOwnProperty("value")){if(!Array.isArray(e.value))return"value: array expected";for(var t=0;t<e.value.length;++t)if(n=p.google.protobuf.EnumValueDescriptorProto.verify(e.value[t]))return"value."+n}if(null!=e.options&&e.hasOwnProperty("options")&&(n=p.google.protobuf.EnumOptions.verify(e.options)))return"options."+n;if(null!=e.reservedRange&&e.hasOwnProperty("reservedRange")){if(!Array.isArray(e.reservedRange))return"reservedRange: array expected";for(var n,t=0;t<e.reservedRange.length;++t)if(n=p.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(e.reservedRange[t]))return"reservedRange."+n}if(null!=e.reservedName&&e.hasOwnProperty("reservedName")){if(!Array.isArray(e.reservedName))return"reservedName: array expected";for(t=0;t<e.reservedName.length;++t)if(!c.isString(e.reservedName[t]))return"reservedName: string[] expected"}return null},I.fromObject=function(e){if(e instanceof p.google.protobuf.EnumDescriptorProto)return e;var t=new p.google.protobuf.EnumDescriptorProto;if(null!=e.name&&(t.name=String(e.name)),e.value){if(!Array.isArray(e.value))throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected");t.value=[];for(var n=0;n<e.value.length;++n){if("object"!=typeof e.value[n])throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected");t.value[n]=p.google.protobuf.EnumValueDescriptorProto.fromObject(e.value[n])}}if(null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected");t.options=p.google.protobuf.EnumOptions.fromObject(e.options)}if(e.reservedRange){if(!Array.isArray(e.reservedRange))throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected");t.reservedRange=[];for(n=0;n<e.reservedRange.length;++n){if("object"!=typeof e.reservedRange[n])throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected");t.reservedRange[n]=p.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(e.reservedRange[n])}}if(e.reservedName){if(!Array.isArray(e.reservedName))throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected");t.reservedName=[];for(n=0;n<e.reservedName.length;++n)t.reservedName[n]=String(e.reservedName[n])}return t},I.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.value=[],n.reservedRange=[],n.reservedName=[]),t.defaults&&(n.name="",n.options=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),e.value&&e.value.length){n.value=[];for(var o=0;o<e.value.length;++o)n.value[o]=p.google.protobuf.EnumValueDescriptorProto.toObject(e.value[o],t)}if(null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.EnumOptions.toObject(e.options,t)),e.reservedRange&&e.reservedRange.length){n.reservedRange=[];for(o=0;o<e.reservedRange.length;++o)n.reservedRange[o]=p.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(e.reservedRange[o],t)}if(e.reservedName&&e.reservedName.length){n.reservedName=[];for(o=0;o<e.reservedName.length;++o)n.reservedName[o]=e.reservedName[o]}return n},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.EnumDescriptorProto"},I.EnumReservedRange=(xe.prototype.start=0,xe.prototype.end=0,xe.create=function(e){return new xe(e)},xe.encode=function(e,t){return t=t||a.create(),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},xe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},xe.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.EnumDescriptorProto.EnumReservedRange;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.start=e.int32();break;case 2:o.end=e.int32();break;default:e.skipType(7&r)}}return o},xe.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},xe.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.start&&e.hasOwnProperty("start")&&!c.isInteger(e.start)?"start: integer expected":null!=e.end&&e.hasOwnProperty("end")&&!c.isInteger(e.end)?"end: integer expected":null},xe.fromObject=function(e){var t;return e instanceof p.google.protobuf.EnumDescriptorProto.EnumReservedRange?e:(t=new p.google.protobuf.EnumDescriptorProto.EnumReservedRange,null!=e.start&&(t.start=0|e.start),null!=e.end&&(t.end=0|e.end),t)},xe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.start=0,n.end=0),null!=e.start&&e.hasOwnProperty("start")&&(n.start=e.start),null!=e.end&&e.hasOwnProperty("end")&&(n.end=e.end),n},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.protobuf.EnumDescriptorProto.EnumReservedRange"},xe),I),e.EnumValueDescriptorProto=(Ee.prototype.name="",Ee.prototype.number=0,Ee.prototype.options=null,Ee.create=function(e){return new Ee(e)},Ee.encode=function(e,t){return t=t||a.create(),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")&&p.google.protobuf.EnumValueOptions.encode(e.options,t.uint32(26).fork()).ldelim(),t},Ee.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ee.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.EnumValueDescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.number=e.int32();break;case 3:o.options=p.google.protobuf.EnumValueOptions.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},Ee.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Ee.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name))return"name: string expected";if(null!=e.number&&e.hasOwnProperty("number")&&!c.isInteger(e.number))return"number: integer expected";if(null!=e.options&&e.hasOwnProperty("options")){e=p.google.protobuf.EnumValueOptions.verify(e.options);if(e)return"options."+e}return null},Ee.fromObject=function(e){if(e instanceof p.google.protobuf.EnumValueDescriptorProto)return e;var t=new p.google.protobuf.EnumValueDescriptorProto;if(null!=e.name&&(t.name=String(e.name)),null!=e.number&&(t.number=0|e.number),null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected");t.options=p.google.protobuf.EnumValueOptions.fromObject(e.options)}return t},Ee.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name="",n.number=0,n.options=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.number&&e.hasOwnProperty("number")&&(n.number=e.number),null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.EnumValueOptions.toObject(e.options,t)),n},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.protobuf.EnumValueDescriptorProto"},Ee),e.ServiceDescriptorProto=(Ce.prototype.name="",Ce.prototype.method=c.emptyArray,Ce.prototype.options=null,Ce.create=function(e){return new Ce(e)},Ce.encode=function(e,t){if(t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.method&&e.method.length)for(var n=0;n<e.method.length;++n)p.google.protobuf.MethodDescriptorProto.encode(e.method[n],t.uint32(18).fork()).ldelim();return null!=e.options&&Object.hasOwnProperty.call(e,"options")&&p.google.protobuf.ServiceOptions.encode(e.options,t.uint32(26).fork()).ldelim(),t},Ce.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ce.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.ServiceDescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.method&&o.method.length||(o.method=[]),o.method.push(p.google.protobuf.MethodDescriptorProto.decode(e,e.uint32()));break;case 3:o.options=p.google.protobuf.ServiceOptions.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},Ce.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Ce.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name))return"name: string expected";if(null!=e.method&&e.hasOwnProperty("method")){if(!Array.isArray(e.method))return"method: array expected";for(var t=0;t<e.method.length;++t)if(n=p.google.protobuf.MethodDescriptorProto.verify(e.method[t]))return"method."+n}var n;if(null!=e.options&&e.hasOwnProperty("options")&&(n=p.google.protobuf.ServiceOptions.verify(e.options)))return"options."+n;return null},Ce.fromObject=function(e){if(e instanceof p.google.protobuf.ServiceDescriptorProto)return e;var t=new p.google.protobuf.ServiceDescriptorProto;if(null!=e.name&&(t.name=String(e.name)),e.method){if(!Array.isArray(e.method))throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected");t.method=[];for(var n=0;n<e.method.length;++n){if("object"!=typeof e.method[n])throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected");t.method[n]=p.google.protobuf.MethodDescriptorProto.fromObject(e.method[n])}}if(null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected");t.options=p.google.protobuf.ServiceOptions.fromObject(e.options)}return t},Ce.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.method=[]),t.defaults&&(n.name="",n.options=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),e.method&&e.method.length){n.method=[];for(var o=0;o<e.method.length;++o)n.method[o]=p.google.protobuf.MethodDescriptorProto.toObject(e.method[o],t)}return null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.ServiceOptions.toObject(e.options,t)),n},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.protobuf.ServiceDescriptorProto"},Ce),e.MethodDescriptorProto=(D.prototype.name="",D.prototype.inputType="",D.prototype.outputType="",D.prototype.options=null,D.prototype.clientStreaming=!1,D.prototype.serverStreaming=!1,D.create=function(e){return new D(e)},D.encode=function(e,t){return t=t||a.create(),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")&&p.google.protobuf.MethodOptions.encode(e.options,t.uint32(34).fork()).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},D.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},D.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.MethodDescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.inputType=e.string();break;case 3:o.outputType=e.string();break;case 4:o.options=p.google.protobuf.MethodOptions.decode(e,e.uint32());break;case 5:o.clientStreaming=e.bool();break;case 6:o.serverStreaming=e.bool();break;default:e.skipType(7&r)}}return o},D.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},D.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name))return"name: string expected";if(null!=e.inputType&&e.hasOwnProperty("inputType")&&!c.isString(e.inputType))return"inputType: string expected";if(null!=e.outputType&&e.hasOwnProperty("outputType")&&!c.isString(e.outputType))return"outputType: string expected";if(null!=e.options&&e.hasOwnProperty("options")){var t=p.google.protobuf.MethodOptions.verify(e.options);if(t)return"options."+t}return null!=e.clientStreaming&&e.hasOwnProperty("clientStreaming")&&"boolean"!=typeof e.clientStreaming?"clientStreaming: boolean expected":null!=e.serverStreaming&&e.hasOwnProperty("serverStreaming")&&"boolean"!=typeof e.serverStreaming?"serverStreaming: boolean expected":null},D.fromObject=function(e){if(e instanceof p.google.protobuf.MethodDescriptorProto)return e;var t=new p.google.protobuf.MethodDescriptorProto;if(null!=e.name&&(t.name=String(e.name)),null!=e.inputType&&(t.inputType=String(e.inputType)),null!=e.outputType&&(t.outputType=String(e.outputType)),null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected");t.options=p.google.protobuf.MethodOptions.fromObject(e.options)}return null!=e.clientStreaming&&(t.clientStreaming=Boolean(e.clientStreaming)),null!=e.serverStreaming&&(t.serverStreaming=Boolean(e.serverStreaming)),t},D.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name="",n.inputType="",n.outputType="",n.options=null,n.clientStreaming=!1,n.serverStreaming=!1),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.inputType&&e.hasOwnProperty("inputType")&&(n.inputType=e.inputType),null!=e.outputType&&e.hasOwnProperty("outputType")&&(n.outputType=e.outputType),null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.MethodOptions.toObject(e.options,t)),null!=e.clientStreaming&&e.hasOwnProperty("clientStreaming")&&(n.clientStreaming=e.clientStreaming),null!=e.serverStreaming&&e.hasOwnProperty("serverStreaming")&&(n.serverStreaming=e.serverStreaming),n},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.protobuf.MethodDescriptorProto"},D),e.FileOptions=(x.prototype.javaPackage="",x.prototype.javaOuterClassname="",x.prototype.javaMultipleFiles=!1,x.prototype.javaGenerateEqualsAndHash=!1,x.prototype.javaStringCheckUtf8=!1,x.prototype.optimizeFor=1,x.prototype.goPackage="",x.prototype.ccGenericServices=!1,x.prototype.javaGenericServices=!1,x.prototype.pyGenericServices=!1,x.prototype.phpGenericServices=!1,x.prototype.deprecated=!1,x.prototype.ccEnableArenas=!0,x.prototype.objcClassPrefix="",x.prototype.csharpNamespace="",x.prototype.swiftPrefix="",x.prototype.phpClassPrefix="",x.prototype.phpNamespace="",x.prototype.phpMetadataNamespace="",x.prototype.rubyPackage="",x.prototype.uninterpretedOption=c.emptyArray,x.prototype[".google.api.resourceDefinition"]=c.emptyArray,x.create=function(e){return new x(e)},x.encode=function(e,t){if(t=t||a.create(),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.phpGenericServices&&Object.hasOwnProperty.call(e,"phpGenericServices")&&t.uint32(336).bool(e.phpGenericServices),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.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();if(null!=e[".google.api.resourceDefinition"]&&e[".google.api.resourceDefinition"].length)for(n=0;n<e[".google.api.resourceDefinition"].length;++n)p.google.api.ResourceDescriptor.encode(e[".google.api.resourceDefinition"][n],t.uint32(8426).fork()).ldelim();return t},x.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},x.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.FileOptions;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.javaPackage=e.string();break;case 8:o.javaOuterClassname=e.string();break;case 10:o.javaMultipleFiles=e.bool();break;case 20:o.javaGenerateEqualsAndHash=e.bool();break;case 27:o.javaStringCheckUtf8=e.bool();break;case 9:o.optimizeFor=e.int32();break;case 11:o.goPackage=e.string();break;case 16:o.ccGenericServices=e.bool();break;case 17:o.javaGenericServices=e.bool();break;case 18:o.pyGenericServices=e.bool();break;case 42:o.phpGenericServices=e.bool();break;case 23:o.deprecated=e.bool();break;case 31:o.ccEnableArenas=e.bool();break;case 36:o.objcClassPrefix=e.string();break;case 37:o.csharpNamespace=e.string();break;case 39:o.swiftPrefix=e.string();break;case 40:o.phpClassPrefix=e.string();break;case 41:o.phpNamespace=e.string();break;case 44:o.phpMetadataNamespace=e.string();break;case 45:o.rubyPackage=e.string();break;case 999:o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()));break;case 1053:o[".google.api.resourceDefinition"]&&o[".google.api.resourceDefinition"].length||(o[".google.api.resourceDefinition"]=[]),o[".google.api.resourceDefinition"].push(p.google.api.ResourceDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&r)}}return o},x.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},x.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.javaPackage&&e.hasOwnProperty("javaPackage")&&!c.isString(e.javaPackage))return"javaPackage: string expected";if(null!=e.javaOuterClassname&&e.hasOwnProperty("javaOuterClassname")&&!c.isString(e.javaOuterClassname))return"javaOuterClassname: string expected";if(null!=e.javaMultipleFiles&&e.hasOwnProperty("javaMultipleFiles")&&"boolean"!=typeof e.javaMultipleFiles)return"javaMultipleFiles: boolean expected";if(null!=e.javaGenerateEqualsAndHash&&e.hasOwnProperty("javaGenerateEqualsAndHash")&&"boolean"!=typeof e.javaGenerateEqualsAndHash)return"javaGenerateEqualsAndHash: boolean expected";if(null!=e.javaStringCheckUtf8&&e.hasOwnProperty("javaStringCheckUtf8")&&"boolean"!=typeof e.javaStringCheckUtf8)return"javaStringCheckUtf8: boolean expected";if(null!=e.optimizeFor&&e.hasOwnProperty("optimizeFor"))switch(e.optimizeFor){default:return"optimizeFor: enum value expected";case 1:case 2:case 3:}if(null!=e.goPackage&&e.hasOwnProperty("goPackage")&&!c.isString(e.goPackage))return"goPackage: string expected";if(null!=e.ccGenericServices&&e.hasOwnProperty("ccGenericServices")&&"boolean"!=typeof e.ccGenericServices)return"ccGenericServices: boolean expected";if(null!=e.javaGenericServices&&e.hasOwnProperty("javaGenericServices")&&"boolean"!=typeof e.javaGenericServices)return"javaGenericServices: boolean expected";if(null!=e.pyGenericServices&&e.hasOwnProperty("pyGenericServices")&&"boolean"!=typeof e.pyGenericServices)return"pyGenericServices: boolean expected";if(null!=e.phpGenericServices&&e.hasOwnProperty("phpGenericServices")&&"boolean"!=typeof e.phpGenericServices)return"phpGenericServices: boolean expected";if(null!=e.deprecated&&e.hasOwnProperty("deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.ccEnableArenas&&e.hasOwnProperty("ccEnableArenas")&&"boolean"!=typeof e.ccEnableArenas)return"ccEnableArenas: boolean expected";if(null!=e.objcClassPrefix&&e.hasOwnProperty("objcClassPrefix")&&!c.isString(e.objcClassPrefix))return"objcClassPrefix: string expected";if(null!=e.csharpNamespace&&e.hasOwnProperty("csharpNamespace")&&!c.isString(e.csharpNamespace))return"csharpNamespace: string expected";if(null!=e.swiftPrefix&&e.hasOwnProperty("swiftPrefix")&&!c.isString(e.swiftPrefix))return"swiftPrefix: string expected";if(null!=e.phpClassPrefix&&e.hasOwnProperty("phpClassPrefix")&&!c.isString(e.phpClassPrefix))return"phpClassPrefix: string expected";if(null!=e.phpNamespace&&e.hasOwnProperty("phpNamespace")&&!c.isString(e.phpNamespace))return"phpNamespace: string expected";if(null!=e.phpMetadataNamespace&&e.hasOwnProperty("phpMetadataNamespace")&&!c.isString(e.phpMetadataNamespace))return"phpMetadataNamespace: string expected";if(null!=e.rubyPackage&&e.hasOwnProperty("rubyPackage")&&!c.isString(e.rubyPackage))return"rubyPackage: string expected";if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t)if(n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]))return"uninterpretedOption."+n}if(null!=e[".google.api.resourceDefinition"]&&e.hasOwnProperty(".google.api.resourceDefinition")){if(!Array.isArray(e[".google.api.resourceDefinition"]))return".google.api.resourceDefinition: array expected";for(var n,t=0;t<e[".google.api.resourceDefinition"].length;++t)if(n=p.google.api.ResourceDescriptor.verify(e[".google.api.resourceDefinition"][t]))return".google.api.resourceDefinition."+n}return null},x.fromObject=function(e){if(e instanceof p.google.protobuf.FileOptions)return e;var t=new p.google.protobuf.FileOptions;switch(null!=e.javaPackage&&(t.javaPackage=String(e.javaPackage)),null!=e.javaOuterClassname&&(t.javaOuterClassname=String(e.javaOuterClassname)),null!=e.javaMultipleFiles&&(t.javaMultipleFiles=Boolean(e.javaMultipleFiles)),null!=e.javaGenerateEqualsAndHash&&(t.javaGenerateEqualsAndHash=Boolean(e.javaGenerateEqualsAndHash)),null!=e.javaStringCheckUtf8&&(t.javaStringCheckUtf8=Boolean(e.javaStringCheckUtf8)),e.optimizeFor){default:"number"==typeof e.optimizeFor&&(t.optimizeFor=e.optimizeFor);break;case"SPEED":case 1:t.optimizeFor=1;break;case"CODE_SIZE":case 2:t.optimizeFor=2;break;case"LITE_RUNTIME":case 3:t.optimizeFor=3}if(null!=e.goPackage&&(t.goPackage=String(e.goPackage)),null!=e.ccGenericServices&&(t.ccGenericServices=Boolean(e.ccGenericServices)),null!=e.javaGenericServices&&(t.javaGenericServices=Boolean(e.javaGenericServices)),null!=e.pyGenericServices&&(t.pyGenericServices=Boolean(e.pyGenericServices)),null!=e.phpGenericServices&&(t.phpGenericServices=Boolean(e.phpGenericServices)),null!=e.deprecated&&(t.deprecated=Boolean(e.deprecated)),null!=e.ccEnableArenas&&(t.ccEnableArenas=Boolean(e.ccEnableArenas)),null!=e.objcClassPrefix&&(t.objcClassPrefix=String(e.objcClassPrefix)),null!=e.csharpNamespace&&(t.csharpNamespace=String(e.csharpNamespace)),null!=e.swiftPrefix&&(t.swiftPrefix=String(e.swiftPrefix)),null!=e.phpClassPrefix&&(t.phpClassPrefix=String(e.phpClassPrefix)),null!=e.phpNamespace&&(t.phpNamespace=String(e.phpNamespace)),null!=e.phpMetadataNamespace&&(t.phpMetadataNamespace=String(e.phpMetadataNamespace)),null!=e.rubyPackage&&(t.rubyPackage=String(e.rubyPackage)),e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}if(e[".google.api.resourceDefinition"]){if(!Array.isArray(e[".google.api.resourceDefinition"]))throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected");t[".google.api.resourceDefinition"]=[];for(n=0;n<e[".google.api.resourceDefinition"].length;++n){if("object"!=typeof e[".google.api.resourceDefinition"][n])throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected");t[".google.api.resourceDefinition"][n]=p.google.api.ResourceDescriptor.fromObject(e[".google.api.resourceDefinition"][n])}}return t},x.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[],n[".google.api.resourceDefinition"]=[]),t.defaults&&(n.javaPackage="",n.javaOuterClassname="",n.optimizeFor=t.enums===String?"SPEED":1,n.javaMultipleFiles=!1,n.goPackage="",n.ccGenericServices=!1,n.javaGenericServices=!1,n.pyGenericServices=!1,n.javaGenerateEqualsAndHash=!1,n.deprecated=!1,n.javaStringCheckUtf8=!1,n.ccEnableArenas=!0,n.objcClassPrefix="",n.csharpNamespace="",n.swiftPrefix="",n.phpClassPrefix="",n.phpNamespace="",n.phpGenericServices=!1,n.phpMetadataNamespace="",n.rubyPackage=""),null!=e.javaPackage&&e.hasOwnProperty("javaPackage")&&(n.javaPackage=e.javaPackage),null!=e.javaOuterClassname&&e.hasOwnProperty("javaOuterClassname")&&(n.javaOuterClassname=e.javaOuterClassname),null!=e.optimizeFor&&e.hasOwnProperty("optimizeFor")&&(n.optimizeFor=t.enums!==String||void 0===p.google.protobuf.FileOptions.OptimizeMode[e.optimizeFor]?e.optimizeFor:p.google.protobuf.FileOptions.OptimizeMode[e.optimizeFor]),null!=e.javaMultipleFiles&&e.hasOwnProperty("javaMultipleFiles")&&(n.javaMultipleFiles=e.javaMultipleFiles),null!=e.goPackage&&e.hasOwnProperty("goPackage")&&(n.goPackage=e.goPackage),null!=e.ccGenericServices&&e.hasOwnProperty("ccGenericServices")&&(n.ccGenericServices=e.ccGenericServices),null!=e.javaGenericServices&&e.hasOwnProperty("javaGenericServices")&&(n.javaGenericServices=e.javaGenericServices),null!=e.pyGenericServices&&e.hasOwnProperty("pyGenericServices")&&(n.pyGenericServices=e.pyGenericServices),null!=e.javaGenerateEqualsAndHash&&e.hasOwnProperty("javaGenerateEqualsAndHash")&&(n.javaGenerateEqualsAndHash=e.javaGenerateEqualsAndHash),null!=e.deprecated&&e.hasOwnProperty("deprecated")&&(n.deprecated=e.deprecated),null!=e.javaStringCheckUtf8&&e.hasOwnProperty("javaStringCheckUtf8")&&(n.javaStringCheckUtf8=e.javaStringCheckUtf8),null!=e.ccEnableArenas&&e.hasOwnProperty("ccEnableArenas")&&(n.ccEnableArenas=e.ccEnableArenas),null!=e.objcClassPrefix&&e.hasOwnProperty("objcClassPrefix")&&(n.objcClassPrefix=e.objcClassPrefix),null!=e.csharpNamespace&&e.hasOwnProperty("csharpNamespace")&&(n.csharpNamespace=e.csharpNamespace),null!=e.swiftPrefix&&e.hasOwnProperty("swiftPrefix")&&(n.swiftPrefix=e.swiftPrefix),null!=e.phpClassPrefix&&e.hasOwnProperty("phpClassPrefix")&&(n.phpClassPrefix=e.phpClassPrefix),null!=e.phpNamespace&&e.hasOwnProperty("phpNamespace")&&(n.phpNamespace=e.phpNamespace),null!=e.phpGenericServices&&e.hasOwnProperty("phpGenericServices")&&(n.phpGenericServices=e.phpGenericServices),null!=e.phpMetadataNamespace&&e.hasOwnProperty("phpMetadataNamespace")&&(n.phpMetadataNamespace=e.phpMetadataNamespace),null!=e.rubyPackage&&e.hasOwnProperty("rubyPackage")&&(n.rubyPackage=e.rubyPackage),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}if(e[".google.api.resourceDefinition"]&&e[".google.api.resourceDefinition"].length){n[".google.api.resourceDefinition"]=[];for(o=0;o<e[".google.api.resourceDefinition"].length;++o)n[".google.api.resourceDefinition"][o]=p.google.api.ResourceDescriptor.toObject(e[".google.api.resourceDefinition"][o],t)}return n},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.protobuf.FileOptions"},x.OptimizeMode=(r={},(i=Object.create(r))[r[1]="SPEED"]=1,i[r[2]="CODE_SIZE"]=2,i[r[3]="LITE_RUNTIME"]=3,i),x),e.MessageOptions=(E.prototype.messageSetWireFormat=!1,E.prototype.noStandardDescriptorAccessor=!1,E.prototype.deprecated=!1,E.prototype.mapEntry=!1,E.prototype.deprecatedLegacyJsonFieldConflicts=!1,E.prototype.uninterpretedOption=c.emptyArray,E.prototype[".google.api.resource"]=null,E.create=function(e){return new E(e)},E.encode=function(e,t){if(t=t||a.create(),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.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();return null!=e[".google.api.resource"]&&Object.hasOwnProperty.call(e,".google.api.resource")&&p.google.api.ResourceDescriptor.encode(e[".google.api.resource"],t.uint32(8426).fork()).ldelim(),t},E.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},E.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.MessageOptions;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.messageSetWireFormat=e.bool();break;case 2:o.noStandardDescriptorAccessor=e.bool();break;case 3:o.deprecated=e.bool();break;case 7:o.mapEntry=e.bool();break;case 11:o.deprecatedLegacyJsonFieldConflicts=e.bool();break;case 999:o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()));break;case 1053:o[".google.api.resource"]=p.google.api.ResourceDescriptor.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},E.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},E.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.messageSetWireFormat&&e.hasOwnProperty("messageSetWireFormat")&&"boolean"!=typeof e.messageSetWireFormat)return"messageSetWireFormat: boolean expected";if(null!=e.noStandardDescriptorAccessor&&e.hasOwnProperty("noStandardDescriptorAccessor")&&"boolean"!=typeof e.noStandardDescriptorAccessor)return"noStandardDescriptorAccessor: boolean expected";if(null!=e.deprecated&&e.hasOwnProperty("deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.mapEntry&&e.hasOwnProperty("mapEntry")&&"boolean"!=typeof e.mapEntry)return"mapEntry: boolean expected";if(null!=e.deprecatedLegacyJsonFieldConflicts&&e.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")&&"boolean"!=typeof e.deprecatedLegacyJsonFieldConflicts)return"deprecatedLegacyJsonFieldConflicts: boolean expected";if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t)if(n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]))return"uninterpretedOption."+n}var n;if(null!=e[".google.api.resource"]&&e.hasOwnProperty(".google.api.resource")&&(n=p.google.api.ResourceDescriptor.verify(e[".google.api.resource"])))return".google.api.resource."+n;return null},E.fromObject=function(e){if(e instanceof p.google.protobuf.MessageOptions)return e;var t=new p.google.protobuf.MessageOptions;if(null!=e.messageSetWireFormat&&(t.messageSetWireFormat=Boolean(e.messageSetWireFormat)),null!=e.noStandardDescriptorAccessor&&(t.noStandardDescriptorAccessor=Boolean(e.noStandardDescriptorAccessor)),null!=e.deprecated&&(t.deprecated=Boolean(e.deprecated)),null!=e.mapEntry&&(t.mapEntry=Boolean(e.mapEntry)),null!=e.deprecatedLegacyJsonFieldConflicts&&(t.deprecatedLegacyJsonFieldConflicts=Boolean(e.deprecatedLegacyJsonFieldConflicts)),e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}if(null!=e[".google.api.resource"]){if("object"!=typeof e[".google.api.resource"])throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected");t[".google.api.resource"]=p.google.api.ResourceDescriptor.fromObject(e[".google.api.resource"])}return t},E.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[]),t.defaults&&(n.messageSetWireFormat=!1,n.noStandardDescriptorAccessor=!1,n.deprecated=!1,n.mapEntry=!1,n.deprecatedLegacyJsonFieldConflicts=!1,n[".google.api.resource"]=null),null!=e.messageSetWireFormat&&e.hasOwnProperty("messageSetWireFormat")&&(n.messageSetWireFormat=e.messageSetWireFormat),null!=e.noStandardDescriptorAccessor&&e.hasOwnProperty("noStandardDescriptorAccessor")&&(n.noStandardDescriptorAccessor=e.noStandardDescriptorAccessor),null!=e.deprecated&&e.hasOwnProperty("deprecated")&&(n.deprecated=e.deprecated),null!=e.mapEntry&&e.hasOwnProperty("mapEntry")&&(n.mapEntry=e.mapEntry),null!=e.deprecatedLegacyJsonFieldConflicts&&e.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")&&(n.deprecatedLegacyJsonFieldConflicts=e.deprecatedLegacyJsonFieldConflicts),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}return null!=e[".google.api.resource"]&&e.hasOwnProperty(".google.api.resource")&&(n[".google.api.resource"]=p.google.api.ResourceDescriptor.toObject(e[".google.api.resource"],t)),n},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.protobuf.MessageOptions"},E),e.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.target=0,C.prototype.uninterpretedOption=c.emptyArray,C.prototype[".google.api.resourceReference"]=null,C.prototype[".google.api.fieldBehavior"]=c.emptyArray,C.create=function(e){return new C(e)},C.encode=function(e,t){if(t=t||a.create(),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.target&&Object.hasOwnProperty.call(e,"target")&&t.uint32(144).int32(e.target),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();if(null!=e[".google.api.fieldBehavior"]&&e[".google.api.fieldBehavior"].length){t.uint32(8418).fork();for(n=0;n<e[".google.api.fieldBehavior"].length;++n)t.int32(e[".google.api.fieldBehavior"][n]);t.ldelim()}return null!=e[".google.api.resourceReference"]&&Object.hasOwnProperty.call(e,".google.api.resourceReference")&&p.google.api.ResourceReference.encode(e[".google.api.resourceReference"],t.uint32(8442).fork()).ldelim(),t},C.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},C.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.FieldOptions;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.ctype=e.int32();break;case 2:o.packed=e.bool();break;case 6:o.jstype=e.int32();break;case 5:o.lazy=e.bool();break;case 15:o.unverifiedLazy=e.bool();break;case 3:o.deprecated=e.bool();break;case 10:o.weak=e.bool();break;case 16:o.debugRedact=e.bool();break;case 17:o.retention=e.int32();break;case 18:o.target=e.int32();break;case 999:o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()));break;case 1055:o[".google.api.resourceReference"]=p.google.api.ResourceReference.decode(e,e.uint32());break;case 1052:if(o[".google.api.fieldBehavior"]&&o[".google.api.fieldBehavior"].length||(o[".google.api.fieldBehavior"]=[]),2==(7&r))for(var i=e.uint32()+e.pos;e.pos<i;)o[".google.api.fieldBehavior"].push(e.int32());else o[".google.api.fieldBehavior"].push(e.int32());break;default:e.skipType(7&r)}}return o},C.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},C.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.ctype&&e.hasOwnProperty("ctype"))switch(e.ctype){default:return"ctype: enum value expected";case 0:case 1:case 2:}if(null!=e.packed&&e.hasOwnProperty("packed")&&"boolean"!=typeof e.packed)return"packed: boolean expected";if(null!=e.jstype&&e.hasOwnProperty("jstype"))switch(e.jstype){default:return"jstype: enum value expected";case 0:case 1:case 2:}if(null!=e.lazy&&e.hasOwnProperty("lazy")&&"boolean"!=typeof e.lazy)return"lazy: boolean expected";if(null!=e.unverifiedLazy&&e.hasOwnProperty("unverifiedLazy")&&"boolean"!=typeof e.unverifiedLazy)return"unverifiedLazy: boolean expected";if(null!=e.deprecated&&e.hasOwnProperty("deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.weak&&e.hasOwnProperty("weak")&&"boolean"!=typeof e.weak)return"weak: boolean expected";if(null!=e.debugRedact&&e.hasOwnProperty("debugRedact")&&"boolean"!=typeof e.debugRedact)return"debugRedact: boolean expected";if(null!=e.retention&&e.hasOwnProperty("retention"))switch(e.retention){default:return"retention: enum value expected";case 0:case 1:case 2:}if(null!=e.target&&e.hasOwnProperty("target"))switch(e.target){default:return"target: 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.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t)if(n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]))return"uninterpretedOption."+n}var n;if(null!=e[".google.api.resourceReference"]&&e.hasOwnProperty(".google.api.resourceReference")&&(n=p.google.api.ResourceReference.verify(e[".google.api.resourceReference"])))return".google.api.resourceReference."+n;if(null!=e[".google.api.fieldBehavior"]&&e.hasOwnProperty(".google.api.fieldBehavior")){if(!Array.isArray(e[".google.api.fieldBehavior"]))return".google.api.fieldBehavior: array expected";for(t=0;t<e[".google.api.fieldBehavior"].length;++t)switch(e[".google.api.fieldBehavior"][t]){default:return".google.api.fieldBehavior: enum value[] expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}}return null},C.fromObject=function(e){if(e instanceof p.google.protobuf.FieldOptions)return e;var t=new p.google.protobuf.FieldOptions;switch(e.ctype){default:"number"==typeof e.ctype&&(t.ctype=e.ctype);break;case"STRING":case 0:t.ctype=0;break;case"CORD":case 1:t.ctype=1;break;case"STRING_PIECE":case 2:t.ctype=2}switch(null!=e.packed&&(t.packed=Boolean(e.packed)),e.jstype){default:"number"==typeof e.jstype&&(t.jstype=e.jstype);break;case"JS_NORMAL":case 0:t.jstype=0;break;case"JS_STRING":case 1:t.jstype=1;break;case"JS_NUMBER":case 2:t.jstype=2}switch(null!=e.lazy&&(t.lazy=Boolean(e.lazy)),null!=e.unverifiedLazy&&(t.unverifiedLazy=Boolean(e.unverifiedLazy)),null!=e.deprecated&&(t.deprecated=Boolean(e.deprecated)),null!=e.weak&&(t.weak=Boolean(e.weak)),null!=e.debugRedact&&(t.debugRedact=Boolean(e.debugRedact)),e.retention){default:"number"==typeof e.retention&&(t.retention=e.retention);break;case"RETENTION_UNKNOWN":case 0:t.retention=0;break;case"RETENTION_RUNTIME":case 1:t.retention=1;break;case"RETENTION_SOURCE":case 2:t.retention=2}switch(e.target){default:"number"==typeof e.target&&(t.target=e.target);break;case"TARGET_TYPE_UNKNOWN":case 0:t.target=0;break;case"TARGET_TYPE_FILE":case 1:t.target=1;break;case"TARGET_TYPE_EXTENSION_RANGE":case 2:t.target=2;break;case"TARGET_TYPE_MESSAGE":case 3:t.target=3;break;case"TARGET_TYPE_FIELD":case 4:t.target=4;break;case"TARGET_TYPE_ONEOF":case 5:t.target=5;break;case"TARGET_TYPE_ENUM":case 6:t.target=6;break;case"TARGET_TYPE_ENUM_ENTRY":case 7:t.target=7;break;case"TARGET_TYPE_SERVICE":case 8:t.target=8;break;case"TARGET_TYPE_METHOD":case 9:t.target=9}if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}if(null!=e[".google.api.resourceReference"]){if("object"!=typeof e[".google.api.resourceReference"])throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected");t[".google.api.resourceReference"]=p.google.api.ResourceReference.fromObject(e[".google.api.resourceReference"])}if(e[".google.api.fieldBehavior"]){if(!Array.isArray(e[".google.api.fieldBehavior"]))throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected");t[".google.api.fieldBehavior"]=[];for(n=0;n<e[".google.api.fieldBehavior"].length;++n)switch(e[".google.api.fieldBehavior"][n]){default:if("number"==typeof e[".google.api.fieldBehavior"][n]){t[".google.api.fieldBehavior"][n]=e[".google.api.fieldBehavior"][n];break}case"FIELD_BEHAVIOR_UNSPECIFIED":case 0:t[".google.api.fieldBehavior"][n]=0;break;case"OPTIONAL":case 1:t[".google.api.fieldBehavior"][n]=1;break;case"REQUIRED":case 2:t[".google.api.fieldBehavior"][n]=2;break;case"OUTPUT_ONLY":case 3:t[".google.api.fieldBehavior"][n]=3;break;case"INPUT_ONLY":case 4:t[".google.api.fieldBehavior"][n]=4;break;case"IMMUTABLE":case 5:t[".google.api.fieldBehavior"][n]=5;break;case"UNORDERED_LIST":case 6:t[".google.api.fieldBehavior"][n]=6;break;case"NON_EMPTY_DEFAULT":case 7:t[".google.api.fieldBehavior"][n]=7}}return t},C.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[],n[".google.api.fieldBehavior"]=[]),t.defaults&&(n.ctype=t.enums===String?"STRING":0,n.packed=!1,n.deprecated=!1,n.lazy=!1,n.jstype=t.enums===String?"JS_NORMAL":0,n.weak=!1,n.unverifiedLazy=!1,n.debugRedact=!1,n.retention=t.enums===String?"RETENTION_UNKNOWN":0,n.target=t.enums===String?"TARGET_TYPE_UNKNOWN":0,n[".google.api.resourceReference"]=null),null!=e.ctype&&e.hasOwnProperty("ctype")&&(n.ctype=t.enums!==String||void 0===p.google.protobuf.FieldOptions.CType[e.ctype]?e.ctype:p.google.protobuf.FieldOptions.CType[e.ctype]),null!=e.packed&&e.hasOwnProperty("packed")&&(n.packed=e.packed),null!=e.deprecated&&e.hasOwnProperty("deprecated")&&(n.deprecated=e.deprecated),null!=e.lazy&&e.hasOwnProperty("lazy")&&(n.lazy=e.lazy),null!=e.jstype&&e.hasOwnProperty("jstype")&&(n.jstype=t.enums!==String||void 0===p.google.protobuf.FieldOptions.JSType[e.jstype]?e.jstype:p.google.protobuf.FieldOptions.JSType[e.jstype]),null!=e.weak&&e.hasOwnProperty("weak")&&(n.weak=e.weak),null!=e.unverifiedLazy&&e.hasOwnProperty("unverifiedLazy")&&(n.unverifiedLazy=e.unverifiedLazy),null!=e.debugRedact&&e.hasOwnProperty("debugRedact")&&(n.debugRedact=e.debugRedact),null!=e.retention&&e.hasOwnProperty("retention")&&(n.retention=t.enums!==String||void 0===p.google.protobuf.FieldOptions.OptionRetention[e.retention]?e.retention:p.google.protobuf.FieldOptions.OptionRetention[e.retention]),null!=e.target&&e.hasOwnProperty("target")&&(n.target=t.enums!==String||void 0===p.google.protobuf.FieldOptions.OptionTargetType[e.target]?e.target:p.google.protobuf.FieldOptions.OptionTargetType[e.target]),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}if(e[".google.api.fieldBehavior"]&&e[".google.api.fieldBehavior"].length){n[".google.api.fieldBehavior"]=[];for(o=0;o<e[".google.api.fieldBehavior"].length;++o)n[".google.api.fieldBehavior"][o]=t.enums!==String||void 0===p.google.api.FieldBehavior[e[".google.api.fieldBehavior"][o]]?e[".google.api.fieldBehavior"][o]:p.google.api.FieldBehavior[e[".google.api.fieldBehavior"][o]]}return null!=e[".google.api.resourceReference"]&&e.hasOwnProperty(".google.api.resourceReference")&&(n[".google.api.resourceReference"]=p.google.api.ResourceReference.toObject(e[".google.api.resourceReference"],t)),n},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=(r={},(i=Object.create(r))[r[0]="STRING"]=0,i[r[1]="CORD"]=1,i[r[2]="STRING_PIECE"]=2,i),C.JSType=(r={},(i=Object.create(r))[r[0]="JS_NORMAL"]=0,i[r[1]="JS_STRING"]=1,i[r[2]="JS_NUMBER"]=2,i),C.OptionRetention=(r={},(i=Object.create(r))[r[0]="RETENTION_UNKNOWN"]=0,i[r[1]="RETENTION_RUNTIME"]=1,i[r[2]="RETENTION_SOURCE"]=2,i),C.OptionTargetType=(r={},(i=Object.create(r))[r[0]="TARGET_TYPE_UNKNOWN"]=0,i[r[1]="TARGET_TYPE_FILE"]=1,i[r[2]="TARGET_TYPE_EXTENSION_RANGE"]=2,i[r[3]="TARGET_TYPE_MESSAGE"]=3,i[r[4]="TARGET_TYPE_FIELD"]=4,i[r[5]="TARGET_TYPE_ONEOF"]=5,i[r[6]="TARGET_TYPE_ENUM"]=6,i[r[7]="TARGET_TYPE_ENUM_ENTRY"]=7,i[r[8]="TARGET_TYPE_SERVICE"]=8,i[r[9]="TARGET_TYPE_METHOD"]=9,i),C),e.OneofOptions=(Re.prototype.uninterpretedOption=c.emptyArray,Re.create=function(e){return new Re(e)},Re.encode=function(e,t){if(t=t||a.create(),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();return t},Re.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Re.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.OneofOptions;e.pos<n;){var r=e.uint32();r>>>3==999?(o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()))):e.skipType(7&r)}return o},Re.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Re.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t){var n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]);if(n)return"uninterpretedOption."+n}}return null},Re.fromObject=function(e){if(e instanceof p.google.protobuf.OneofOptions)return e;var t=new p.google.protobuf.OneofOptions;if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}return t},Re.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[]),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}return n},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.protobuf.OneofOptions"},Re),e.EnumOptions=(Ne.prototype.allowAlias=!1,Ne.prototype.deprecated=!1,Ne.prototype.deprecatedLegacyJsonFieldConflicts=!1,Ne.prototype.uninterpretedOption=c.emptyArray,Ne.create=function(e){return new Ne(e)},Ne.encode=function(e,t){if(t=t||a.create(),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.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();return t},Ne.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ne.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.EnumOptions;e.pos<n;){var r=e.uint32();switch(r>>>3){case 2:o.allowAlias=e.bool();break;case 3:o.deprecated=e.bool();break;case 6:o.deprecatedLegacyJsonFieldConflicts=e.bool();break;case 999:o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()));break;default:e.skipType(7&r)}}return o},Ne.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Ne.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.allowAlias&&e.hasOwnProperty("allowAlias")&&"boolean"!=typeof e.allowAlias)return"allowAlias: boolean expected";if(null!=e.deprecated&&e.hasOwnProperty("deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.deprecatedLegacyJsonFieldConflicts&&e.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")&&"boolean"!=typeof e.deprecatedLegacyJsonFieldConflicts)return"deprecatedLegacyJsonFieldConflicts: boolean expected";if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t){var n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]);if(n)return"uninterpretedOption."+n}}return null},Ne.fromObject=function(e){if(e instanceof p.google.protobuf.EnumOptions)return e;var t=new p.google.protobuf.EnumOptions;if(null!=e.allowAlias&&(t.allowAlias=Boolean(e.allowAlias)),null!=e.deprecated&&(t.deprecated=Boolean(e.deprecated)),null!=e.deprecatedLegacyJsonFieldConflicts&&(t.deprecatedLegacyJsonFieldConflicts=Boolean(e.deprecatedLegacyJsonFieldConflicts)),e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}return t},Ne.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[]),t.defaults&&(n.allowAlias=!1,n.deprecated=!1,n.deprecatedLegacyJsonFieldConflicts=!1),null!=e.allowAlias&&e.hasOwnProperty("allowAlias")&&(n.allowAlias=e.allowAlias),null!=e.deprecated&&e.hasOwnProperty("deprecated")&&(n.deprecated=e.deprecated),null!=e.deprecatedLegacyJsonFieldConflicts&&e.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")&&(n.deprecatedLegacyJsonFieldConflicts=e.deprecatedLegacyJsonFieldConflicts),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}return n},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.protobuf.EnumOptions"},Ne),e.EnumValueOptions=(Ae.prototype.deprecated=!1,Ae.prototype.uninterpretedOption=c.emptyArray,Ae.create=function(e){return new Ae(e)},Ae.encode=function(e,t){if(t=t||a.create(),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&t.uint32(8).bool(e.deprecated),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();return t},Ae.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ae.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.EnumValueOptions;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.deprecated=e.bool();break;case 999:o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()));break;default:e.skipType(7&r)}}return o},Ae.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Ae.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.deprecated&&e.hasOwnProperty("deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t){var n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]);if(n)return"uninterpretedOption."+n}}return null},Ae.fromObject=function(e){if(e instanceof p.google.protobuf.EnumValueOptions)return e;var t=new p.google.protobuf.EnumValueOptions;if(null!=e.deprecated&&(t.deprecated=Boolean(e.deprecated)),e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}return t},Ae.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[]),t.defaults&&(n.deprecated=!1),null!=e.deprecated&&e.hasOwnProperty("deprecated")&&(n.deprecated=e.deprecated),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}return n},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.protobuf.EnumValueOptions"},Ae),e.ServiceOptions=(Ue.prototype.deprecated=!1,Ue.prototype.uninterpretedOption=c.emptyArray,Ue.prototype[".google.api.defaultHost"]="",Ue.prototype[".google.api.oauthScopes"]="",Ue.create=function(e){return new Ue(e)},Ue.encode=function(e,t){if(t=t||a.create(),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&t.uint32(264).bool(e.deprecated),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).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"]),t},Ue.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ue.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.ServiceOptions;e.pos<n;){var r=e.uint32();switch(r>>>3){case 33:o.deprecated=e.bool();break;case 999:o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()));break;case 1049:o[".google.api.defaultHost"]=e.string();break;case 1050:o[".google.api.oauthScopes"]=e.string();break;default:e.skipType(7&r)}}return o},Ue.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Ue.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.deprecated&&e.hasOwnProperty("deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t){var n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]);if(n)return"uninterpretedOption."+n}}return null!=e[".google.api.defaultHost"]&&e.hasOwnProperty(".google.api.defaultHost")&&!c.isString(e[".google.api.defaultHost"])?".google.api.defaultHost: string expected":null!=e[".google.api.oauthScopes"]&&e.hasOwnProperty(".google.api.oauthScopes")&&!c.isString(e[".google.api.oauthScopes"])?".google.api.oauthScopes: string expected":null},Ue.fromObject=function(e){if(e instanceof p.google.protobuf.ServiceOptions)return e;var t=new p.google.protobuf.ServiceOptions;if(null!=e.deprecated&&(t.deprecated=Boolean(e.deprecated)),e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}return null!=e[".google.api.defaultHost"]&&(t[".google.api.defaultHost"]=String(e[".google.api.defaultHost"])),null!=e[".google.api.oauthScopes"]&&(t[".google.api.oauthScopes"]=String(e[".google.api.oauthScopes"])),t},Ue.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[]),t.defaults&&(n.deprecated=!1,n[".google.api.defaultHost"]="",n[".google.api.oauthScopes"]=""),null!=e.deprecated&&e.hasOwnProperty("deprecated")&&(n.deprecated=e.deprecated),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}return null!=e[".google.api.defaultHost"]&&e.hasOwnProperty(".google.api.defaultHost")&&(n[".google.api.defaultHost"]=e[".google.api.defaultHost"]),null!=e[".google.api.oauthScopes"]&&e.hasOwnProperty(".google.api.oauthScopes")&&(n[".google.api.oauthScopes"]=e[".google.api.oauthScopes"]),n},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.protobuf.ServiceOptions"},Ue),e.MethodOptions=(R.prototype.deprecated=!1,R.prototype.idempotencyLevel=0,R.prototype.uninterpretedOption=c.emptyArray,R.prototype[".google.api.http"]=null,R.prototype[".google.api.methodSignature"]=c.emptyArray,R.prototype[".google.longrunning.operationInfo"]=null,R.create=function(e){return new R(e)},R.encode=function(e,t){if(t=t||a.create(),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.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();if(null!=e[".google.longrunning.operationInfo"]&&Object.hasOwnProperty.call(e,".google.longrunning.operationInfo")&&p.google.longrunning.OperationInfo.encode(e[".google.longrunning.operationInfo"],t.uint32(8394).fork()).ldelim(),null!=e[".google.api.methodSignature"]&&e[".google.api.methodSignature"].length)for(n=0;n<e[".google.api.methodSignature"].length;++n)t.uint32(8410).string(e[".google.api.methodSignature"][n]);return null!=e[".google.api.http"]&&Object.hasOwnProperty.call(e,".google.api.http")&&p.google.api.HttpRule.encode(e[".google.api.http"],t.uint32(578365826).fork()).ldelim(),t},R.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},R.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.MethodOptions;e.pos<n;){var r=e.uint32();switch(r>>>3){case 33:o.deprecated=e.bool();break;case 34:o.idempotencyLevel=e.int32();break;case 999:o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()));break;case 72295728:o[".google.api.http"]=p.google.api.HttpRule.decode(e,e.uint32());break;case 1051:o[".google.api.methodSignature"]&&o[".google.api.methodSignature"].length||(o[".google.api.methodSignature"]=[]),o[".google.api.methodSignature"].push(e.string());break;case 1049:o[".google.longrunning.operationInfo"]=p.google.longrunning.OperationInfo.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},R.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},R.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.deprecated&&e.hasOwnProperty("deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.idempotencyLevel&&e.hasOwnProperty("idempotencyLevel"))switch(e.idempotencyLevel){default:return"idempotencyLevel: enum value expected";case 0:case 1:case 2:}if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t)if(n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]))return"uninterpretedOption."+n}var n;if(null!=e[".google.api.http"]&&e.hasOwnProperty(".google.api.http")&&(n=p.google.api.HttpRule.verify(e[".google.api.http"])))return".google.api.http."+n;if(null!=e[".google.api.methodSignature"]&&e.hasOwnProperty(".google.api.methodSignature")){if(!Array.isArray(e[".google.api.methodSignature"]))return".google.api.methodSignature: array expected";for(t=0;t<e[".google.api.methodSignature"].length;++t)if(!c.isString(e[".google.api.methodSignature"][t]))return".google.api.methodSignature: string[] expected"}if(null!=e[".google.longrunning.operationInfo"]&&e.hasOwnProperty(".google.longrunning.operationInfo")&&(n=p.google.longrunning.OperationInfo.verify(e[".google.longrunning.operationInfo"])))return".google.longrunning.operationInfo."+n;return null},R.fromObject=function(e){if(e instanceof p.google.protobuf.MethodOptions)return e;var t=new p.google.protobuf.MethodOptions;switch(null!=e.deprecated&&(t.deprecated=Boolean(e.deprecated)),e.idempotencyLevel){default:"number"==typeof e.idempotencyLevel&&(t.idempotencyLevel=e.idempotencyLevel);break;case"IDEMPOTENCY_UNKNOWN":case 0:t.idempotencyLevel=0;break;case"NO_SIDE_EFFECTS":case 1:t.idempotencyLevel=1;break;case"IDEMPOTENT":case 2:t.idempotencyLevel=2}if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}if(null!=e[".google.api.http"]){if("object"!=typeof e[".google.api.http"])throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected");t[".google.api.http"]=p.google.api.HttpRule.fromObject(e[".google.api.http"])}if(e[".google.api.methodSignature"]){if(!Array.isArray(e[".google.api.methodSignature"]))throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected");t[".google.api.methodSignature"]=[];for(n=0;n<e[".google.api.methodSignature"].length;++n)t[".google.api.methodSignature"][n]=String(e[".google.api.methodSignature"][n])}if(null!=e[".google.longrunning.operationInfo"]){if("object"!=typeof e[".google.longrunning.operationInfo"])throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected");t[".google.longrunning.operationInfo"]=p.google.longrunning.OperationInfo.fromObject(e[".google.longrunning.operationInfo"])}return t},R.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[],n[".google.api.methodSignature"]=[]),t.defaults&&(n.deprecated=!1,n.idempotencyLevel=t.enums===String?"IDEMPOTENCY_UNKNOWN":0,n[".google.longrunning.operationInfo"]=null,n[".google.api.http"]=null),null!=e.deprecated&&e.hasOwnProperty("deprecated")&&(n.deprecated=e.deprecated),null!=e.idempotencyLevel&&e.hasOwnProperty("idempotencyLevel")&&(n.idempotencyLevel=t.enums!==String||void 0===p.google.protobuf.MethodOptions.IdempotencyLevel[e.idempotencyLevel]?e.idempotencyLevel:p.google.protobuf.MethodOptions.IdempotencyLevel[e.idempotencyLevel]),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}if(null!=e[".google.longrunning.operationInfo"]&&e.hasOwnProperty(".google.longrunning.operationInfo")&&(n[".google.longrunning.operationInfo"]=p.google.longrunning.OperationInfo.toObject(e[".google.longrunning.operationInfo"],t)),e[".google.api.methodSignature"]&&e[".google.api.methodSignature"].length){n[".google.api.methodSignature"]=[];for(o=0;o<e[".google.api.methodSignature"].length;++o)n[".google.api.methodSignature"][o]=e[".google.api.methodSignature"][o]}return null!=e[".google.api.http"]&&e.hasOwnProperty(".google.api.http")&&(n[".google.api.http"]=p.google.api.HttpRule.toObject(e[".google.api.http"],t)),n},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.MethodOptions"},R.IdempotencyLevel=(r={},(i=Object.create(r))[r[0]="IDEMPOTENCY_UNKNOWN"]=0,i[r[1]="NO_SIDE_EFFECTS"]=1,i[r[2]="IDEMPOTENT"]=2,i),R),e.UninterpretedOption=(N.prototype.name=c.emptyArray,N.prototype.identifierValue="",N.prototype.positiveIntValue=c.Long?c.Long.fromBits(0,0,!0):0,N.prototype.negativeIntValue=c.Long?c.Long.fromBits(0,0,!1):0,N.prototype.doubleValue=0,N.prototype.stringValue=c.newBuffer([]),N.prototype.aggregateValue="",N.create=function(e){return new N(e)},N.encode=function(e,t){if(t=t||a.create(),null!=e.name&&e.name.length)for(var n=0;n<e.name.length;++n)p.google.protobuf.UninterpretedOption.NamePart.encode(e.name[n],t.uint32(18).fork()).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},N.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},N.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.UninterpretedOption;e.pos<n;){var r=e.uint32();switch(r>>>3){case 2:o.name&&o.name.length||(o.name=[]),o.name.push(p.google.protobuf.UninterpretedOption.NamePart.decode(e,e.uint32()));break;case 3:o.identifierValue=e.string();break;case 4:o.positiveIntValue=e.uint64();break;case 5:o.negativeIntValue=e.int64();break;case 6:o.doubleValue=e.double();break;case 7:o.stringValue=e.bytes();break;case 8:o.aggregateValue=e.string();break;default:e.skipType(7&r)}}return o},N.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},N.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")){if(!Array.isArray(e.name))return"name: array expected";for(var t=0;t<e.name.length;++t){var n=p.google.protobuf.UninterpretedOption.NamePart.verify(e.name[t]);if(n)return"name."+n}}return null!=e.identifierValue&&e.hasOwnProperty("identifierValue")&&!c.isString(e.identifierValue)?"identifierValue: string expected":null!=e.positiveIntValue&&e.hasOwnProperty("positiveIntValue")&&!(c.isInteger(e.positiveIntValue)||e.positiveIntValue&&c.isInteger(e.positiveIntValue.low)&&c.isInteger(e.positiveIntValue.high))?"positiveIntValue: integer|Long expected":null!=e.negativeIntValue&&e.hasOwnProperty("negativeIntValue")&&!(c.isInteger(e.negativeIntValue)||e.negativeIntValue&&c.isInteger(e.negativeIntValue.low)&&c.isInteger(e.negativeIntValue.high))?"negativeIntValue: integer|Long expected":null!=e.doubleValue&&e.hasOwnProperty("doubleValue")&&"number"!=typeof e.doubleValue?"doubleValue: number expected":null!=e.stringValue&&e.hasOwnProperty("stringValue")&&!(e.stringValue&&"number"==typeof e.stringValue.length||c.isString(e.stringValue))?"stringValue: buffer expected":null!=e.aggregateValue&&e.hasOwnProperty("aggregateValue")&&!c.isString(e.aggregateValue)?"aggregateValue: string expected":null},N.fromObject=function(e){if(e instanceof p.google.protobuf.UninterpretedOption)return e;var t=new p.google.protobuf.UninterpretedOption;if(e.name){if(!Array.isArray(e.name))throw TypeError(".google.protobuf.UninterpretedOption.name: array expected");t.name=[];for(var n=0;n<e.name.length;++n){if("object"!=typeof e.name[n])throw TypeError(".google.protobuf.UninterpretedOption.name: object expected");t.name[n]=p.google.protobuf.UninterpretedOption.NamePart.fromObject(e.name[n])}}return null!=e.identifierValue&&(t.identifierValue=String(e.identifierValue)),null!=e.positiveIntValue&&(c.Long?(t.positiveIntValue=c.Long.fromValue(e.positiveIntValue)).unsigned=!0:"string"==typeof e.positiveIntValue?t.positiveIntValue=parseInt(e.positiveIntValue,10):"number"==typeof e.positiveIntValue?t.positiveIntValue=e.positiveIntValue:"object"==typeof e.positiveIntValue&&(t.positiveIntValue=new c.LongBits(e.positiveIntValue.low>>>0,e.positiveIntValue.high>>>0).toNumber(!0))),null!=e.negativeIntValue&&(c.Long?(t.negativeIntValue=c.Long.fromValue(e.negativeIntValue)).unsigned=!1:"string"==typeof e.negativeIntValue?t.negativeIntValue=parseInt(e.negativeIntValue,10):"number"==typeof e.negativeIntValue?t.negativeIntValue=e.negativeIntValue:"object"==typeof e.negativeIntValue&&(t.negativeIntValue=new c.LongBits(e.negativeIntValue.low>>>0,e.negativeIntValue.high>>>0).toNumber())),null!=e.doubleValue&&(t.doubleValue=Number(e.doubleValue)),null!=e.stringValue&&("string"==typeof e.stringValue?c.base64.decode(e.stringValue,t.stringValue=c.newBuffer(c.base64.length(e.stringValue)),0):0<=e.stringValue.length&&(t.stringValue=e.stringValue)),null!=e.aggregateValue&&(t.aggregateValue=String(e.aggregateValue)),t},N.toObject=function(e,t){var n,o={};if(((t=t||{}).arrays||t.defaults)&&(o.name=[]),t.defaults&&(o.identifierValue="",c.Long?(n=new c.Long(0,0,!0),o.positiveIntValue=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.positiveIntValue=t.longs===String?"0":0,c.Long?(n=new c.Long(0,0,!1),o.negativeIntValue=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.negativeIntValue=t.longs===String?"0":0,o.doubleValue=0,t.bytes===String?o.stringValue="":(o.stringValue=[],t.bytes!==Array&&(o.stringValue=c.newBuffer(o.stringValue))),o.aggregateValue=""),e.name&&e.name.length){o.name=[];for(var r=0;r<e.name.length;++r)o.name[r]=p.google.protobuf.UninterpretedOption.NamePart.toObject(e.name[r],t)}return null!=e.identifierValue&&e.hasOwnProperty("identifierValue")&&(o.identifierValue=e.identifierValue),null!=e.positiveIntValue&&e.hasOwnProperty("positiveIntValue")&&("number"==typeof e.positiveIntValue?o.positiveIntValue=t.longs===String?String(e.positiveIntValue):e.positiveIntValue:o.positiveIntValue=t.longs===String?c.Long.prototype.toString.call(e.positiveIntValue):t.longs===Number?new c.LongBits(e.positiveIntValue.low>>>0,e.positiveIntValue.high>>>0).toNumber(!0):e.positiveIntValue),null!=e.negativeIntValue&&e.hasOwnProperty("negativeIntValue")&&("number"==typeof e.negativeIntValue?o.negativeIntValue=t.longs===String?String(e.negativeIntValue):e.negativeIntValue:o.negativeIntValue=t.longs===String?c.Long.prototype.toString.call(e.negativeIntValue):t.longs===Number?new c.LongBits(e.negativeIntValue.low>>>0,e.negativeIntValue.high>>>0).toNumber():e.negativeIntValue),null!=e.doubleValue&&e.hasOwnProperty("doubleValue")&&(o.doubleValue=t.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue),null!=e.stringValue&&e.hasOwnProperty("stringValue")&&(o.stringValue=t.bytes===String?c.base64.encode(e.stringValue,0,e.stringValue.length):t.bytes===Array?Array.prototype.slice.call(e.stringValue):e.stringValue),null!=e.aggregateValue&&e.hasOwnProperty("aggregateValue")&&(o.aggregateValue=e.aggregateValue),o},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.UninterpretedOption"},N.NamePart=(Le.prototype.namePart="",Le.prototype.isExtension=!1,Le.create=function(e){return new Le(e)},Le.encode=function(e,t){return(t=t||a.create()).uint32(10).string(e.namePart),t.uint32(16).bool(e.isExtension),t},Le.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Le.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.UninterpretedOption.NamePart;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.namePart=e.string();break;case 2:o.isExtension=e.bool();break;default:e.skipType(7&r)}}if(!o.hasOwnProperty("namePart"))throw c.ProtocolError("missing required 'namePart'",{instance:o});if(o.hasOwnProperty("isExtension"))return o;throw c.ProtocolError("missing required 'isExtension'",{instance:o})},Le.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Le.verify=function(e){return"object"!=typeof e||null===e?"object expected":c.isString(e.namePart)?"boolean"!=typeof e.isExtension?"isExtension: boolean expected":null:"namePart: string expected"},Le.fromObject=function(e){var t;return e instanceof p.google.protobuf.UninterpretedOption.NamePart?e:(t=new p.google.protobuf.UninterpretedOption.NamePart,null!=e.namePart&&(t.namePart=String(e.namePart)),null!=e.isExtension&&(t.isExtension=Boolean(e.isExtension)),t)},Le.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.namePart="",n.isExtension=!1),null!=e.namePart&&e.hasOwnProperty("namePart")&&(n.namePart=e.namePart),null!=e.isExtension&&e.hasOwnProperty("isExtension")&&(n.isExtension=e.isExtension),n},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.protobuf.UninterpretedOption.NamePart"},Le),N),e.SourceCodeInfo=(Ve.prototype.location=c.emptyArray,Ve.create=function(e){return new Ve(e)},Ve.encode=function(e,t){if(t=t||a.create(),null!=e.location&&e.location.length)for(var n=0;n<e.location.length;++n)p.google.protobuf.SourceCodeInfo.Location.encode(e.location[n],t.uint32(10).fork()).ldelim();return t},Ve.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ve.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.SourceCodeInfo;e.pos<n;){var r=e.uint32();r>>>3==1?(o.location&&o.location.length||(o.location=[]),o.location.push(p.google.protobuf.SourceCodeInfo.Location.decode(e,e.uint32()))):e.skipType(7&r)}return o},Ve.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Ve.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.location&&e.hasOwnProperty("location")){if(!Array.isArray(e.location))return"location: array expected";for(var t=0;t<e.location.length;++t){var n=p.google.protobuf.SourceCodeInfo.Location.verify(e.location[t]);if(n)return"location."+n}}return null},Ve.fromObject=function(e){if(e instanceof p.google.protobuf.SourceCodeInfo)return e;var t=new p.google.protobuf.SourceCodeInfo;if(e.location){if(!Array.isArray(e.location))throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected");t.location=[];for(var n=0;n<e.location.length;++n){if("object"!=typeof e.location[n])throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected");t.location[n]=p.google.protobuf.SourceCodeInfo.Location.fromObject(e.location[n])}}return t},Ve.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.location=[]),e.location&&e.location.length){n.location=[];for(var o=0;o<e.location.length;++o)n.location[o]=p.google.protobuf.SourceCodeInfo.Location.toObject(e.location[o],t)}return n},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.protobuf.SourceCodeInfo"},Ve.Location=(Fe.prototype.path=c.emptyArray,Fe.prototype.span=c.emptyArray,Fe.prototype.leadingComments="",Fe.prototype.trailingComments="",Fe.prototype.leadingDetachedComments=c.emptyArray,Fe.create=function(e){return new Fe(e)},Fe.encode=function(e,t){if(t=t||a.create(),null!=e.path&&e.path.length){t.uint32(10).fork();for(var n=0;n<e.path.length;++n)t.int32(e.path[n]);t.ldelim()}if(null!=e.span&&e.span.length){t.uint32(18).fork();for(n=0;n<e.span.length;++n)t.int32(e.span[n]);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(n=0;n<e.leadingDetachedComments.length;++n)t.uint32(50).string(e.leadingDetachedComments[n]);return t},Fe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Fe.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.SourceCodeInfo.Location;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:if(o.path&&o.path.length||(o.path=[]),2==(7&r))for(var i=e.uint32()+e.pos;e.pos<i;)o.path.push(e.int32());else o.path.push(e.int32());break;case 2:if(o.span&&o.span.length||(o.span=[]),2==(7&r))for(i=e.uint32()+e.pos;e.pos<i;)o.span.push(e.int32());else o.span.push(e.int32());break;case 3:o.leadingComments=e.string();break;case 4:o.trailingComments=e.string();break;case 6:o.leadingDetachedComments&&o.leadingDetachedComments.length||(o.leadingDetachedComments=[]),o.leadingDetachedComments.push(e.string());break;default:e.skipType(7&r)}}return o},Fe.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Fe.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(var t=0;t<e.path.length;++t)if(!c.isInteger(e.path[t]))return"path: integer[] expected"}if(null!=e.span&&e.hasOwnProperty("span")){if(!Array.isArray(e.span))return"span: array expected";for(t=0;t<e.span.length;++t)if(!c.isInteger(e.span[t]))return"span: integer[] expected"}if(null!=e.leadingComments&&e.hasOwnProperty("leadingComments")&&!c.isString(e.leadingComments))return"leadingComments: string expected";if(null!=e.trailingComments&&e.hasOwnProperty("trailingComments")&&!c.isString(e.trailingComments))return"trailingComments: string expected";if(null!=e.leadingDetachedComments&&e.hasOwnProperty("leadingDetachedComments")){if(!Array.isArray(e.leadingDetachedComments))return"leadingDetachedComments: array expected";for(t=0;t<e.leadingDetachedComments.length;++t)if(!c.isString(e.leadingDetachedComments[t]))return"leadingDetachedComments: string[] expected"}return null},Fe.fromObject=function(e){if(e instanceof p.google.protobuf.SourceCodeInfo.Location)return e;var t=new p.google.protobuf.SourceCodeInfo.Location;if(e.path){if(!Array.isArray(e.path))throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected");t.path=[];for(var n=0;n<e.path.length;++n)t.path[n]=0|e.path[n]}if(e.span){if(!Array.isArray(e.span))throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected");t.span=[];for(n=0;n<e.span.length;++n)t.span[n]=0|e.span[n]}if(null!=e.leadingComments&&(t.leadingComments=String(e.leadingComments)),null!=e.trailingComments&&(t.trailingComments=String(e.trailingComments)),e.leadingDetachedComments){if(!Array.isArray(e.leadingDetachedComments))throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected");t.leadingDetachedComments=[];for(n=0;n<e.leadingDetachedComments.length;++n)t.leadingDetachedComments[n]=String(e.leadingDetachedComments[n])}return t},Fe.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.path=[],n.span=[],n.leadingDetachedComments=[]),t.defaults&&(n.leadingComments="",n.trailingComments=""),e.path&&e.path.length){n.path=[];for(var o=0;o<e.path.length;++o)n.path[o]=e.path[o]}if(e.span&&e.span.length){n.span=[];for(o=0;o<e.span.length;++o)n.span[o]=e.span[o]}if(null!=e.leadingComments&&e.hasOwnProperty("leadingComments")&&(n.leadingComments=e.leadingComments),null!=e.trailingComments&&e.hasOwnProperty("trailingComments")&&(n.trailingComments=e.trailingComments),e.leadingDetachedComments&&e.leadingDetachedComments.length){n.leadingDetachedComments=[];for(o=0;o<e.leadingDetachedComments.length;++o)n.leadingDetachedComments[o]=e.leadingDetachedComments[o]}return n},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.protobuf.SourceCodeInfo.Location"},Fe),Ve),e.GeneratedCodeInfo=(Ge.prototype.annotation=c.emptyArray,Ge.create=function(e){return new Ge(e)},Ge.encode=function(e,t){if(t=t||a.create(),null!=e.annotation&&e.annotation.length)for(var n=0;n<e.annotation.length;++n)p.google.protobuf.GeneratedCodeInfo.Annotation.encode(e.annotation[n],t.uint32(10).fork()).ldelim();return t},Ge.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ge.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.GeneratedCodeInfo;e.pos<n;){var r=e.uint32();r>>>3==1?(o.annotation&&o.annotation.length||(o.annotation=[]),o.annotation.push(p.google.protobuf.GeneratedCodeInfo.Annotation.decode(e,e.uint32()))):e.skipType(7&r)}return o},Ge.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Ge.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.annotation&&e.hasOwnProperty("annotation")){if(!Array.isArray(e.annotation))return"annotation: array expected";for(var t=0;t<e.annotation.length;++t){var n=p.google.protobuf.GeneratedCodeInfo.Annotation.verify(e.annotation[t]);if(n)return"annotation."+n}}return null},Ge.fromObject=function(e){if(e instanceof p.google.protobuf.GeneratedCodeInfo)return e;var t=new p.google.protobuf.GeneratedCodeInfo;if(e.annotation){if(!Array.isArray(e.annotation))throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected");t.annotation=[];for(var n=0;n<e.annotation.length;++n){if("object"!=typeof e.annotation[n])throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected");t.annotation[n]=p.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(e.annotation[n])}}return t},Ge.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.annotation=[]),e.annotation&&e.annotation.length){n.annotation=[];for(var o=0;o<e.annotation.length;++o)n.annotation[o]=p.google.protobuf.GeneratedCodeInfo.Annotation.toObject(e.annotation[o],t)}return n},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.protobuf.GeneratedCodeInfo"},Ge.Annotation=(A.prototype.path=c.emptyArray,A.prototype.sourceFile="",A.prototype.begin=0,A.prototype.end=0,A.prototype.semantic=0,A.create=function(e){return new A(e)},A.encode=function(e,t){if(t=t||a.create(),null!=e.path&&e.path.length){t.uint32(10).fork();for(var n=0;n<e.path.length;++n)t.int32(e.path[n]);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},A.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},A.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.GeneratedCodeInfo.Annotation;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:if(o.path&&o.path.length||(o.path=[]),2==(7&r))for(var i=e.uint32()+e.pos;e.pos<i;)o.path.push(e.int32());else o.path.push(e.int32());break;case 2:o.sourceFile=e.string();break;case 3:o.begin=e.int32();break;case 4:o.end=e.int32();break;case 5:o.semantic=e.int32();break;default:e.skipType(7&r)}}return o},A.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},A.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(var t=0;t<e.path.length;++t)if(!c.isInteger(e.path[t]))return"path: integer[] expected"}if(null!=e.sourceFile&&e.hasOwnProperty("sourceFile")&&!c.isString(e.sourceFile))return"sourceFile: string expected";if(null!=e.begin&&e.hasOwnProperty("begin")&&!c.isInteger(e.begin))return"begin: integer expected";if(null!=e.end&&e.hasOwnProperty("end")&&!c.isInteger(e.end))return"end: integer expected";if(null!=e.semantic&&e.hasOwnProperty("semantic"))switch(e.semantic){default:return"semantic: enum value expected";case 0:case 1:case 2:}return null},A.fromObject=function(e){if(e instanceof p.google.protobuf.GeneratedCodeInfo.Annotation)return e;var t=new p.google.protobuf.GeneratedCodeInfo.Annotation;if(e.path){if(!Array.isArray(e.path))throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected");t.path=[];for(var n=0;n<e.path.length;++n)t.path[n]=0|e.path[n]}switch(null!=e.sourceFile&&(t.sourceFile=String(e.sourceFile)),null!=e.begin&&(t.begin=0|e.begin),null!=e.end&&(t.end=0|e.end),e.semantic){default:"number"==typeof e.semantic&&(t.semantic=e.semantic);break;case"NONE":case 0:t.semantic=0;break;case"SET":case 1:t.semantic=1;break;case"ALIAS":case 2:t.semantic=2}return t},A.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.path=[]),t.defaults&&(n.sourceFile="",n.begin=0,n.end=0,n.semantic=t.enums===String?"NONE":0),e.path&&e.path.length){n.path=[];for(var o=0;o<e.path.length;++o)n.path[o]=e.path[o]}return null!=e.sourceFile&&e.hasOwnProperty("sourceFile")&&(n.sourceFile=e.sourceFile),null!=e.begin&&e.hasOwnProperty("begin")&&(n.begin=e.begin),null!=e.end&&e.hasOwnProperty("end")&&(n.end=e.end),null!=e.semantic&&e.hasOwnProperty("semantic")&&(n.semantic=t.enums!==String||void 0===p.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[e.semantic]?e.semantic:p.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[e.semantic]),n},A.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},A.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.GeneratedCodeInfo.Annotation"},A.Semantic=(r={},(i=Object.create(r))[r[0]="NONE"]=0,i[r[1]="SET"]=1,i[r[2]="ALIAS"]=2,i),A),Ge),e.Struct=(Je.prototype.fields=c.emptyObject,Je.create=function(e){return new Je(e)},Je.encode=function(e,t){if(t=t||a.create(),null!=e.fields&&Object.hasOwnProperty.call(e,"fields"))for(var n=Object.keys(e.fields),o=0;o<n.length;++o)t.uint32(10).fork().uint32(10).string(n[o]),p.google.protobuf.Value.encode(e.fields[n[o]],t.uint32(18).fork()).ldelim().ldelim();return t},Je.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Je.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.Struct;e.pos<n;){var r=e.uint32();if(r>>>3==1){o.fields===c.emptyObject&&(o.fields={});for(var i=e.uint32()+e.pos,a="",l=null;e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:a=e.string();break;case 2:l=p.google.protobuf.Value.decode(e,e.uint32());break;default:e.skipType(7&s)}}o.fields[a]=l}else e.skipType(7&r)}return o},Je.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Je.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.fields&&e.hasOwnProperty("fields")){if(!c.isObject(e.fields))return"fields: object expected";for(var t=Object.keys(e.fields),n=0;n<t.length;++n){var o=p.google.protobuf.Value.verify(e.fields[t[n]]);if(o)return"fields."+o}}return null},Je.fromObject=function(e){if(e instanceof p.google.protobuf.Struct)return e;var t=new p.google.protobuf.Struct;if(e.fields){if("object"!=typeof e.fields)throw TypeError(".google.protobuf.Struct.fields: object expected");t.fields={};for(var n=Object.keys(e.fields),o=0;o<n.length;++o){if("object"!=typeof e.fields[n[o]])throw TypeError(".google.protobuf.Struct.fields: object expected");t.fields[n[o]]=p.google.protobuf.Value.fromObject(e.fields[n[o]])}}return t},Je.toObject=function(e,t){var n,o={};if(((t=t||{}).objects||t.defaults)&&(o.fields={}),e.fields&&(n=Object.keys(e.fields)).length){o.fields={};for(var r=0;r<n.length;++r)o.fields[n[r]]=p.google.protobuf.Value.toObject(e.fields[n[r]],t)}return 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.protobuf.Struct"},Je),e.Value=(U.prototype.nullValue=null,U.prototype.numberValue=null,U.prototype.stringValue=null,U.prototype.boolValue=null,U.prototype.structValue=null,U.prototype.listValue=null,Object.defineProperty(U.prototype,"kind",{get:c.oneOfGetter(r=["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]),set:c.oneOfSetter(r)}),U.create=function(e){return new U(e)},U.encode=function(e,t){return t=t||a.create(),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")&&p.google.protobuf.Struct.encode(e.structValue,t.uint32(42).fork()).ldelim(),null!=e.listValue&&Object.hasOwnProperty.call(e,"listValue")&&p.google.protobuf.ListValue.encode(e.listValue,t.uint32(50).fork()).ldelim(),t},U.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},U.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.Value;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.nullValue=e.int32();break;case 2:o.numberValue=e.double();break;case 3:o.stringValue=e.string();break;case 4:o.boolValue=e.bool();break;case 5:o.structValue=p.google.protobuf.Struct.decode(e,e.uint32());break;case 6:o.listValue=p.google.protobuf.ListValue.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},U.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},U.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t,n={};if(null!=e.nullValue&&e.hasOwnProperty("nullValue")&&(n.kind=1,0!==e.nullValue))return"nullValue: enum value expected";if(null!=e.numberValue&&e.hasOwnProperty("numberValue")){if(1===n.kind)return"kind: multiple values";if(n.kind=1,"number"!=typeof e.numberValue)return"numberValue: number expected"}if(null!=e.stringValue&&e.hasOwnProperty("stringValue")){if(1===n.kind)return"kind: multiple values";if(n.kind=1,!c.isString(e.stringValue))return"stringValue: string expected"}if(null!=e.boolValue&&e.hasOwnProperty("boolValue")){if(1===n.kind)return"kind: multiple values";if(n.kind=1,"boolean"!=typeof e.boolValue)return"boolValue: boolean expected"}if(null!=e.structValue&&e.hasOwnProperty("structValue")){if(1===n.kind)return"kind: multiple values";if(n.kind=1,t=p.google.protobuf.Struct.verify(e.structValue))return"structValue."+t}if(null!=e.listValue&&e.hasOwnProperty("listValue")){if(1===n.kind)return"kind: multiple values";if(n.kind=1,t=p.google.protobuf.ListValue.verify(e.listValue))return"listValue."+t}return null},U.fromObject=function(e){if(e instanceof p.google.protobuf.Value)return e;var t=new p.google.protobuf.Value;switch(e.nullValue){default:"number"==typeof e.nullValue&&(t.nullValue=e.nullValue);break;case"NULL_VALUE":case 0:t.nullValue=0}if(null!=e.numberValue&&(t.numberValue=Number(e.numberValue)),null!=e.stringValue&&(t.stringValue=String(e.stringValue)),null!=e.boolValue&&(t.boolValue=Boolean(e.boolValue)),null!=e.structValue){if("object"!=typeof e.structValue)throw TypeError(".google.protobuf.Value.structValue: object expected");t.structValue=p.google.protobuf.Struct.fromObject(e.structValue)}if(null!=e.listValue){if("object"!=typeof e.listValue)throw TypeError(".google.protobuf.Value.listValue: object expected");t.listValue=p.google.protobuf.ListValue.fromObject(e.listValue)}return t},U.toObject=function(e,t){t=t||{};var n={};return null!=e.nullValue&&e.hasOwnProperty("nullValue")&&(n.nullValue=t.enums!==String||void 0===p.google.protobuf.NullValue[e.nullValue]?e.nullValue:p.google.protobuf.NullValue[e.nullValue],t.oneofs)&&(n.kind="nullValue"),null!=e.numberValue&&e.hasOwnProperty("numberValue")&&(n.numberValue=t.json&&!isFinite(e.numberValue)?String(e.numberValue):e.numberValue,t.oneofs)&&(n.kind="numberValue"),null!=e.stringValue&&e.hasOwnProperty("stringValue")&&(n.stringValue=e.stringValue,t.oneofs)&&(n.kind="stringValue"),null!=e.boolValue&&e.hasOwnProperty("boolValue")&&(n.boolValue=e.boolValue,t.oneofs)&&(n.kind="boolValue"),null!=e.structValue&&e.hasOwnProperty("structValue")&&(n.structValue=p.google.protobuf.Struct.toObject(e.structValue,t),t.oneofs)&&(n.kind="structValue"),null!=e.listValue&&e.hasOwnProperty("listValue")&&(n.listValue=p.google.protobuf.ListValue.toObject(e.listValue,t),t.oneofs)&&(n.kind="listValue"),n},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.protobuf.Value"},U),e.NullValue=(i={},(r=Object.create(i))[i[0]="NULL_VALUE"]=0,r),e.ListValue=(Be.prototype.values=c.emptyArray,Be.create=function(e){return new Be(e)},Be.encode=function(e,t){if(t=t||a.create(),null!=e.values&&e.values.length)for(var n=0;n<e.values.length;++n)p.google.protobuf.Value.encode(e.values[n],t.uint32(10).fork()).ldelim();return t},Be.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Be.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.ListValue;e.pos<n;){var r=e.uint32();r>>>3==1?(o.values&&o.values.length||(o.values=[]),o.values.push(p.google.protobuf.Value.decode(e,e.uint32()))):e.skipType(7&r)}return o},Be.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Be.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.values&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var n=p.google.protobuf.Value.verify(e.values[t]);if(n)return"values."+n}}return null},Be.fromObject=function(e){if(e instanceof p.google.protobuf.ListValue)return e;var t=new p.google.protobuf.ListValue;if(e.values){if(!Array.isArray(e.values))throw TypeError(".google.protobuf.ListValue.values: array expected");t.values=[];for(var n=0;n<e.values.length;++n){if("object"!=typeof e.values[n])throw TypeError(".google.protobuf.ListValue.values: object expected");t.values[n]=p.google.protobuf.Value.fromObject(e.values[n])}}return t},Be.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.values=[]),e.values&&e.values.length){n.values=[];for(var o=0;o<e.values.length;++o)n.values[o]=p.google.protobuf.Value.toObject(e.values[o],t)}return n},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.protobuf.ListValue"},Be),e.Duration=(Me.prototype.seconds=c.Long?c.Long.fromBits(0,0,!1):0,Me.prototype.nanos=0,Me.create=function(e){return new Me(e)},Me.encode=function(e,t){return t=t||a.create(),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},Me.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Me.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.Duration;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.seconds=e.int64();break;case 2:o.nanos=e.int32();break;default:e.skipType(7&r)}}return o},Me.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Me.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.seconds&&e.hasOwnProperty("seconds")&&!(c.isInteger(e.seconds)||e.seconds&&c.isInteger(e.seconds.low)&&c.isInteger(e.seconds.high))?"seconds: integer|Long expected":null!=e.nanos&&e.hasOwnProperty("nanos")&&!c.isInteger(e.nanos)?"nanos: integer expected":null},Me.fromObject=function(e){var t;return e instanceof p.google.protobuf.Duration?e:(t=new p.google.protobuf.Duration,null!=e.seconds&&(c.Long?(t.seconds=c.Long.fromValue(e.seconds)).unsigned=!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 c.LongBits(e.seconds.low>>>0,e.seconds.high>>>0).toNumber())),null!=e.nanos&&(t.nanos=0|e.nanos),t)},Me.toObject=function(e,t){var n,o={};return(t=t||{}).defaults&&(c.Long?(n=new c.Long(0,0,!1),o.seconds=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.seconds=t.longs===String?"0":0,o.nanos=0),null!=e.seconds&&e.hasOwnProperty("seconds")&&("number"==typeof e.seconds?o.seconds=t.longs===String?String(e.seconds):e.seconds:o.seconds=t.longs===String?c.Long.prototype.toString.call(e.seconds):t.longs===Number?new c.LongBits(e.seconds.low>>>0,e.seconds.high>>>0).toNumber():e.seconds),null!=e.nanos&&e.hasOwnProperty("nanos")&&(o.nanos=e.nanos),o},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.protobuf.Duration"},Me),e.Timestamp=(_e.prototype.seconds=c.Long?c.Long.fromBits(0,0,!1):0,_e.prototype.nanos=0,_e.create=function(e){return new _e(e)},_e.encode=function(e,t){return t=t||a.create(),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},_e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},_e.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.Timestamp;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.seconds=e.int64();break;case 2:o.nanos=e.int32();break;default:e.skipType(7&r)}}return o},_e.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},_e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.seconds&&e.hasOwnProperty("seconds")&&!(c.isInteger(e.seconds)||e.seconds&&c.isInteger(e.seconds.low)&&c.isInteger(e.seconds.high))?"seconds: integer|Long expected":null!=e.nanos&&e.hasOwnProperty("nanos")&&!c.isInteger(e.nanos)?"nanos: integer expected":null},_e.fromObject=function(e){var t;return e instanceof p.google.protobuf.Timestamp?e:(t=new p.google.protobuf.Timestamp,null!=e.seconds&&(c.Long?(t.seconds=c.Long.fromValue(e.seconds)).unsigned=!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 c.LongBits(e.seconds.low>>>0,e.seconds.high>>>0).toNumber())),null!=e.nanos&&(t.nanos=0|e.nanos),t)},_e.toObject=function(e,t){var n,o={};return(t=t||{}).defaults&&(c.Long?(n=new c.Long(0,0,!1),o.seconds=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.seconds=t.longs===String?"0":0,o.nanos=0),null!=e.seconds&&e.hasOwnProperty("seconds")&&("number"==typeof e.seconds?o.seconds=t.longs===String?String(e.seconds):e.seconds:o.seconds=t.longs===String?c.Long.prototype.toString.call(e.seconds):t.longs===Number?new c.LongBits(e.seconds.low>>>0,e.seconds.high>>>0).toNumber():e.seconds),null!=e.nanos&&e.hasOwnProperty("nanos")&&(o.nanos=e.nanos),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.protobuf.Timestamp"},_e),e.Any=(qe.prototype.type_url="",qe.prototype.value=c.newBuffer([]),qe.create=function(e){return new qe(e)},qe.encode=function(e,t){return t=t||a.create(),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},qe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},qe.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.Any;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.type_url=e.string();break;case 2:o.value=e.bytes();break;default:e.skipType(7&r)}}return o},qe.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},qe.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type_url&&e.hasOwnProperty("type_url")&&!c.isString(e.type_url)?"type_url: string expected":null!=e.value&&e.hasOwnProperty("value")&&!(e.value&&"number"==typeof e.value.length||c.isString(e.value))?"value: buffer expected":null},qe.fromObject=function(e){var t;return e instanceof p.google.protobuf.Any?e:(t=new p.google.protobuf.Any,null!=e.type_url&&(t.type_url=String(e.type_url)),null!=e.value&&("string"==typeof e.value?c.base64.decode(e.value,t.value=c.newBuffer(c.base64.length(e.value)),0):0<=e.value.length&&(t.value=e.value)),t)},qe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.type_url="",t.bytes===String?n.value="":(n.value=[],t.bytes!==Array&&(n.value=c.newBuffer(n.value)))),null!=e.type_url&&e.hasOwnProperty("type_url")&&(n.type_url=e.type_url),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.bytes===String?c.base64.encode(e.value,0,e.value.length):t.bytes===Array?Array.prototype.slice.call(e.value):e.value),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.protobuf.Any"},qe),e.Empty=(ze.create=function(e){return new ze(e)},ze.encode=function(e,t){return t=t||a.create()},ze.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ze.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,t=new p.google.protobuf.Empty;e.pos<n;){var o=e.uint32();e.skipType(7&o)}return t},ze.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},ze.verify=function(e){return"object"!=typeof e||null===e?"object expected":null},ze.fromObject=function(e){return e instanceof p.google.protobuf.Empty?e:new p.google.protobuf.Empty},ze.toObject=function(){return{}},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.protobuf.Empty"},ze),e),L.rpc=((t={}).Status=(He.prototype.code=0,He.prototype.message="",He.prototype.details=c.emptyArray,He.create=function(e){return new He(e)},He.encode=function(e,t){if(t=t||a.create(),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 n=0;n<e.details.length;++n)p.google.protobuf.Any.encode(e.details[n],t.uint32(26).fork()).ldelim();return t},He.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},He.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.rpc.Status;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.code=e.int32();break;case 2:o.message=e.string();break;case 3:o.details&&o.details.length||(o.details=[]),o.details.push(p.google.protobuf.Any.decode(e,e.uint32()));break;default:e.skipType(7&r)}}return o},He.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},He.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.code&&e.hasOwnProperty("code")&&!c.isInteger(e.code))return"code: integer expected";if(null!=e.message&&e.hasOwnProperty("message")&&!c.isString(e.message))return"message: string expected";if(null!=e.details&&e.hasOwnProperty("details")){if(!Array.isArray(e.details))return"details: array expected";for(var t=0;t<e.details.length;++t){var n=p.google.protobuf.Any.verify(e.details[t]);if(n)return"details."+n}}return null},He.fromObject=function(e){if(e instanceof p.google.rpc.Status)return e;var t=new p.google.rpc.Status;if(null!=e.code&&(t.code=0|e.code),null!=e.message&&(t.message=String(e.message)),e.details){if(!Array.isArray(e.details))throw TypeError(".google.rpc.Status.details: array expected");t.details=[];for(var n=0;n<e.details.length;++n){if("object"!=typeof e.details[n])throw TypeError(".google.rpc.Status.details: object expected");t.details[n]=p.google.protobuf.Any.fromObject(e.details[n])}}return t},He.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.details=[]),t.defaults&&(n.code=0,n.message=""),null!=e.code&&e.hasOwnProperty("code")&&(n.code=e.code),null!=e.message&&e.hasOwnProperty("message")&&(n.message=e.message),e.details&&e.details.length){n.details=[];for(var o=0;o<e.details.length;++o)n.details[o]=p.google.protobuf.Any.toObject(e.details[o],t)}return n},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.rpc.Status"},He),t),L.type=((n={}).Date=(Ye.prototype.year=0,Ye.prototype.month=0,Ye.prototype.day=0,Ye.create=function(e){return new Ye(e)},Ye.encode=function(e,t){return t=t||a.create(),null!=e.year&&Object.hasOwnProperty.call(e,"year")&&t.uint32(8).int32(e.year),null!=e.month&&Object.hasOwnProperty.call(e,"month")&&t.uint32(16).int32(e.month),null!=e.day&&Object.hasOwnProperty.call(e,"day")&&t.uint32(24).int32(e.day),t},Ye.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ye.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.type.Date;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.year=e.int32();break;case 2:o.month=e.int32();break;case 3:o.day=e.int32();break;default:e.skipType(7&r)}}return o},Ye.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Ye.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.year&&e.hasOwnProperty("year")&&!c.isInteger(e.year)?"year: integer expected":null!=e.month&&e.hasOwnProperty("month")&&!c.isInteger(e.month)?"month: integer expected":null!=e.day&&e.hasOwnProperty("day")&&!c.isInteger(e.day)?"day: integer expected":null},Ye.fromObject=function(e){var t;return e instanceof p.google.type.Date?e:(t=new p.google.type.Date,null!=e.year&&(t.year=0|e.year),null!=e.month&&(t.month=0|e.month),null!=e.day&&(t.day=0|e.day),t)},Ye.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.year=0,n.month=0,n.day=0),null!=e.year&&e.hasOwnProperty("year")&&(n.year=e.year),null!=e.month&&e.hasOwnProperty("month")&&(n.month=e.month),null!=e.day&&e.hasOwnProperty("day")&&(n.day=e.day),n},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.type.Date"},Ye),n),L.longrunning=((i={}).Operations=(((We.prototype=Object.create(o.rpc.Service.prototype)).constructor=We).create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(We.prototype.listOperations=function e(t,n){return this.rpcCall(e,p.google.longrunning.ListOperationsRequest,p.google.longrunning.ListOperationsResponse,t,n)},"name",{value:"ListOperations"}),Object.defineProperty(We.prototype.getOperation=function e(t,n){return this.rpcCall(e,p.google.longrunning.GetOperationRequest,p.google.longrunning.Operation,t,n)},"name",{value:"GetOperation"}),Object.defineProperty(We.prototype.deleteOperation=function e(t,n){return this.rpcCall(e,p.google.longrunning.DeleteOperationRequest,p.google.protobuf.Empty,t,n)},"name",{value:"DeleteOperation"}),Object.defineProperty(We.prototype.cancelOperation=function e(t,n){return this.rpcCall(e,p.google.longrunning.CancelOperationRequest,p.google.protobuf.Empty,t,n)},"name",{value:"CancelOperation"}),Object.defineProperty(We.prototype.waitOperation=function e(t,n){return this.rpcCall(e,p.google.longrunning.WaitOperationRequest,p.google.longrunning.Operation,t,n)},"name",{value:"WaitOperation"}),We),i.Operation=(Qe.prototype.name="",Qe.prototype.metadata=null,Qe.prototype.done=!1,Qe.prototype.error=null,Qe.prototype.response=null,Object.defineProperty(Qe.prototype,"result",{get:c.oneOfGetter(r=["error","response"]),set:c.oneOfSetter(r)}),Qe.create=function(e){return new Qe(e)},Qe.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&p.google.protobuf.Any.encode(e.metadata,t.uint32(18).fork()).ldelim(),null!=e.done&&Object.hasOwnProperty.call(e,"done")&&t.uint32(24).bool(e.done),null!=e.error&&Object.hasOwnProperty.call(e,"error")&&p.google.rpc.Status.encode(e.error,t.uint32(34).fork()).ldelim(),null!=e.response&&Object.hasOwnProperty.call(e,"response")&&p.google.protobuf.Any.encode(e.response,t.uint32(42).fork()).ldelim(),t},Qe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Qe.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.Operation;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.metadata=p.google.protobuf.Any.decode(e,e.uint32());break;case 3:o.done=e.bool();break;case 4:o.error=p.google.rpc.Status.decode(e,e.uint32());break;case 5:o.response=p.google.protobuf.Any.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},Qe.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Qe.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t,n={};if(null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name))return"name: string expected";if(null!=e.metadata&&e.hasOwnProperty("metadata")&&(t=p.google.protobuf.Any.verify(e.metadata)))return"metadata."+t;if(null!=e.done&&e.hasOwnProperty("done")&&"boolean"!=typeof e.done)return"done: boolean expected";if(null!=e.error&&e.hasOwnProperty("error")&&(n.result=1,t=p.google.rpc.Status.verify(e.error)))return"error."+t;if(null!=e.response&&e.hasOwnProperty("response")){if(1===n.result)return"result: multiple values";if(n.result=1,t=p.google.protobuf.Any.verify(e.response))return"response."+t}return null},Qe.fromObject=function(e){if(e instanceof p.google.longrunning.Operation)return e;var t=new p.google.longrunning.Operation;if(null!=e.name&&(t.name=String(e.name)),null!=e.metadata){if("object"!=typeof e.metadata)throw TypeError(".google.longrunning.Operation.metadata: object expected");t.metadata=p.google.protobuf.Any.fromObject(e.metadata)}if(null!=e.done&&(t.done=Boolean(e.done)),null!=e.error){if("object"!=typeof e.error)throw TypeError(".google.longrunning.Operation.error: object expected");t.error=p.google.rpc.Status.fromObject(e.error)}if(null!=e.response){if("object"!=typeof e.response)throw TypeError(".google.longrunning.Operation.response: object expected");t.response=p.google.protobuf.Any.fromObject(e.response)}return t},Qe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name="",n.metadata=null,n.done=!1),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.metadata&&e.hasOwnProperty("metadata")&&(n.metadata=p.google.protobuf.Any.toObject(e.metadata,t)),null!=e.done&&e.hasOwnProperty("done")&&(n.done=e.done),null!=e.error&&e.hasOwnProperty("error")&&(n.error=p.google.rpc.Status.toObject(e.error,t),t.oneofs)&&(n.result="error"),null!=e.response&&e.hasOwnProperty("response")&&(n.response=p.google.protobuf.Any.toObject(e.response,t),t.oneofs)&&(n.result="response"),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.longrunning.Operation"},Qe),i.GetOperationRequest=(Ke.prototype.name="",Ke.create=function(e){return new Ke(e)},Ke.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},Ke.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ke.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.GetOperationRequest;e.pos<n;){var r=e.uint32();r>>>3==1?o.name=e.string():e.skipType(7&r)}return o},Ke.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Ke.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name)?"name: string expected":null},Ke.fromObject=function(e){var t;return e instanceof p.google.longrunning.GetOperationRequest?e:(t=new p.google.longrunning.GetOperationRequest,null!=e.name&&(t.name=String(e.name)),t)},Ke.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},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.longrunning.GetOperationRequest"},Ke),i.ListOperationsRequest=(Xe.prototype.name="",Xe.prototype.filter="",Xe.prototype.pageSize=0,Xe.prototype.pageToken="",Xe.create=function(e){return new Xe(e)},Xe.encode=function(e,t){return t=t||a.create(),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},Xe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Xe.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.ListOperationsRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 4:o.name=e.string();break;case 1:o.filter=e.string();break;case 2:o.pageSize=e.int32();break;case 3:o.pageToken=e.string();break;default:e.skipType(7&r)}}return o},Xe.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Xe.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name)?"name: string expected":null!=e.filter&&e.hasOwnProperty("filter")&&!c.isString(e.filter)?"filter: string expected":null!=e.pageSize&&e.hasOwnProperty("pageSize")&&!c.isInteger(e.pageSize)?"pageSize: integer expected":null!=e.pageToken&&e.hasOwnProperty("pageToken")&&!c.isString(e.pageToken)?"pageToken: string expected":null},Xe.fromObject=function(e){var t;return e instanceof p.google.longrunning.ListOperationsRequest?e:(t=new p.google.longrunning.ListOperationsRequest,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)},Xe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.filter="",n.pageSize=0,n.pageToken="",n.name=""),null!=e.filter&&e.hasOwnProperty("filter")&&(n.filter=e.filter),null!=e.pageSize&&e.hasOwnProperty("pageSize")&&(n.pageSize=e.pageSize),null!=e.pageToken&&e.hasOwnProperty("pageToken")&&(n.pageToken=e.pageToken),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},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.longrunning.ListOperationsRequest"},Xe),i.ListOperationsResponse=(Ze.prototype.operations=c.emptyArray,Ze.prototype.nextPageToken="",Ze.create=function(e){return new Ze(e)},Ze.encode=function(e,t){if(t=t||a.create(),null!=e.operations&&e.operations.length)for(var n=0;n<e.operations.length;++n)p.google.longrunning.Operation.encode(e.operations[n],t.uint32(10).fork()).ldelim();return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(18).string(e.nextPageToken),t},Ze.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ze.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.ListOperationsResponse;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.operations&&o.operations.length||(o.operations=[]),o.operations.push(p.google.longrunning.Operation.decode(e,e.uint32()));break;case 2:o.nextPageToken=e.string();break;default:e.skipType(7&r)}}return o},Ze.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},Ze.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.operations&&e.hasOwnProperty("operations")){if(!Array.isArray(e.operations))return"operations: array expected";for(var t=0;t<e.operations.length;++t){var n=p.google.longrunning.Operation.verify(e.operations[t]);if(n)return"operations."+n}}return null!=e.nextPageToken&&e.hasOwnProperty("nextPageToken")&&!c.isString(e.nextPageToken)?"nextPageToken: string expected":null},Ze.fromObject=function(e){if(e instanceof p.google.longrunning.ListOperationsResponse)return e;var t=new p.google.longrunning.ListOperationsResponse;if(e.operations){if(!Array.isArray(e.operations))throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected");t.operations=[];for(var n=0;n<e.operations.length;++n){if("object"!=typeof e.operations[n])throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected");t.operations[n]=p.google.longrunning.Operation.fromObject(e.operations[n])}}return null!=e.nextPageToken&&(t.nextPageToken=String(e.nextPageToken)),t},Ze.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.operations=[]),t.defaults&&(n.nextPageToken=""),e.operations&&e.operations.length){n.operations=[];for(var o=0;o<e.operations.length;++o)n.operations[o]=p.google.longrunning.Operation.toObject(e.operations[o],t)}return null!=e.nextPageToken&&e.hasOwnProperty("nextPageToken")&&(n.nextPageToken=e.nextPageToken),n},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.longrunning.ListOperationsResponse"},Ze),i.CancelOperationRequest=($e.prototype.name="",$e.create=function(e){return new $e(e)},$e.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},$e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},$e.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.CancelOperationRequest;e.pos<n;){var r=e.uint32();r>>>3==1?o.name=e.string():e.skipType(7&r)}return o},$e.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},$e.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name)?"name: string expected":null},$e.fromObject=function(e){var t;return e instanceof p.google.longrunning.CancelOperationRequest?e:(t=new p.google.longrunning.CancelOperationRequest,null!=e.name&&(t.name=String(e.name)),t)},$e.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},$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.longrunning.CancelOperationRequest"},$e),i.DeleteOperationRequest=(et.prototype.name="",et.create=function(e){return new et(e)},et.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},et.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},et.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.DeleteOperationRequest;e.pos<n;){var r=e.uint32();r>>>3==1?o.name=e.string():e.skipType(7&r)}return o},et.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},et.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name)?"name: string expected":null},et.fromObject=function(e){var t;return e instanceof p.google.longrunning.DeleteOperationRequest?e:(t=new p.google.longrunning.DeleteOperationRequest,null!=e.name&&(t.name=String(e.name)),t)},et.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},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.longrunning.DeleteOperationRequest"},et),i.WaitOperationRequest=(tt.prototype.name="",tt.prototype.timeout=null,tt.create=function(e){return new tt(e)},tt.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.timeout&&Object.hasOwnProperty.call(e,"timeout")&&p.google.protobuf.Duration.encode(e.timeout,t.uint32(18).fork()).ldelim(),t},tt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},tt.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.WaitOperationRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.timeout=p.google.protobuf.Duration.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},tt.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},tt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!c.isString(e.name))return"name: string expected";if(null!=e.timeout&&e.hasOwnProperty("timeout")){e=p.google.protobuf.Duration.verify(e.timeout);if(e)return"timeout."+e}return null},tt.fromObject=function(e){if(e instanceof p.google.longrunning.WaitOperationRequest)return e;var t=new p.google.longrunning.WaitOperationRequest;if(null!=e.name&&(t.name=String(e.name)),null!=e.timeout){if("object"!=typeof e.timeout)throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected");t.timeout=p.google.protobuf.Duration.fromObject(e.timeout)}return t},tt.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name="",n.timeout=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.timeout&&e.hasOwnProperty("timeout")&&(n.timeout=p.google.protobuf.Duration.toObject(e.timeout,t)),n},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.longrunning.WaitOperationRequest"},tt),i.OperationInfo=(nt.prototype.responseType="",nt.prototype.metadataType="",nt.create=function(e){return new nt(e)},nt.encode=function(e,t){return t=t||a.create(),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},nt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},nt.decode=function(e,t){e instanceof u||(e=u.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.OperationInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.responseType=e.string();break;case 2:o.metadataType=e.string();break;default:e.skipType(7&r)}}return o},nt.decodeDelimited=function(e){return e instanceof u||(e=new u(e)),this.decode(e,e.uint32())},nt.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.responseType&&e.hasOwnProperty("responseType")&&!c.isString(e.responseType)?"responseType: string expected":null!=e.metadataType&&e.hasOwnProperty("metadataType")&&!c.isString(e.metadataType)?"metadataType: string expected":null},nt.fromObject=function(e){var t;return e instanceof p.google.longrunning.OperationInfo?e:(t=new p.google.longrunning.OperationInfo,null!=e.responseType&&(t.responseType=String(e.responseType)),null!=e.metadataType&&(t.metadataType=String(e.metadataType)),t)},nt.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.responseType="",n.metadataType=""),null!=e.responseType&&e.hasOwnProperty("responseType")&&(n.responseType=e.responseType),null!=e.metadataType&&e.hasOwnProperty("metadataType")&&(n.metadataType=e.metadataType),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.longrunning.OperationInfo"},nt),i),L),p});
|
1
|
+
!function(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){"use strict";var e,t,n,r,i,L,c=o.Reader,a=o.Writer,u=o.util,p=o.roots._google_cloud_discoveryengine_protos||(o.roots._google_cloud_discoveryengine_protos={});function l(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function q(e){if(this.text=[],this.numbers=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function V(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function F(e,t,n){o.rpc.Service.call(this,e,t,n)}function B(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function M(e){if(this.querySuggestions=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function J(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function s(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function G(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function _(e,t,n){o.rpc.Service.call(this,e,t,n)}function z(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function H(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Q(e){if(this.documents=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function K(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Y(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function W(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function X(e){if(this.inputUris=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function g(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Z(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function d(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function $(e){if(this.userEvents=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ee(e){if(this.errorSamples=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function te(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ne(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function f(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function oe(e){if(this.documents=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function re(e){if(this.errorSamples=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function y(e){if(this.documents=[],this.tagIds=[],this.promotionIds=[],this.attributes={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ie(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ae(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function le(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function m(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function b(e){if(this.promotionIds=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function h(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function se(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ce(e,t,n){o.rpc.Service.call(this,e,t,n)}function v(e){if(this.params={},this.userLabels={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ue(e){if(this.results=[],this.missingIds=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function pe(e){if(this.metadata={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ge(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function de(e,t,n){o.rpc.Service.call(this,e,t,n)}function fe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ye(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function me(e){if(this.schemas=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function be(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function he(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ve(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Oe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Se(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function we(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function je(e,t,n){o.rpc.Service.call(this,e,t,n)}function O(e){if(this.facetSpecs=[],this.params={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Pe(e){if(this.excludedFilterKeys=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function S(e){if(this.intervals=[],this.restrictedValues=[],this.prefixes=[],this.contains=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Te(e){if(this.conditionBoostSpecs=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function xe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ke(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ie(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function De(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ee(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ce(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function w(e){if(this.results=[],this.facets=[],this.appliedControls=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Re(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ne(e){if(this.values=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ae(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ue(e){if(this.refinementAttributes=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Le(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function qe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ve(e,t,n){o.rpc.Service.call(this,e,t,n)}function Fe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Be(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function j(e){if(this.pattern=[],this.style=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Me(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Je(e){if(this.rules=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function P(e){if(this.additionalBindings=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ge(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function _e(e){if(this.destinations=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function T(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function x(e){if(this.methodSettings=[],this.codeownerGithubTeams=[],this.librarySettings=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ze(e){if(this.serviceClassNames={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function He(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Qe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ke(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ye(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function We(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Xe(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ze(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function $e(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function et(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function tt(e){if(this.extensions=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function nt(e){if(this.file=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function k(e){if(this.dependency=[],this.publicDependency=[],this.weakDependency=[],this.messageType=[],this.enumType=[],this.service=[],this.extension=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function I(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),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ot(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function rt(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function it(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function D(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function at(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function lt(e){if(this.value=[],this.reservedRange=[],this.reservedName=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function st(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ct(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ut(e){if(this.method=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function pt(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function E(e){if(this.uninterpretedOption=[],this[".google.api.resourceDefinition"]=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function C(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function R(e){if(this.uninterpretedOption=[],this[".google.api.fieldBehavior"]=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function gt(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function dt(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ft(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function yt(e){if(this.uninterpretedOption=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function N(e){if(this.uninterpretedOption=[],this[".google.api.methodSignature"]=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function A(e){if(this.name=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function mt(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function bt(e){if(this.location=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function ht(e){if(this.path=[],this.span=[],this.leadingDetachedComments=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function vt(e){if(this.annotation=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ot(e){if(this.path=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function St(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function wt(e){if(this.fields={},e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function U(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function jt(e){if(this.values=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Pt(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Tt(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function xt(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function kt(e){if(this.details=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function It(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Dt(e,t,n){o.rpc.Service.call(this,e,t,n)}function Et(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ct(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Rt(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Nt(e){if(this.operations=[],e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function At(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Ut(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function Lt(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}function qt(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)null!=e[t[n]]&&(this[t[n]]=e[t[n]])}return p.google=((L={}).cloud=((r={}).discoveryengine=((e={}).v1beta=((i={}).Interval=(l.prototype.minimum=null,l.prototype.exclusiveMinimum=null,l.prototype.maximum=null,l.prototype.exclusiveMaximum=null,Object.defineProperty(l.prototype,"min",{get:u.oneOfGetter(t=["minimum","exclusiveMinimum"]),set:u.oneOfSetter(t)}),Object.defineProperty(l.prototype,"max",{get:u.oneOfGetter(t=["maximum","exclusiveMaximum"]),set:u.oneOfSetter(t)}),l.create=function(e){return new l(e)},l.encode=function(e,t){return t=t||a.create(),null!=e.minimum&&Object.hasOwnProperty.call(e,"minimum")&&t.uint32(9).double(e.minimum),null!=e.exclusiveMinimum&&Object.hasOwnProperty.call(e,"exclusiveMinimum")&&t.uint32(17).double(e.exclusiveMinimum),null!=e.maximum&&Object.hasOwnProperty.call(e,"maximum")&&t.uint32(25).double(e.maximum),null!=e.exclusiveMaximum&&Object.hasOwnProperty.call(e,"exclusiveMaximum")&&t.uint32(33).double(e.exclusiveMaximum),t},l.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},l.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.Interval;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.minimum=e.double();break;case 2:o.exclusiveMinimum=e.double();break;case 3:o.maximum=e.double();break;case 4:o.exclusiveMaximum=e.double();break;default:e.skipType(7&r)}}return o},l.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},l.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.minimum&&e.hasOwnProperty("minimum")&&(t.min=1,"number"!=typeof e.minimum))return"minimum: number expected";if(null!=e.exclusiveMinimum&&e.hasOwnProperty("exclusiveMinimum")){if(1===t.min)return"min: multiple values";if(t.min=1,"number"!=typeof e.exclusiveMinimum)return"exclusiveMinimum: number expected"}if(null!=e.maximum&&e.hasOwnProperty("maximum")&&(t.max=1,"number"!=typeof e.maximum))return"maximum: number expected";if(null!=e.exclusiveMaximum&&e.hasOwnProperty("exclusiveMaximum")){if(1===t.max)return"max: multiple values";if(t.max=1,"number"!=typeof e.exclusiveMaximum)return"exclusiveMaximum: number expected"}return null},l.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.Interval?e:(t=new p.google.cloud.discoveryengine.v1beta.Interval,null!=e.minimum&&(t.minimum=Number(e.minimum)),null!=e.exclusiveMinimum&&(t.exclusiveMinimum=Number(e.exclusiveMinimum)),null!=e.maximum&&(t.maximum=Number(e.maximum)),null!=e.exclusiveMaximum&&(t.exclusiveMaximum=Number(e.exclusiveMaximum)),t)},l.toObject=function(e,t){t=t||{};var n={};return null!=e.minimum&&e.hasOwnProperty("minimum")&&(n.minimum=t.json&&!isFinite(e.minimum)?String(e.minimum):e.minimum,t.oneofs)&&(n.min="minimum"),null!=e.exclusiveMinimum&&e.hasOwnProperty("exclusiveMinimum")&&(n.exclusiveMinimum=t.json&&!isFinite(e.exclusiveMinimum)?String(e.exclusiveMinimum):e.exclusiveMinimum,t.oneofs)&&(n.min="exclusiveMinimum"),null!=e.maximum&&e.hasOwnProperty("maximum")&&(n.maximum=t.json&&!isFinite(e.maximum)?String(e.maximum):e.maximum,t.oneofs)&&(n.max="maximum"),null!=e.exclusiveMaximum&&e.hasOwnProperty("exclusiveMaximum")&&(n.exclusiveMaximum=t.json&&!isFinite(e.exclusiveMaximum)?String(e.exclusiveMaximum):e.exclusiveMaximum,t.oneofs)&&(n.max="exclusiveMaximum"),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.cloud.discoveryengine.v1beta.Interval"},l),i.CustomAttribute=(q.prototype.text=u.emptyArray,q.prototype.numbers=u.emptyArray,q.create=function(e){return new q(e)},q.encode=function(e,t){if(t=t||a.create(),null!=e.text&&e.text.length)for(var n=0;n<e.text.length;++n)t.uint32(10).string(e.text[n]);if(null!=e.numbers&&e.numbers.length){t.uint32(18).fork();for(n=0;n<e.numbers.length;++n)t.double(e.numbers[n]);t.ldelim()}return t},q.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},q.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.CustomAttribute;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.text&&o.text.length||(o.text=[]),o.text.push(e.string());break;case 2:if(o.numbers&&o.numbers.length||(o.numbers=[]),2==(7&r))for(var i=e.uint32()+e.pos;e.pos<i;)o.numbers.push(e.double());else o.numbers.push(e.double());break;default:e.skipType(7&r)}}return o},q.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},q.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.text&&e.hasOwnProperty("text")){if(!Array.isArray(e.text))return"text: array expected";for(var t=0;t<e.text.length;++t)if(!u.isString(e.text[t]))return"text: string[] expected"}if(null!=e.numbers&&e.hasOwnProperty("numbers")){if(!Array.isArray(e.numbers))return"numbers: array expected";for(t=0;t<e.numbers.length;++t)if("number"!=typeof e.numbers[t])return"numbers: number[] expected"}return null},q.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.CustomAttribute)return e;var t=new p.google.cloud.discoveryengine.v1beta.CustomAttribute;if(e.text){if(!Array.isArray(e.text))throw TypeError(".google.cloud.discoveryengine.v1beta.CustomAttribute.text: array expected");t.text=[];for(var n=0;n<e.text.length;++n)t.text[n]=String(e.text[n])}if(e.numbers){if(!Array.isArray(e.numbers))throw TypeError(".google.cloud.discoveryengine.v1beta.CustomAttribute.numbers: array expected");t.numbers=[];for(n=0;n<e.numbers.length;++n)t.numbers[n]=Number(e.numbers[n])}return t},q.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.text=[],n.numbers=[]),e.text&&e.text.length){n.text=[];for(var o=0;o<e.text.length;++o)n.text[o]=e.text[o]}if(e.numbers&&e.numbers.length){n.numbers=[];for(o=0;o<e.numbers.length;++o)n.numbers[o]=t.json&&!isFinite(e.numbers[o])?String(e.numbers[o]):e.numbers[o]}return n},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.cloud.discoveryengine.v1beta.CustomAttribute"},q),i.UserInfo=(V.prototype.userId="",V.prototype.userAgent="",V.create=function(e){return new V(e)},V.encode=function(e,t){return t=t||a.create(),null!=e.userId&&Object.hasOwnProperty.call(e,"userId")&&t.uint32(10).string(e.userId),null!=e.userAgent&&Object.hasOwnProperty.call(e,"userAgent")&&t.uint32(18).string(e.userAgent),t},V.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},V.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.UserInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.userId=e.string();break;case 2:o.userAgent=e.string();break;default:e.skipType(7&r)}}return o},V.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},V.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.userId&&e.hasOwnProperty("userId")&&!u.isString(e.userId)?"userId: string expected":null!=e.userAgent&&e.hasOwnProperty("userAgent")&&!u.isString(e.userAgent)?"userAgent: string expected":null},V.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.UserInfo?e:(t=new p.google.cloud.discoveryengine.v1beta.UserInfo,null!=e.userId&&(t.userId=String(e.userId)),null!=e.userAgent&&(t.userAgent=String(e.userAgent)),t)},V.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.userId="",n.userAgent=""),null!=e.userId&&e.hasOwnProperty("userId")&&(n.userId=e.userId),null!=e.userAgent&&e.hasOwnProperty("userAgent")&&(n.userAgent=e.userAgent),n},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.cloud.discoveryengine.v1beta.UserInfo"},V),i.CompletionService=(((F.prototype=Object.create(o.rpc.Service.prototype)).constructor=F).create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(F.prototype.completeQuery=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.CompleteQueryRequest,p.google.cloud.discoveryengine.v1beta.CompleteQueryResponse,t,n)},"name",{value:"CompleteQuery"}),F),i.CompleteQueryRequest=(B.prototype.dataStore="",B.prototype.query="",B.prototype.queryModel="",B.prototype.userPseudoId="",B.create=function(e){return new B(e)},B.encode=function(e,t){return t=t||a.create(),null!=e.dataStore&&Object.hasOwnProperty.call(e,"dataStore")&&t.uint32(10).string(e.dataStore),null!=e.query&&Object.hasOwnProperty.call(e,"query")&&t.uint32(18).string(e.query),null!=e.queryModel&&Object.hasOwnProperty.call(e,"queryModel")&&t.uint32(26).string(e.queryModel),null!=e.userPseudoId&&Object.hasOwnProperty.call(e,"userPseudoId")&&t.uint32(34).string(e.userPseudoId),t},B.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},B.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.CompleteQueryRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.dataStore=e.string();break;case 2:o.query=e.string();break;case 3:o.queryModel=e.string();break;case 4:o.userPseudoId=e.string();break;default:e.skipType(7&r)}}return o},B.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},B.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.dataStore&&e.hasOwnProperty("dataStore")&&!u.isString(e.dataStore)?"dataStore: string expected":null!=e.query&&e.hasOwnProperty("query")&&!u.isString(e.query)?"query: string expected":null!=e.queryModel&&e.hasOwnProperty("queryModel")&&!u.isString(e.queryModel)?"queryModel: string expected":null!=e.userPseudoId&&e.hasOwnProperty("userPseudoId")&&!u.isString(e.userPseudoId)?"userPseudoId: string expected":null},B.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.CompleteQueryRequest?e:(t=new p.google.cloud.discoveryengine.v1beta.CompleteQueryRequest,null!=e.dataStore&&(t.dataStore=String(e.dataStore)),null!=e.query&&(t.query=String(e.query)),null!=e.queryModel&&(t.queryModel=String(e.queryModel)),null!=e.userPseudoId&&(t.userPseudoId=String(e.userPseudoId)),t)},B.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.dataStore="",n.query="",n.queryModel="",n.userPseudoId=""),null!=e.dataStore&&e.hasOwnProperty("dataStore")&&(n.dataStore=e.dataStore),null!=e.query&&e.hasOwnProperty("query")&&(n.query=e.query),null!=e.queryModel&&e.hasOwnProperty("queryModel")&&(n.queryModel=e.queryModel),null!=e.userPseudoId&&e.hasOwnProperty("userPseudoId")&&(n.userPseudoId=e.userPseudoId),n},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.cloud.discoveryengine.v1beta.CompleteQueryRequest"},B),i.CompleteQueryResponse=(M.prototype.querySuggestions=u.emptyArray,M.create=function(e){return new M(e)},M.encode=function(e,t){if(t=t||a.create(),null!=e.querySuggestions&&e.querySuggestions.length)for(var n=0;n<e.querySuggestions.length;++n)p.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.encode(e.querySuggestions[n],t.uint32(10).fork()).ldelim();return t},M.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},M.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.CompleteQueryResponse;e.pos<n;){var r=e.uint32();r>>>3==1?(o.querySuggestions&&o.querySuggestions.length||(o.querySuggestions=[]),o.querySuggestions.push(p.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.decode(e,e.uint32()))):e.skipType(7&r)}return o},M.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},M.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.querySuggestions&&e.hasOwnProperty("querySuggestions")){if(!Array.isArray(e.querySuggestions))return"querySuggestions: array expected";for(var t=0;t<e.querySuggestions.length;++t){var n=p.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.verify(e.querySuggestions[t]);if(n)return"querySuggestions."+n}}return null},M.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.CompleteQueryResponse)return e;var t=new p.google.cloud.discoveryengine.v1beta.CompleteQueryResponse;if(e.querySuggestions){if(!Array.isArray(e.querySuggestions))throw TypeError(".google.cloud.discoveryengine.v1beta.CompleteQueryResponse.querySuggestions: array expected");t.querySuggestions=[];for(var n=0;n<e.querySuggestions.length;++n){if("object"!=typeof e.querySuggestions[n])throw TypeError(".google.cloud.discoveryengine.v1beta.CompleteQueryResponse.querySuggestions: object expected");t.querySuggestions[n]=p.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.fromObject(e.querySuggestions[n])}}return t},M.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.querySuggestions=[]),e.querySuggestions&&e.querySuggestions.length){n.querySuggestions=[];for(var o=0;o<e.querySuggestions.length;++o)n.querySuggestions[o]=p.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion.toObject(e.querySuggestions[o],t)}return n},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.cloud.discoveryengine.v1beta.CompleteQueryResponse"},M.QuerySuggestion=(J.prototype.suggestion="",J.create=function(e){return new J(e)},J.encode=function(e,t){return t=t||a.create(),null!=e.suggestion&&Object.hasOwnProperty.call(e,"suggestion")&&t.uint32(10).string(e.suggestion),t},J.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},J.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion;e.pos<n;){var r=e.uint32();r>>>3==1?o.suggestion=e.string():e.skipType(7&r)}return o},J.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},J.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.suggestion&&e.hasOwnProperty("suggestion")&&!u.isString(e.suggestion)?"suggestion: string expected":null},J.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion?e:(t=new p.google.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion,null!=e.suggestion&&(t.suggestion=String(e.suggestion)),t)},J.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.suggestion=""),null!=e.suggestion&&e.hasOwnProperty("suggestion")&&(n.suggestion=e.suggestion),n},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.cloud.discoveryengine.v1beta.CompleteQueryResponse.QuerySuggestion"},J),M),i.Document=(s.prototype.structData=null,s.prototype.jsonData=null,s.prototype.name="",s.prototype.id="",s.prototype.schemaId="",s.prototype.content=null,s.prototype.parentDocumentId="",s.prototype.derivedStructData=null,Object.defineProperty(s.prototype,"data",{get:u.oneOfGetter(t=["structData","jsonData"]),set:u.oneOfSetter(t)}),s.create=function(e){return new s(e)},s.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(18).string(e.id),null!=e.schemaId&&Object.hasOwnProperty.call(e,"schemaId")&&t.uint32(26).string(e.schemaId),null!=e.structData&&Object.hasOwnProperty.call(e,"structData")&&p.google.protobuf.Struct.encode(e.structData,t.uint32(34).fork()).ldelim(),null!=e.jsonData&&Object.hasOwnProperty.call(e,"jsonData")&&t.uint32(42).string(e.jsonData),null!=e.derivedStructData&&Object.hasOwnProperty.call(e,"derivedStructData")&&p.google.protobuf.Struct.encode(e.derivedStructData,t.uint32(50).fork()).ldelim(),null!=e.parentDocumentId&&Object.hasOwnProperty.call(e,"parentDocumentId")&&t.uint32(58).string(e.parentDocumentId),null!=e.content&&Object.hasOwnProperty.call(e,"content")&&p.google.cloud.discoveryengine.v1beta.Document.Content.encode(e.content,t.uint32(82).fork()).ldelim(),t},s.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},s.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.Document;e.pos<n;){var r=e.uint32();switch(r>>>3){case 4:o.structData=p.google.protobuf.Struct.decode(e,e.uint32());break;case 5:o.jsonData=e.string();break;case 1:o.name=e.string();break;case 2:o.id=e.string();break;case 3:o.schemaId=e.string();break;case 10:o.content=p.google.cloud.discoveryengine.v1beta.Document.Content.decode(e,e.uint32());break;case 7:o.parentDocumentId=e.string();break;case 6:o.derivedStructData=p.google.protobuf.Struct.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},s.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},s.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t,n={};if(null!=e.structData&&e.hasOwnProperty("structData")&&(n.data=1,t=p.google.protobuf.Struct.verify(e.structData)))return"structData."+t;if(null!=e.jsonData&&e.hasOwnProperty("jsonData")){if(1===n.data)return"data: multiple values";if(n.data=1,!u.isString(e.jsonData))return"jsonData: string expected"}if(null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name))return"name: string expected";if(null!=e.id&&e.hasOwnProperty("id")&&!u.isString(e.id))return"id: string expected";if(null!=e.schemaId&&e.hasOwnProperty("schemaId")&&!u.isString(e.schemaId))return"schemaId: string expected";if(null!=e.content&&e.hasOwnProperty("content")&&(t=p.google.cloud.discoveryengine.v1beta.Document.Content.verify(e.content)))return"content."+t;if(null!=e.parentDocumentId&&e.hasOwnProperty("parentDocumentId")&&!u.isString(e.parentDocumentId))return"parentDocumentId: string expected";if(null!=e.derivedStructData&&e.hasOwnProperty("derivedStructData")&&(t=p.google.protobuf.Struct.verify(e.derivedStructData)))return"derivedStructData."+t;return null},s.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.Document)return e;var t=new p.google.cloud.discoveryengine.v1beta.Document;if(null!=e.structData){if("object"!=typeof e.structData)throw TypeError(".google.cloud.discoveryengine.v1beta.Document.structData: object expected");t.structData=p.google.protobuf.Struct.fromObject(e.structData)}if(null!=e.jsonData&&(t.jsonData=String(e.jsonData)),null!=e.name&&(t.name=String(e.name)),null!=e.id&&(t.id=String(e.id)),null!=e.schemaId&&(t.schemaId=String(e.schemaId)),null!=e.content){if("object"!=typeof e.content)throw TypeError(".google.cloud.discoveryengine.v1beta.Document.content: object expected");t.content=p.google.cloud.discoveryengine.v1beta.Document.Content.fromObject(e.content)}if(null!=e.parentDocumentId&&(t.parentDocumentId=String(e.parentDocumentId)),null!=e.derivedStructData){if("object"!=typeof e.derivedStructData)throw TypeError(".google.cloud.discoveryengine.v1beta.Document.derivedStructData: object expected");t.derivedStructData=p.google.protobuf.Struct.fromObject(e.derivedStructData)}return t},s.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name="",n.id="",n.schemaId="",n.derivedStructData=null,n.parentDocumentId="",n.content=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.schemaId&&e.hasOwnProperty("schemaId")&&(n.schemaId=e.schemaId),null!=e.structData&&e.hasOwnProperty("structData")&&(n.structData=p.google.protobuf.Struct.toObject(e.structData,t),t.oneofs)&&(n.data="structData"),null!=e.jsonData&&e.hasOwnProperty("jsonData")&&(n.jsonData=e.jsonData,t.oneofs)&&(n.data="jsonData"),null!=e.derivedStructData&&e.hasOwnProperty("derivedStructData")&&(n.derivedStructData=p.google.protobuf.Struct.toObject(e.derivedStructData,t)),null!=e.parentDocumentId&&e.hasOwnProperty("parentDocumentId")&&(n.parentDocumentId=e.parentDocumentId),null!=e.content&&e.hasOwnProperty("content")&&(n.content=p.google.cloud.discoveryengine.v1beta.Document.Content.toObject(e.content,t)),n},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.cloud.discoveryengine.v1beta.Document"},s.Content=(G.prototype.rawBytes=null,G.prototype.uri=null,G.prototype.mimeType="",Object.defineProperty(G.prototype,"content",{get:u.oneOfGetter(t=["rawBytes","uri"]),set:u.oneOfSetter(t)}),G.create=function(e){return new G(e)},G.encode=function(e,t){return t=t||a.create(),null!=e.mimeType&&Object.hasOwnProperty.call(e,"mimeType")&&t.uint32(10).string(e.mimeType),null!=e.rawBytes&&Object.hasOwnProperty.call(e,"rawBytes")&&t.uint32(18).bytes(e.rawBytes),null!=e.uri&&Object.hasOwnProperty.call(e,"uri")&&t.uint32(26).string(e.uri),t},G.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},G.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.Document.Content;e.pos<n;){var r=e.uint32();switch(r>>>3){case 2:o.rawBytes=e.bytes();break;case 3:o.uri=e.string();break;case 1:o.mimeType=e.string();break;default:e.skipType(7&r)}}return o},G.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},G.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.rawBytes&&e.hasOwnProperty("rawBytes")&&(t.content=1,!(e.rawBytes&&"number"==typeof e.rawBytes.length||u.isString(e.rawBytes))))return"rawBytes: buffer expected";if(null!=e.uri&&e.hasOwnProperty("uri")){if(1===t.content)return"content: multiple values";if(t.content=1,!u.isString(e.uri))return"uri: string expected"}return null!=e.mimeType&&e.hasOwnProperty("mimeType")&&!u.isString(e.mimeType)?"mimeType: string expected":null},G.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.Document.Content?e:(t=new p.google.cloud.discoveryengine.v1beta.Document.Content,null!=e.rawBytes&&("string"==typeof e.rawBytes?u.base64.decode(e.rawBytes,t.rawBytes=u.newBuffer(u.base64.length(e.rawBytes)),0):0<=e.rawBytes.length&&(t.rawBytes=e.rawBytes)),null!=e.uri&&(t.uri=String(e.uri)),null!=e.mimeType&&(t.mimeType=String(e.mimeType)),t)},G.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.mimeType=""),null!=e.mimeType&&e.hasOwnProperty("mimeType")&&(n.mimeType=e.mimeType),null!=e.rawBytes&&e.hasOwnProperty("rawBytes")&&(n.rawBytes=t.bytes===String?u.base64.encode(e.rawBytes,0,e.rawBytes.length):t.bytes===Array?Array.prototype.slice.call(e.rawBytes):e.rawBytes,t.oneofs)&&(n.content="rawBytes"),null!=e.uri&&e.hasOwnProperty("uri")&&(n.uri=e.uri,t.oneofs)&&(n.content="uri"),n},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.cloud.discoveryengine.v1beta.Document.Content"},G),s),i.DocumentService=(((_.prototype=Object.create(o.rpc.Service.prototype)).constructor=_).create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(_.prototype.getDocument=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.GetDocumentRequest,p.google.cloud.discoveryengine.v1beta.Document,t,n)},"name",{value:"GetDocument"}),Object.defineProperty(_.prototype.listDocuments=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.ListDocumentsRequest,p.google.cloud.discoveryengine.v1beta.ListDocumentsResponse,t,n)},"name",{value:"ListDocuments"}),Object.defineProperty(_.prototype.createDocument=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.CreateDocumentRequest,p.google.cloud.discoveryengine.v1beta.Document,t,n)},"name",{value:"CreateDocument"}),Object.defineProperty(_.prototype.updateDocument=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest,p.google.cloud.discoveryengine.v1beta.Document,t,n)},"name",{value:"UpdateDocument"}),Object.defineProperty(_.prototype.deleteDocument=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest,p.google.protobuf.Empty,t,n)},"name",{value:"DeleteDocument"}),Object.defineProperty(_.prototype.importDocuments=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest,p.google.longrunning.Operation,t,n)},"name",{value:"ImportDocuments"}),_),i.GetDocumentRequest=(z.prototype.name="",z.create=function(e){return new z(e)},z.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},z.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},z.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.GetDocumentRequest;e.pos<n;){var r=e.uint32();r>>>3==1?o.name=e.string():e.skipType(7&r)}return o},z.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},z.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name)?"name: string expected":null},z.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.GetDocumentRequest?e:(t=new p.google.cloud.discoveryengine.v1beta.GetDocumentRequest,null!=e.name&&(t.name=String(e.name)),t)},z.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},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.cloud.discoveryengine.v1beta.GetDocumentRequest"},z),i.ListDocumentsRequest=(H.prototype.parent="",H.prototype.pageSize=0,H.prototype.pageToken="",H.create=function(e){return new H(e)},H.encode=function(e,t){return t=t||a.create(),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},H.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},H.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ListDocumentsRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.parent=e.string();break;case 2:o.pageSize=e.int32();break;case 3:o.pageToken=e.string();break;default:e.skipType(7&r)}}return o},H.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},H.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.parent&&e.hasOwnProperty("parent")&&!u.isString(e.parent)?"parent: string expected":null!=e.pageSize&&e.hasOwnProperty("pageSize")&&!u.isInteger(e.pageSize)?"pageSize: integer expected":null!=e.pageToken&&e.hasOwnProperty("pageToken")&&!u.isString(e.pageToken)?"pageToken: string expected":null},H.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.ListDocumentsRequest?e:(t=new p.google.cloud.discoveryengine.v1beta.ListDocumentsRequest,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)},H.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.parent="",n.pageSize=0,n.pageToken=""),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=e.parent),null!=e.pageSize&&e.hasOwnProperty("pageSize")&&(n.pageSize=e.pageSize),null!=e.pageToken&&e.hasOwnProperty("pageToken")&&(n.pageToken=e.pageToken),n},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.cloud.discoveryengine.v1beta.ListDocumentsRequest"},H),i.ListDocumentsResponse=(Q.prototype.documents=u.emptyArray,Q.prototype.nextPageToken="",Q.create=function(e){return new Q(e)},Q.encode=function(e,t){if(t=t||a.create(),null!=e.documents&&e.documents.length)for(var n=0;n<e.documents.length;++n)p.google.cloud.discoveryengine.v1beta.Document.encode(e.documents[n],t.uint32(10).fork()).ldelim();return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(18).string(e.nextPageToken),t},Q.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Q.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ListDocumentsResponse;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.documents&&o.documents.length||(o.documents=[]),o.documents.push(p.google.cloud.discoveryengine.v1beta.Document.decode(e,e.uint32()));break;case 2:o.nextPageToken=e.string();break;default:e.skipType(7&r)}}return o},Q.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Q.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.documents&&e.hasOwnProperty("documents")){if(!Array.isArray(e.documents))return"documents: array expected";for(var t=0;t<e.documents.length;++t){var n=p.google.cloud.discoveryengine.v1beta.Document.verify(e.documents[t]);if(n)return"documents."+n}}return null!=e.nextPageToken&&e.hasOwnProperty("nextPageToken")&&!u.isString(e.nextPageToken)?"nextPageToken: string expected":null},Q.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ListDocumentsResponse)return e;var t=new p.google.cloud.discoveryengine.v1beta.ListDocumentsResponse;if(e.documents){if(!Array.isArray(e.documents))throw TypeError(".google.cloud.discoveryengine.v1beta.ListDocumentsResponse.documents: array expected");t.documents=[];for(var n=0;n<e.documents.length;++n){if("object"!=typeof e.documents[n])throw TypeError(".google.cloud.discoveryengine.v1beta.ListDocumentsResponse.documents: object expected");t.documents[n]=p.google.cloud.discoveryengine.v1beta.Document.fromObject(e.documents[n])}}return null!=e.nextPageToken&&(t.nextPageToken=String(e.nextPageToken)),t},Q.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.documents=[]),t.defaults&&(n.nextPageToken=""),e.documents&&e.documents.length){n.documents=[];for(var o=0;o<e.documents.length;++o)n.documents[o]=p.google.cloud.discoveryengine.v1beta.Document.toObject(e.documents[o],t)}return null!=e.nextPageToken&&e.hasOwnProperty("nextPageToken")&&(n.nextPageToken=e.nextPageToken),n},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.cloud.discoveryengine.v1beta.ListDocumentsResponse"},Q),i.CreateDocumentRequest=(K.prototype.parent="",K.prototype.document=null,K.prototype.documentId="",K.create=function(e){return new K(e)},K.encode=function(e,t){return t=t||a.create(),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&p.google.cloud.discoveryengine.v1beta.Document.encode(e.document,t.uint32(18).fork()).ldelim(),null!=e.documentId&&Object.hasOwnProperty.call(e,"documentId")&&t.uint32(26).string(e.documentId),t},K.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},K.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.CreateDocumentRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.parent=e.string();break;case 2:o.document=p.google.cloud.discoveryengine.v1beta.Document.decode(e,e.uint32());break;case 3:o.documentId=e.string();break;default:e.skipType(7&r)}}return o},K.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},K.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.parent&&e.hasOwnProperty("parent")&&!u.isString(e.parent))return"parent: string expected";if(null!=e.document&&e.hasOwnProperty("document")){var t=p.google.cloud.discoveryengine.v1beta.Document.verify(e.document);if(t)return"document."+t}return null!=e.documentId&&e.hasOwnProperty("documentId")&&!u.isString(e.documentId)?"documentId: string expected":null},K.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.CreateDocumentRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.CreateDocumentRequest;if(null!=e.parent&&(t.parent=String(e.parent)),null!=e.document){if("object"!=typeof e.document)throw TypeError(".google.cloud.discoveryengine.v1beta.CreateDocumentRequest.document: object expected");t.document=p.google.cloud.discoveryengine.v1beta.Document.fromObject(e.document)}return null!=e.documentId&&(t.documentId=String(e.documentId)),t},K.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.parent="",n.document=null,n.documentId=""),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=e.parent),null!=e.document&&e.hasOwnProperty("document")&&(n.document=p.google.cloud.discoveryengine.v1beta.Document.toObject(e.document,t)),null!=e.documentId&&e.hasOwnProperty("documentId")&&(n.documentId=e.documentId),n},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.cloud.discoveryengine.v1beta.CreateDocumentRequest"},K),i.UpdateDocumentRequest=(Y.prototype.document=null,Y.prototype.allowMissing=!1,Y.create=function(e){return new Y(e)},Y.encode=function(e,t){return t=t||a.create(),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&p.google.cloud.discoveryengine.v1beta.Document.encode(e.document,t.uint32(10).fork()).ldelim(),null!=e.allowMissing&&Object.hasOwnProperty.call(e,"allowMissing")&&t.uint32(16).bool(e.allowMissing),t},Y.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Y.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.document=p.google.cloud.discoveryengine.v1beta.Document.decode(e,e.uint32());break;case 2:o.allowMissing=e.bool();break;default:e.skipType(7&r)}}return o},Y.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Y.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.document&&e.hasOwnProperty("document")){var t=p.google.cloud.discoveryengine.v1beta.Document.verify(e.document);if(t)return"document."+t}return null!=e.allowMissing&&e.hasOwnProperty("allowMissing")&&"boolean"!=typeof e.allowMissing?"allowMissing: boolean expected":null},Y.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.UpdateDocumentRequest;if(null!=e.document){if("object"!=typeof e.document)throw TypeError(".google.cloud.discoveryengine.v1beta.UpdateDocumentRequest.document: object expected");t.document=p.google.cloud.discoveryengine.v1beta.Document.fromObject(e.document)}return null!=e.allowMissing&&(t.allowMissing=Boolean(e.allowMissing)),t},Y.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.document=null,n.allowMissing=!1),null!=e.document&&e.hasOwnProperty("document")&&(n.document=p.google.cloud.discoveryengine.v1beta.Document.toObject(e.document,t)),null!=e.allowMissing&&e.hasOwnProperty("allowMissing")&&(n.allowMissing=e.allowMissing),n},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.cloud.discoveryengine.v1beta.UpdateDocumentRequest"},Y),i.DeleteDocumentRequest=(W.prototype.name="",W.create=function(e){return new W(e)},W.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},W.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},W.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest;e.pos<n;){var r=e.uint32();r>>>3==1?o.name=e.string():e.skipType(7&r)}return o},W.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},W.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name)?"name: string expected":null},W.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest?e:(t=new p.google.cloud.discoveryengine.v1beta.DeleteDocumentRequest,null!=e.name&&(t.name=String(e.name)),t)},W.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},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.cloud.discoveryengine.v1beta.DeleteDocumentRequest"},W),i.GcsSource=(X.prototype.inputUris=u.emptyArray,X.prototype.dataSchema="",X.create=function(e){return new X(e)},X.encode=function(e,t){if(t=t||a.create(),null!=e.inputUris&&e.inputUris.length)for(var n=0;n<e.inputUris.length;++n)t.uint32(10).string(e.inputUris[n]);return null!=e.dataSchema&&Object.hasOwnProperty.call(e,"dataSchema")&&t.uint32(18).string(e.dataSchema),t},X.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},X.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.GcsSource;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.inputUris&&o.inputUris.length||(o.inputUris=[]),o.inputUris.push(e.string());break;case 2:o.dataSchema=e.string();break;default:e.skipType(7&r)}}return o},X.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},X.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.inputUris&&e.hasOwnProperty("inputUris")){if(!Array.isArray(e.inputUris))return"inputUris: array expected";for(var t=0;t<e.inputUris.length;++t)if(!u.isString(e.inputUris[t]))return"inputUris: string[] expected"}return null!=e.dataSchema&&e.hasOwnProperty("dataSchema")&&!u.isString(e.dataSchema)?"dataSchema: string expected":null},X.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.GcsSource)return e;var t=new p.google.cloud.discoveryengine.v1beta.GcsSource;if(e.inputUris){if(!Array.isArray(e.inputUris))throw TypeError(".google.cloud.discoveryengine.v1beta.GcsSource.inputUris: array expected");t.inputUris=[];for(var n=0;n<e.inputUris.length;++n)t.inputUris[n]=String(e.inputUris[n])}return null!=e.dataSchema&&(t.dataSchema=String(e.dataSchema)),t},X.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.inputUris=[]),t.defaults&&(n.dataSchema=""),e.inputUris&&e.inputUris.length){n.inputUris=[];for(var o=0;o<e.inputUris.length;++o)n.inputUris[o]=e.inputUris[o]}return null!=e.dataSchema&&e.hasOwnProperty("dataSchema")&&(n.dataSchema=e.dataSchema),n},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.cloud.discoveryengine.v1beta.GcsSource"},X),i.BigQuerySource=(g.prototype.partitionDate=null,g.prototype.projectId="",g.prototype.datasetId="",g.prototype.tableId="",g.prototype.gcsStagingDir="",g.prototype.dataSchema="",Object.defineProperty(g.prototype,"partition",{get:u.oneOfGetter(t=["partitionDate"]),set:u.oneOfSetter(t)}),g.create=function(e){return new g(e)},g.encode=function(e,t){return t=t||a.create(),null!=e.projectId&&Object.hasOwnProperty.call(e,"projectId")&&t.uint32(10).string(e.projectId),null!=e.datasetId&&Object.hasOwnProperty.call(e,"datasetId")&&t.uint32(18).string(e.datasetId),null!=e.tableId&&Object.hasOwnProperty.call(e,"tableId")&&t.uint32(26).string(e.tableId),null!=e.gcsStagingDir&&Object.hasOwnProperty.call(e,"gcsStagingDir")&&t.uint32(34).string(e.gcsStagingDir),null!=e.partitionDate&&Object.hasOwnProperty.call(e,"partitionDate")&&p.google.type.Date.encode(e.partitionDate,t.uint32(42).fork()).ldelim(),null!=e.dataSchema&&Object.hasOwnProperty.call(e,"dataSchema")&&t.uint32(50).string(e.dataSchema),t},g.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},g.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.BigQuerySource;e.pos<n;){var r=e.uint32();switch(r>>>3){case 5:o.partitionDate=p.google.type.Date.decode(e,e.uint32());break;case 1:o.projectId=e.string();break;case 2:o.datasetId=e.string();break;case 3:o.tableId=e.string();break;case 4:o.gcsStagingDir=e.string();break;case 6:o.dataSchema=e.string();break;default:e.skipType(7&r)}}return o},g.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},g.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.partitionDate&&e.hasOwnProperty("partitionDate")){var t=p.google.type.Date.verify(e.partitionDate);if(t)return"partitionDate."+t}return null!=e.projectId&&e.hasOwnProperty("projectId")&&!u.isString(e.projectId)?"projectId: string expected":null!=e.datasetId&&e.hasOwnProperty("datasetId")&&!u.isString(e.datasetId)?"datasetId: string expected":null!=e.tableId&&e.hasOwnProperty("tableId")&&!u.isString(e.tableId)?"tableId: string expected":null!=e.gcsStagingDir&&e.hasOwnProperty("gcsStagingDir")&&!u.isString(e.gcsStagingDir)?"gcsStagingDir: string expected":null!=e.dataSchema&&e.hasOwnProperty("dataSchema")&&!u.isString(e.dataSchema)?"dataSchema: string expected":null},g.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.BigQuerySource)return e;var t=new p.google.cloud.discoveryengine.v1beta.BigQuerySource;if(null!=e.partitionDate){if("object"!=typeof e.partitionDate)throw TypeError(".google.cloud.discoveryengine.v1beta.BigQuerySource.partitionDate: object expected");t.partitionDate=p.google.type.Date.fromObject(e.partitionDate)}return null!=e.projectId&&(t.projectId=String(e.projectId)),null!=e.datasetId&&(t.datasetId=String(e.datasetId)),null!=e.tableId&&(t.tableId=String(e.tableId)),null!=e.gcsStagingDir&&(t.gcsStagingDir=String(e.gcsStagingDir)),null!=e.dataSchema&&(t.dataSchema=String(e.dataSchema)),t},g.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.projectId="",n.datasetId="",n.tableId="",n.gcsStagingDir="",n.dataSchema=""),null!=e.projectId&&e.hasOwnProperty("projectId")&&(n.projectId=e.projectId),null!=e.datasetId&&e.hasOwnProperty("datasetId")&&(n.datasetId=e.datasetId),null!=e.tableId&&e.hasOwnProperty("tableId")&&(n.tableId=e.tableId),null!=e.gcsStagingDir&&e.hasOwnProperty("gcsStagingDir")&&(n.gcsStagingDir=e.gcsStagingDir),null!=e.partitionDate&&e.hasOwnProperty("partitionDate")&&(n.partitionDate=p.google.type.Date.toObject(e.partitionDate,t),t.oneofs)&&(n.partition="partitionDate"),null!=e.dataSchema&&e.hasOwnProperty("dataSchema")&&(n.dataSchema=e.dataSchema),n},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.cloud.discoveryengine.v1beta.BigQuerySource"},g),i.ImportErrorConfig=(Z.prototype.gcsPrefix=null,Object.defineProperty(Z.prototype,"destination",{get:u.oneOfGetter(t=["gcsPrefix"]),set:u.oneOfSetter(t)}),Z.create=function(e){return new Z(e)},Z.encode=function(e,t){return t=t||a.create(),null!=e.gcsPrefix&&Object.hasOwnProperty.call(e,"gcsPrefix")&&t.uint32(10).string(e.gcsPrefix),t},Z.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Z.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportErrorConfig;e.pos<n;){var r=e.uint32();r>>>3==1?o.gcsPrefix=e.string():e.skipType(7&r)}return o},Z.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Z.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.gcsPrefix&&e.hasOwnProperty("gcsPrefix")&&!u.isString(e.gcsPrefix)?"gcsPrefix: string expected":null},Z.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.ImportErrorConfig?e:(t=new p.google.cloud.discoveryengine.v1beta.ImportErrorConfig,null!=e.gcsPrefix&&(t.gcsPrefix=String(e.gcsPrefix)),t)},Z.toObject=function(e,t){t=t||{};var n={};return null!=e.gcsPrefix&&e.hasOwnProperty("gcsPrefix")&&(n.gcsPrefix=e.gcsPrefix,t.oneofs)&&(n.destination="gcsPrefix"),n},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.cloud.discoveryengine.v1beta.ImportErrorConfig"},Z),i.ImportUserEventsRequest=(d.prototype.inlineSource=null,d.prototype.gcsSource=null,d.prototype.bigquerySource=null,d.prototype.parent="",d.prototype.errorConfig=null,Object.defineProperty(d.prototype,"source",{get:u.oneOfGetter(t=["inlineSource","gcsSource","bigquerySource"]),set:u.oneOfSetter(t)}),d.create=function(e){return new d(e)},d.encode=function(e,t){return t=t||a.create(),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.inlineSource&&Object.hasOwnProperty.call(e,"inlineSource")&&p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.encode(e.inlineSource,t.uint32(18).fork()).ldelim(),null!=e.gcsSource&&Object.hasOwnProperty.call(e,"gcsSource")&&p.google.cloud.discoveryengine.v1beta.GcsSource.encode(e.gcsSource,t.uint32(26).fork()).ldelim(),null!=e.bigquerySource&&Object.hasOwnProperty.call(e,"bigquerySource")&&p.google.cloud.discoveryengine.v1beta.BigQuerySource.encode(e.bigquerySource,t.uint32(34).fork()).ldelim(),null!=e.errorConfig&&Object.hasOwnProperty.call(e,"errorConfig")&&p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(e.errorConfig,t.uint32(42).fork()).ldelim(),t},d.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},d.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 2:o.inlineSource=p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.decode(e,e.uint32());break;case 3:o.gcsSource=p.google.cloud.discoveryengine.v1beta.GcsSource.decode(e,e.uint32());break;case 4:o.bigquerySource=p.google.cloud.discoveryengine.v1beta.BigQuerySource.decode(e,e.uint32());break;case 1:o.parent=e.string();break;case 5:o.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},d.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},d.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t,n={};if(null!=e.inlineSource&&e.hasOwnProperty("inlineSource")&&(n.source=1,t=p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.verify(e.inlineSource)))return"inlineSource."+t;if(null!=e.gcsSource&&e.hasOwnProperty("gcsSource")){if(1===n.source)return"source: multiple values";if(n.source=1,t=p.google.cloud.discoveryengine.v1beta.GcsSource.verify(e.gcsSource))return"gcsSource."+t}if(null!=e.bigquerySource&&e.hasOwnProperty("bigquerySource")){if(1===n.source)return"source: multiple values";if(n.source=1,t=p.google.cloud.discoveryengine.v1beta.BigQuerySource.verify(e.bigquerySource))return"bigquerySource."+t}if(null!=e.parent&&e.hasOwnProperty("parent")&&!u.isString(e.parent))return"parent: string expected";if(null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(t=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(e.errorConfig)))return"errorConfig."+t;return null},d.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest;if(null!=e.inlineSource){if("object"!=typeof e.inlineSource)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.inlineSource: object expected");t.inlineSource=p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.fromObject(e.inlineSource)}if(null!=e.gcsSource){if("object"!=typeof e.gcsSource)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.gcsSource: object expected");t.gcsSource=p.google.cloud.discoveryengine.v1beta.GcsSource.fromObject(e.gcsSource)}if(null!=e.bigquerySource){if("object"!=typeof e.bigquerySource)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.bigquerySource: object expected");t.bigquerySource=p.google.cloud.discoveryengine.v1beta.BigQuerySource.fromObject(e.bigquerySource)}if(null!=e.parent&&(t.parent=String(e.parent)),null!=e.errorConfig){if("object"!=typeof e.errorConfig)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.errorConfig: object expected");t.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(e.errorConfig)}return t},d.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.parent="",n.errorConfig=null),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=e.parent),null!=e.inlineSource&&e.hasOwnProperty("inlineSource")&&(n.inlineSource=p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.toObject(e.inlineSource,t),t.oneofs)&&(n.source="inlineSource"),null!=e.gcsSource&&e.hasOwnProperty("gcsSource")&&(n.gcsSource=p.google.cloud.discoveryengine.v1beta.GcsSource.toObject(e.gcsSource,t),t.oneofs)&&(n.source="gcsSource"),null!=e.bigquerySource&&e.hasOwnProperty("bigquerySource")&&(n.bigquerySource=p.google.cloud.discoveryengine.v1beta.BigQuerySource.toObject(e.bigquerySource,t),t.oneofs)&&(n.source="bigquerySource"),null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(n.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(e.errorConfig,t)),n},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.cloud.discoveryengine.v1beta.ImportUserEventsRequest"},d.InlineSource=($.prototype.userEvents=u.emptyArray,$.create=function(e){return new $(e)},$.encode=function(e,t){if(t=t||a.create(),null!=e.userEvents&&e.userEvents.length)for(var n=0;n<e.userEvents.length;++n)p.google.cloud.discoveryengine.v1beta.UserEvent.encode(e.userEvents[n],t.uint32(10).fork()).ldelim();return t},$.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},$.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource;e.pos<n;){var r=e.uint32();r>>>3==1?(o.userEvents&&o.userEvents.length||(o.userEvents=[]),o.userEvents.push(p.google.cloud.discoveryengine.v1beta.UserEvent.decode(e,e.uint32()))):e.skipType(7&r)}return o},$.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},$.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.userEvents&&e.hasOwnProperty("userEvents")){if(!Array.isArray(e.userEvents))return"userEvents: array expected";for(var t=0;t<e.userEvents.length;++t){var n=p.google.cloud.discoveryengine.v1beta.UserEvent.verify(e.userEvents[t]);if(n)return"userEvents."+n}}return null},$.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource;if(e.userEvents){if(!Array.isArray(e.userEvents))throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.userEvents: array expected");t.userEvents=[];for(var n=0;n<e.userEvents.length;++n){if("object"!=typeof e.userEvents[n])throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource.userEvents: object expected");t.userEvents[n]=p.google.cloud.discoveryengine.v1beta.UserEvent.fromObject(e.userEvents[n])}}return t},$.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.userEvents=[]),e.userEvents&&e.userEvents.length){n.userEvents=[];for(var o=0;o<e.userEvents.length;++o)n.userEvents[o]=p.google.cloud.discoveryengine.v1beta.UserEvent.toObject(e.userEvents[o],t)}return n},$.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},$.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.cloud.discoveryengine.v1beta.ImportUserEventsRequest.InlineSource"},$),d),i.ImportUserEventsResponse=(ee.prototype.errorSamples=u.emptyArray,ee.prototype.errorConfig=null,ee.prototype.joinedEventsCount=u.Long?u.Long.fromBits(0,0,!1):0,ee.prototype.unjoinedEventsCount=u.Long?u.Long.fromBits(0,0,!1):0,ee.create=function(e){return new ee(e)},ee.encode=function(e,t){if(t=t||a.create(),null!=e.errorSamples&&e.errorSamples.length)for(var n=0;n<e.errorSamples.length;++n)p.google.rpc.Status.encode(e.errorSamples[n],t.uint32(10).fork()).ldelim();return null!=e.errorConfig&&Object.hasOwnProperty.call(e,"errorConfig")&&p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(e.errorConfig,t.uint32(18).fork()).ldelim(),null!=e.joinedEventsCount&&Object.hasOwnProperty.call(e,"joinedEventsCount")&&t.uint32(24).int64(e.joinedEventsCount),null!=e.unjoinedEventsCount&&Object.hasOwnProperty.call(e,"unjoinedEventsCount")&&t.uint32(32).int64(e.unjoinedEventsCount),t},ee.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ee.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.errorSamples&&o.errorSamples.length||(o.errorSamples=[]),o.errorSamples.push(p.google.rpc.Status.decode(e,e.uint32()));break;case 2:o.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(e,e.uint32());break;case 3:o.joinedEventsCount=e.int64();break;case 4:o.unjoinedEventsCount=e.int64();break;default:e.skipType(7&r)}}return o},ee.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ee.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.errorSamples&&e.hasOwnProperty("errorSamples")){if(!Array.isArray(e.errorSamples))return"errorSamples: array expected";for(var t=0;t<e.errorSamples.length;++t)if(n=p.google.rpc.Status.verify(e.errorSamples[t]))return"errorSamples."+n}var n;if(null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(n=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(e.errorConfig)))return"errorConfig."+n;return null!=e.joinedEventsCount&&e.hasOwnProperty("joinedEventsCount")&&!(u.isInteger(e.joinedEventsCount)||e.joinedEventsCount&&u.isInteger(e.joinedEventsCount.low)&&u.isInteger(e.joinedEventsCount.high))?"joinedEventsCount: integer|Long expected":null!=e.unjoinedEventsCount&&e.hasOwnProperty("unjoinedEventsCount")&&!(u.isInteger(e.unjoinedEventsCount)||e.unjoinedEventsCount&&u.isInteger(e.unjoinedEventsCount.low)&&u.isInteger(e.unjoinedEventsCount.high))?"unjoinedEventsCount: integer|Long expected":null},ee.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsResponse;if(e.errorSamples){if(!Array.isArray(e.errorSamples))throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorSamples: array expected");t.errorSamples=[];for(var n=0;n<e.errorSamples.length;++n){if("object"!=typeof e.errorSamples[n])throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorSamples: object expected");t.errorSamples[n]=p.google.rpc.Status.fromObject(e.errorSamples[n])}}if(null!=e.errorConfig){if("object"!=typeof e.errorConfig)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsResponse.errorConfig: object expected");t.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(e.errorConfig)}return null!=e.joinedEventsCount&&(u.Long?(t.joinedEventsCount=u.Long.fromValue(e.joinedEventsCount)).unsigned=!1:"string"==typeof e.joinedEventsCount?t.joinedEventsCount=parseInt(e.joinedEventsCount,10):"number"==typeof e.joinedEventsCount?t.joinedEventsCount=e.joinedEventsCount:"object"==typeof e.joinedEventsCount&&(t.joinedEventsCount=new u.LongBits(e.joinedEventsCount.low>>>0,e.joinedEventsCount.high>>>0).toNumber())),null!=e.unjoinedEventsCount&&(u.Long?(t.unjoinedEventsCount=u.Long.fromValue(e.unjoinedEventsCount)).unsigned=!1:"string"==typeof e.unjoinedEventsCount?t.unjoinedEventsCount=parseInt(e.unjoinedEventsCount,10):"number"==typeof e.unjoinedEventsCount?t.unjoinedEventsCount=e.unjoinedEventsCount:"object"==typeof e.unjoinedEventsCount&&(t.unjoinedEventsCount=new u.LongBits(e.unjoinedEventsCount.low>>>0,e.unjoinedEventsCount.high>>>0).toNumber())),t},ee.toObject=function(e,t){var n,o={};if(((t=t||{}).arrays||t.defaults)&&(o.errorSamples=[]),t.defaults&&(o.errorConfig=null,u.Long?(n=new u.Long(0,0,!1),o.joinedEventsCount=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.joinedEventsCount=t.longs===String?"0":0,u.Long?(n=new u.Long(0,0,!1),o.unjoinedEventsCount=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.unjoinedEventsCount=t.longs===String?"0":0),e.errorSamples&&e.errorSamples.length){o.errorSamples=[];for(var r=0;r<e.errorSamples.length;++r)o.errorSamples[r]=p.google.rpc.Status.toObject(e.errorSamples[r],t)}return null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(o.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(e.errorConfig,t)),null!=e.joinedEventsCount&&e.hasOwnProperty("joinedEventsCount")&&("number"==typeof e.joinedEventsCount?o.joinedEventsCount=t.longs===String?String(e.joinedEventsCount):e.joinedEventsCount:o.joinedEventsCount=t.longs===String?u.Long.prototype.toString.call(e.joinedEventsCount):t.longs===Number?new u.LongBits(e.joinedEventsCount.low>>>0,e.joinedEventsCount.high>>>0).toNumber():e.joinedEventsCount),null!=e.unjoinedEventsCount&&e.hasOwnProperty("unjoinedEventsCount")&&("number"==typeof e.unjoinedEventsCount?o.unjoinedEventsCount=t.longs===String?String(e.unjoinedEventsCount):e.unjoinedEventsCount:o.unjoinedEventsCount=t.longs===String?u.Long.prototype.toString.call(e.unjoinedEventsCount):t.longs===Number?new u.LongBits(e.unjoinedEventsCount.low>>>0,e.unjoinedEventsCount.high>>>0).toNumber():e.unjoinedEventsCount),o},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.cloud.discoveryengine.v1beta.ImportUserEventsResponse"},ee),i.ImportUserEventsMetadata=(te.prototype.createTime=null,te.prototype.updateTime=null,te.prototype.successCount=u.Long?u.Long.fromBits(0,0,!1):0,te.prototype.failureCount=u.Long?u.Long.fromBits(0,0,!1):0,te.create=function(e){return new te(e)},te.encode=function(e,t){return t=t||a.create(),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&p.google.protobuf.Timestamp.encode(e.createTime,t.uint32(10).fork()).ldelim(),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&p.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(18).fork()).ldelim(),null!=e.successCount&&Object.hasOwnProperty.call(e,"successCount")&&t.uint32(24).int64(e.successCount),null!=e.failureCount&&Object.hasOwnProperty.call(e,"failureCount")&&t.uint32(32).int64(e.failureCount),t},te.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},te.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.createTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;case 2:o.updateTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;case 3:o.successCount=e.int64();break;case 4:o.failureCount=e.int64();break;default:e.skipType(7&r)}}return o},te.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},te.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t;if(null!=e.createTime&&e.hasOwnProperty("createTime")&&(t=p.google.protobuf.Timestamp.verify(e.createTime)))return"createTime."+t;if(null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(t=p.google.protobuf.Timestamp.verify(e.updateTime)))return"updateTime."+t;return null!=e.successCount&&e.hasOwnProperty("successCount")&&!(u.isInteger(e.successCount)||e.successCount&&u.isInteger(e.successCount.low)&&u.isInteger(e.successCount.high))?"successCount: integer|Long expected":null!=e.failureCount&&e.hasOwnProperty("failureCount")&&!(u.isInteger(e.failureCount)||e.failureCount&&u.isInteger(e.failureCount.low)&&u.isInteger(e.failureCount.high))?"failureCount: integer|Long expected":null},te.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata;if(null!=e.createTime){if("object"!=typeof e.createTime)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.createTime: object expected");t.createTime=p.google.protobuf.Timestamp.fromObject(e.createTime)}if(null!=e.updateTime){if("object"!=typeof e.updateTime)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportUserEventsMetadata.updateTime: object expected");t.updateTime=p.google.protobuf.Timestamp.fromObject(e.updateTime)}return null!=e.successCount&&(u.Long?(t.successCount=u.Long.fromValue(e.successCount)).unsigned=!1:"string"==typeof e.successCount?t.successCount=parseInt(e.successCount,10):"number"==typeof e.successCount?t.successCount=e.successCount:"object"==typeof e.successCount&&(t.successCount=new u.LongBits(e.successCount.low>>>0,e.successCount.high>>>0).toNumber())),null!=e.failureCount&&(u.Long?(t.failureCount=u.Long.fromValue(e.failureCount)).unsigned=!1:"string"==typeof e.failureCount?t.failureCount=parseInt(e.failureCount,10):"number"==typeof e.failureCount?t.failureCount=e.failureCount:"object"==typeof e.failureCount&&(t.failureCount=new u.LongBits(e.failureCount.low>>>0,e.failureCount.high>>>0).toNumber())),t},te.toObject=function(e,t){var n,o={};return(t=t||{}).defaults&&(o.createTime=null,o.updateTime=null,u.Long?(n=new u.Long(0,0,!1),o.successCount=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.successCount=t.longs===String?"0":0,u.Long?(n=new u.Long(0,0,!1),o.failureCount=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.failureCount=t.longs===String?"0":0),null!=e.createTime&&e.hasOwnProperty("createTime")&&(o.createTime=p.google.protobuf.Timestamp.toObject(e.createTime,t)),null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(o.updateTime=p.google.protobuf.Timestamp.toObject(e.updateTime,t)),null!=e.successCount&&e.hasOwnProperty("successCount")&&("number"==typeof e.successCount?o.successCount=t.longs===String?String(e.successCount):e.successCount:o.successCount=t.longs===String?u.Long.prototype.toString.call(e.successCount):t.longs===Number?new u.LongBits(e.successCount.low>>>0,e.successCount.high>>>0).toNumber():e.successCount),null!=e.failureCount&&e.hasOwnProperty("failureCount")&&("number"==typeof e.failureCount?o.failureCount=t.longs===String?String(e.failureCount):e.failureCount:o.failureCount=t.longs===String?u.Long.prototype.toString.call(e.failureCount):t.longs===Number?new u.LongBits(e.failureCount.low>>>0,e.failureCount.high>>>0).toNumber():e.failureCount),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.cloud.discoveryengine.v1beta.ImportUserEventsMetadata"},te),i.ImportDocumentsMetadata=(ne.prototype.createTime=null,ne.prototype.updateTime=null,ne.prototype.successCount=u.Long?u.Long.fromBits(0,0,!1):0,ne.prototype.failureCount=u.Long?u.Long.fromBits(0,0,!1):0,ne.create=function(e){return new ne(e)},ne.encode=function(e,t){return t=t||a.create(),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&p.google.protobuf.Timestamp.encode(e.createTime,t.uint32(10).fork()).ldelim(),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&p.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(18).fork()).ldelim(),null!=e.successCount&&Object.hasOwnProperty.call(e,"successCount")&&t.uint32(24).int64(e.successCount),null!=e.failureCount&&Object.hasOwnProperty.call(e,"failureCount")&&t.uint32(32).int64(e.failureCount),t},ne.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ne.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.createTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;case 2:o.updateTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;case 3:o.successCount=e.int64();break;case 4:o.failureCount=e.int64();break;default:e.skipType(7&r)}}return o},ne.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ne.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t;if(null!=e.createTime&&e.hasOwnProperty("createTime")&&(t=p.google.protobuf.Timestamp.verify(e.createTime)))return"createTime."+t;if(null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(t=p.google.protobuf.Timestamp.verify(e.updateTime)))return"updateTime."+t;return null!=e.successCount&&e.hasOwnProperty("successCount")&&!(u.isInteger(e.successCount)||e.successCount&&u.isInteger(e.successCount.low)&&u.isInteger(e.successCount.high))?"successCount: integer|Long expected":null!=e.failureCount&&e.hasOwnProperty("failureCount")&&!(u.isInteger(e.failureCount)||e.failureCount&&u.isInteger(e.failureCount.low)&&u.isInteger(e.failureCount.high))?"failureCount: integer|Long expected":null},ne.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata;if(null!=e.createTime){if("object"!=typeof e.createTime)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.createTime: object expected");t.createTime=p.google.protobuf.Timestamp.fromObject(e.createTime)}if(null!=e.updateTime){if("object"!=typeof e.updateTime)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsMetadata.updateTime: object expected");t.updateTime=p.google.protobuf.Timestamp.fromObject(e.updateTime)}return null!=e.successCount&&(u.Long?(t.successCount=u.Long.fromValue(e.successCount)).unsigned=!1:"string"==typeof e.successCount?t.successCount=parseInt(e.successCount,10):"number"==typeof e.successCount?t.successCount=e.successCount:"object"==typeof e.successCount&&(t.successCount=new u.LongBits(e.successCount.low>>>0,e.successCount.high>>>0).toNumber())),null!=e.failureCount&&(u.Long?(t.failureCount=u.Long.fromValue(e.failureCount)).unsigned=!1:"string"==typeof e.failureCount?t.failureCount=parseInt(e.failureCount,10):"number"==typeof e.failureCount?t.failureCount=e.failureCount:"object"==typeof e.failureCount&&(t.failureCount=new u.LongBits(e.failureCount.low>>>0,e.failureCount.high>>>0).toNumber())),t},ne.toObject=function(e,t){var n,o={};return(t=t||{}).defaults&&(o.createTime=null,o.updateTime=null,u.Long?(n=new u.Long(0,0,!1),o.successCount=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.successCount=t.longs===String?"0":0,u.Long?(n=new u.Long(0,0,!1),o.failureCount=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.failureCount=t.longs===String?"0":0),null!=e.createTime&&e.hasOwnProperty("createTime")&&(o.createTime=p.google.protobuf.Timestamp.toObject(e.createTime,t)),null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(o.updateTime=p.google.protobuf.Timestamp.toObject(e.updateTime,t)),null!=e.successCount&&e.hasOwnProperty("successCount")&&("number"==typeof e.successCount?o.successCount=t.longs===String?String(e.successCount):e.successCount:o.successCount=t.longs===String?u.Long.prototype.toString.call(e.successCount):t.longs===Number?new u.LongBits(e.successCount.low>>>0,e.successCount.high>>>0).toNumber():e.successCount),null!=e.failureCount&&e.hasOwnProperty("failureCount")&&("number"==typeof e.failureCount?o.failureCount=t.longs===String?String(e.failureCount):e.failureCount:o.failureCount=t.longs===String?u.Long.prototype.toString.call(e.failureCount):t.longs===Number?new u.LongBits(e.failureCount.low>>>0,e.failureCount.high>>>0).toNumber():e.failureCount),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.cloud.discoveryengine.v1beta.ImportDocumentsMetadata"},ne),i.ImportDocumentsRequest=(f.prototype.inlineSource=null,f.prototype.gcsSource=null,f.prototype.bigquerySource=null,f.prototype.parent="",f.prototype.errorConfig=null,f.prototype.reconciliationMode=0,Object.defineProperty(f.prototype,"source",{get:u.oneOfGetter(t=["inlineSource","gcsSource","bigquerySource"]),set:u.oneOfSetter(t)}),f.create=function(e){return new f(e)},f.encode=function(e,t){return t=t||a.create(),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.inlineSource&&Object.hasOwnProperty.call(e,"inlineSource")&&p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.encode(e.inlineSource,t.uint32(18).fork()).ldelim(),null!=e.gcsSource&&Object.hasOwnProperty.call(e,"gcsSource")&&p.google.cloud.discoveryengine.v1beta.GcsSource.encode(e.gcsSource,t.uint32(26).fork()).ldelim(),null!=e.bigquerySource&&Object.hasOwnProperty.call(e,"bigquerySource")&&p.google.cloud.discoveryengine.v1beta.BigQuerySource.encode(e.bigquerySource,t.uint32(34).fork()).ldelim(),null!=e.errorConfig&&Object.hasOwnProperty.call(e,"errorConfig")&&p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(e.errorConfig,t.uint32(42).fork()).ldelim(),null!=e.reconciliationMode&&Object.hasOwnProperty.call(e,"reconciliationMode")&&t.uint32(48).int32(e.reconciliationMode),t},f.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},f.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 2:o.inlineSource=p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.decode(e,e.uint32());break;case 3:o.gcsSource=p.google.cloud.discoveryengine.v1beta.GcsSource.decode(e,e.uint32());break;case 4:o.bigquerySource=p.google.cloud.discoveryengine.v1beta.BigQuerySource.decode(e,e.uint32());break;case 1:o.parent=e.string();break;case 5:o.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(e,e.uint32());break;case 6:o.reconciliationMode=e.int32();break;default:e.skipType(7&r)}}return o},f.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},f.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t,n={};if(null!=e.inlineSource&&e.hasOwnProperty("inlineSource")&&(n.source=1,t=p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.verify(e.inlineSource)))return"inlineSource."+t;if(null!=e.gcsSource&&e.hasOwnProperty("gcsSource")){if(1===n.source)return"source: multiple values";if(n.source=1,t=p.google.cloud.discoveryengine.v1beta.GcsSource.verify(e.gcsSource))return"gcsSource."+t}if(null!=e.bigquerySource&&e.hasOwnProperty("bigquerySource")){if(1===n.source)return"source: multiple values";if(n.source=1,t=p.google.cloud.discoveryengine.v1beta.BigQuerySource.verify(e.bigquerySource))return"bigquerySource."+t}if(null!=e.parent&&e.hasOwnProperty("parent")&&!u.isString(e.parent))return"parent: string expected";if(null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(t=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(e.errorConfig)))return"errorConfig."+t;if(null!=e.reconciliationMode&&e.hasOwnProperty("reconciliationMode"))switch(e.reconciliationMode){default:return"reconciliationMode: enum value expected";case 0:case 1:case 2:}return null},f.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest;if(null!=e.inlineSource){if("object"!=typeof e.inlineSource)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.inlineSource: object expected");t.inlineSource=p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.fromObject(e.inlineSource)}if(null!=e.gcsSource){if("object"!=typeof e.gcsSource)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.gcsSource: object expected");t.gcsSource=p.google.cloud.discoveryengine.v1beta.GcsSource.fromObject(e.gcsSource)}if(null!=e.bigquerySource){if("object"!=typeof e.bigquerySource)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.bigquerySource: object expected");t.bigquerySource=p.google.cloud.discoveryengine.v1beta.BigQuerySource.fromObject(e.bigquerySource)}if(null!=e.parent&&(t.parent=String(e.parent)),null!=e.errorConfig){if("object"!=typeof e.errorConfig)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.errorConfig: object expected");t.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(e.errorConfig)}switch(e.reconciliationMode){default:"number"==typeof e.reconciliationMode&&(t.reconciliationMode=e.reconciliationMode);break;case"RECONCILIATION_MODE_UNSPECIFIED":case 0:t.reconciliationMode=0;break;case"INCREMENTAL":case 1:t.reconciliationMode=1;break;case"FULL":case 2:t.reconciliationMode=2}return t},f.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.parent="",n.errorConfig=null,n.reconciliationMode=t.enums===String?"RECONCILIATION_MODE_UNSPECIFIED":0),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=e.parent),null!=e.inlineSource&&e.hasOwnProperty("inlineSource")&&(n.inlineSource=p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.toObject(e.inlineSource,t),t.oneofs)&&(n.source="inlineSource"),null!=e.gcsSource&&e.hasOwnProperty("gcsSource")&&(n.gcsSource=p.google.cloud.discoveryengine.v1beta.GcsSource.toObject(e.gcsSource,t),t.oneofs)&&(n.source="gcsSource"),null!=e.bigquerySource&&e.hasOwnProperty("bigquerySource")&&(n.bigquerySource=p.google.cloud.discoveryengine.v1beta.BigQuerySource.toObject(e.bigquerySource,t),t.oneofs)&&(n.source="bigquerySource"),null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(n.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(e.errorConfig,t)),null!=e.reconciliationMode&&e.hasOwnProperty("reconciliationMode")&&(n.reconciliationMode=t.enums!==String||void 0===p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode[e.reconciliationMode]?e.reconciliationMode:p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.ReconciliationMode[e.reconciliationMode]),n},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.cloud.discoveryengine.v1beta.ImportDocumentsRequest"},f.InlineSource=(oe.prototype.documents=u.emptyArray,oe.create=function(e){return new oe(e)},oe.encode=function(e,t){if(t=t||a.create(),null!=e.documents&&e.documents.length)for(var n=0;n<e.documents.length;++n)p.google.cloud.discoveryengine.v1beta.Document.encode(e.documents[n],t.uint32(10).fork()).ldelim();return t},oe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},oe.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource;e.pos<n;){var r=e.uint32();r>>>3==1?(o.documents&&o.documents.length||(o.documents=[]),o.documents.push(p.google.cloud.discoveryengine.v1beta.Document.decode(e,e.uint32()))):e.skipType(7&r)}return o},oe.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},oe.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.documents&&e.hasOwnProperty("documents")){if(!Array.isArray(e.documents))return"documents: array expected";for(var t=0;t<e.documents.length;++t){var n=p.google.cloud.discoveryengine.v1beta.Document.verify(e.documents[t]);if(n)return"documents."+n}}return null},oe.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource;if(e.documents){if(!Array.isArray(e.documents))throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.documents: array expected");t.documents=[];for(var n=0;n<e.documents.length;++n){if("object"!=typeof e.documents[n])throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource.documents: object expected");t.documents[n]=p.google.cloud.discoveryengine.v1beta.Document.fromObject(e.documents[n])}}return t},oe.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.documents=[]),e.documents&&e.documents.length){n.documents=[];for(var o=0;o<e.documents.length;++o)n.documents[o]=p.google.cloud.discoveryengine.v1beta.Document.toObject(e.documents[o],t)}return n},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.cloud.discoveryengine.v1beta.ImportDocumentsRequest.InlineSource"},oe),f.ReconciliationMode=(t={},(n=Object.create(t))[t[0]="RECONCILIATION_MODE_UNSPECIFIED"]=0,n[t[1]="INCREMENTAL"]=1,n[t[2]="FULL"]=2,n),f),i.ImportDocumentsResponse=(re.prototype.errorSamples=u.emptyArray,re.prototype.errorConfig=null,re.create=function(e){return new re(e)},re.encode=function(e,t){if(t=t||a.create(),null!=e.errorSamples&&e.errorSamples.length)for(var n=0;n<e.errorSamples.length;++n)p.google.rpc.Status.encode(e.errorSamples[n],t.uint32(10).fork()).ldelim();return null!=e.errorConfig&&Object.hasOwnProperty.call(e,"errorConfig")&&p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.encode(e.errorConfig,t.uint32(18).fork()).ldelim(),t},re.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},re.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.errorSamples&&o.errorSamples.length||(o.errorSamples=[]),o.errorSamples.push(p.google.rpc.Status.decode(e,e.uint32()));break;case 2:o.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},re.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},re.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.errorSamples&&e.hasOwnProperty("errorSamples")){if(!Array.isArray(e.errorSamples))return"errorSamples: array expected";for(var t=0;t<e.errorSamples.length;++t)if(n=p.google.rpc.Status.verify(e.errorSamples[t]))return"errorSamples."+n}var n;if(null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(n=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.verify(e.errorConfig)))return"errorConfig."+n;return null},re.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse)return e;var t=new p.google.cloud.discoveryengine.v1beta.ImportDocumentsResponse;if(e.errorSamples){if(!Array.isArray(e.errorSamples))throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorSamples: array expected");t.errorSamples=[];for(var n=0;n<e.errorSamples.length;++n){if("object"!=typeof e.errorSamples[n])throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorSamples: object expected");t.errorSamples[n]=p.google.rpc.Status.fromObject(e.errorSamples[n])}}if(null!=e.errorConfig){if("object"!=typeof e.errorConfig)throw TypeError(".google.cloud.discoveryengine.v1beta.ImportDocumentsResponse.errorConfig: object expected");t.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.fromObject(e.errorConfig)}return t},re.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.errorSamples=[]),t.defaults&&(n.errorConfig=null),e.errorSamples&&e.errorSamples.length){n.errorSamples=[];for(var o=0;o<e.errorSamples.length;++o)n.errorSamples[o]=p.google.rpc.Status.toObject(e.errorSamples[o],t)}return null!=e.errorConfig&&e.hasOwnProperty("errorConfig")&&(n.errorConfig=p.google.cloud.discoveryengine.v1beta.ImportErrorConfig.toObject(e.errorConfig,t)),n},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.cloud.discoveryengine.v1beta.ImportDocumentsResponse"},re),i.UserEvent=(y.prototype.eventType="",y.prototype.userPseudoId="",y.prototype.eventTime=null,y.prototype.userInfo=null,y.prototype.directUserRequest=!1,y.prototype.sessionId="",y.prototype.pageInfo=null,y.prototype.attributionToken="",y.prototype.filter="",y.prototype.documents=u.emptyArray,y.prototype.panel=null,y.prototype.searchInfo=null,y.prototype.completionInfo=null,y.prototype.transactionInfo=null,y.prototype.tagIds=u.emptyArray,y.prototype.promotionIds=u.emptyArray,y.prototype.attributes=u.emptyObject,y.prototype.mediaInfo=null,y.create=function(e){return new y(e)},y.encode=function(e,t){if(t=t||a.create(),null!=e.eventType&&Object.hasOwnProperty.call(e,"eventType")&&t.uint32(10).string(e.eventType),null!=e.userPseudoId&&Object.hasOwnProperty.call(e,"userPseudoId")&&t.uint32(18).string(e.userPseudoId),null!=e.eventTime&&Object.hasOwnProperty.call(e,"eventTime")&&p.google.protobuf.Timestamp.encode(e.eventTime,t.uint32(26).fork()).ldelim(),null!=e.userInfo&&Object.hasOwnProperty.call(e,"userInfo")&&p.google.cloud.discoveryengine.v1beta.UserInfo.encode(e.userInfo,t.uint32(34).fork()).ldelim(),null!=e.directUserRequest&&Object.hasOwnProperty.call(e,"directUserRequest")&&t.uint32(40).bool(e.directUserRequest),null!=e.sessionId&&Object.hasOwnProperty.call(e,"sessionId")&&t.uint32(50).string(e.sessionId),null!=e.pageInfo&&Object.hasOwnProperty.call(e,"pageInfo")&&p.google.cloud.discoveryengine.v1beta.PageInfo.encode(e.pageInfo,t.uint32(58).fork()).ldelim(),null!=e.attributionToken&&Object.hasOwnProperty.call(e,"attributionToken")&&t.uint32(66).string(e.attributionToken),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&t.uint32(74).string(e.filter),null!=e.documents&&e.documents.length)for(var n=0;n<e.documents.length;++n)p.google.cloud.discoveryengine.v1beta.DocumentInfo.encode(e.documents[n],t.uint32(82).fork()).ldelim();if(null!=e.panel&&Object.hasOwnProperty.call(e,"panel")&&p.google.cloud.discoveryengine.v1beta.PanelInfo.encode(e.panel,t.uint32(90).fork()).ldelim(),null!=e.searchInfo&&Object.hasOwnProperty.call(e,"searchInfo")&&p.google.cloud.discoveryengine.v1beta.SearchInfo.encode(e.searchInfo,t.uint32(98).fork()).ldelim(),null!=e.completionInfo&&Object.hasOwnProperty.call(e,"completionInfo")&&p.google.cloud.discoveryengine.v1beta.CompletionInfo.encode(e.completionInfo,t.uint32(106).fork()).ldelim(),null!=e.transactionInfo&&Object.hasOwnProperty.call(e,"transactionInfo")&&p.google.cloud.discoveryengine.v1beta.TransactionInfo.encode(e.transactionInfo,t.uint32(114).fork()).ldelim(),null!=e.tagIds&&e.tagIds.length)for(n=0;n<e.tagIds.length;++n)t.uint32(122).string(e.tagIds[n]);if(null!=e.promotionIds&&e.promotionIds.length)for(n=0;n<e.promotionIds.length;++n)t.uint32(130).string(e.promotionIds[n]);if(null!=e.attributes&&Object.hasOwnProperty.call(e,"attributes"))for(var o=Object.keys(e.attributes),n=0;n<o.length;++n)t.uint32(138).fork().uint32(10).string(o[n]),p.google.cloud.discoveryengine.v1beta.CustomAttribute.encode(e.attributes[o[n]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.mediaInfo&&Object.hasOwnProperty.call(e,"mediaInfo")&&p.google.cloud.discoveryengine.v1beta.MediaInfo.encode(e.mediaInfo,t.uint32(146).fork()).ldelim(),t},y.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},y.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.UserEvent;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.eventType=e.string();break;case 2:o.userPseudoId=e.string();break;case 3:o.eventTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;case 4:o.userInfo=p.google.cloud.discoveryengine.v1beta.UserInfo.decode(e,e.uint32());break;case 5:o.directUserRequest=e.bool();break;case 6:o.sessionId=e.string();break;case 7:o.pageInfo=p.google.cloud.discoveryengine.v1beta.PageInfo.decode(e,e.uint32());break;case 8:o.attributionToken=e.string();break;case 9:o.filter=e.string();break;case 10:o.documents&&o.documents.length||(o.documents=[]),o.documents.push(p.google.cloud.discoveryengine.v1beta.DocumentInfo.decode(e,e.uint32()));break;case 11:o.panel=p.google.cloud.discoveryengine.v1beta.PanelInfo.decode(e,e.uint32());break;case 12:o.searchInfo=p.google.cloud.discoveryengine.v1beta.SearchInfo.decode(e,e.uint32());break;case 13:o.completionInfo=p.google.cloud.discoveryengine.v1beta.CompletionInfo.decode(e,e.uint32());break;case 14:o.transactionInfo=p.google.cloud.discoveryengine.v1beta.TransactionInfo.decode(e,e.uint32());break;case 15:o.tagIds&&o.tagIds.length||(o.tagIds=[]),o.tagIds.push(e.string());break;case 16:o.promotionIds&&o.promotionIds.length||(o.promotionIds=[]),o.promotionIds.push(e.string());break;case 17:o.attributes===u.emptyObject&&(o.attributes={});for(var i=e.uint32()+e.pos,a="",l=null;e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:a=e.string();break;case 2:l=p.google.cloud.discoveryengine.v1beta.CustomAttribute.decode(e,e.uint32());break;default:e.skipType(7&s)}}o.attributes[a]=l;break;case 18:o.mediaInfo=p.google.cloud.discoveryengine.v1beta.MediaInfo.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},y.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},y.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.eventType&&e.hasOwnProperty("eventType")&&!u.isString(e.eventType))return"eventType: string expected";if(null!=e.userPseudoId&&e.hasOwnProperty("userPseudoId")&&!u.isString(e.userPseudoId))return"userPseudoId: string expected";if(null!=e.eventTime&&e.hasOwnProperty("eventTime")&&(n=p.google.protobuf.Timestamp.verify(e.eventTime)))return"eventTime."+n;if(null!=e.userInfo&&e.hasOwnProperty("userInfo")&&(n=p.google.cloud.discoveryengine.v1beta.UserInfo.verify(e.userInfo)))return"userInfo."+n;if(null!=e.directUserRequest&&e.hasOwnProperty("directUserRequest")&&"boolean"!=typeof e.directUserRequest)return"directUserRequest: boolean expected";if(null!=e.sessionId&&e.hasOwnProperty("sessionId")&&!u.isString(e.sessionId))return"sessionId: string expected";if(null!=e.pageInfo&&e.hasOwnProperty("pageInfo")&&(n=p.google.cloud.discoveryengine.v1beta.PageInfo.verify(e.pageInfo)))return"pageInfo."+n;if(null!=e.attributionToken&&e.hasOwnProperty("attributionToken")&&!u.isString(e.attributionToken))return"attributionToken: string expected";if(null!=e.filter&&e.hasOwnProperty("filter")&&!u.isString(e.filter))return"filter: string expected";if(null!=e.documents&&e.hasOwnProperty("documents")){if(!Array.isArray(e.documents))return"documents: array expected";for(var t=0;t<e.documents.length;++t)if(n=p.google.cloud.discoveryengine.v1beta.DocumentInfo.verify(e.documents[t]))return"documents."+n}if(null!=e.panel&&e.hasOwnProperty("panel")&&(n=p.google.cloud.discoveryengine.v1beta.PanelInfo.verify(e.panel)))return"panel."+n;if(null!=e.searchInfo&&e.hasOwnProperty("searchInfo")&&(n=p.google.cloud.discoveryengine.v1beta.SearchInfo.verify(e.searchInfo)))return"searchInfo."+n;if(null!=e.completionInfo&&e.hasOwnProperty("completionInfo")&&(n=p.google.cloud.discoveryengine.v1beta.CompletionInfo.verify(e.completionInfo)))return"completionInfo."+n;if(null!=e.transactionInfo&&e.hasOwnProperty("transactionInfo")&&(n=p.google.cloud.discoveryengine.v1beta.TransactionInfo.verify(e.transactionInfo)))return"transactionInfo."+n;if(null!=e.tagIds&&e.hasOwnProperty("tagIds")){if(!Array.isArray(e.tagIds))return"tagIds: array expected";for(t=0;t<e.tagIds.length;++t)if(!u.isString(e.tagIds[t]))return"tagIds: string[] expected"}if(null!=e.promotionIds&&e.hasOwnProperty("promotionIds")){if(!Array.isArray(e.promotionIds))return"promotionIds: array expected";for(t=0;t<e.promotionIds.length;++t)if(!u.isString(e.promotionIds[t]))return"promotionIds: string[] expected"}if(null!=e.attributes&&e.hasOwnProperty("attributes")){if(!u.isObject(e.attributes))return"attributes: object expected";for(var n,o=Object.keys(e.attributes),t=0;t<o.length;++t)if(n=p.google.cloud.discoveryengine.v1beta.CustomAttribute.verify(e.attributes[o[t]]))return"attributes."+n}if(null!=e.mediaInfo&&e.hasOwnProperty("mediaInfo")&&(n=p.google.cloud.discoveryengine.v1beta.MediaInfo.verify(e.mediaInfo)))return"mediaInfo."+n;return null},y.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.UserEvent)return e;var t=new p.google.cloud.discoveryengine.v1beta.UserEvent;if(null!=e.eventType&&(t.eventType=String(e.eventType)),null!=e.userPseudoId&&(t.userPseudoId=String(e.userPseudoId)),null!=e.eventTime){if("object"!=typeof e.eventTime)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.eventTime: object expected");t.eventTime=p.google.protobuf.Timestamp.fromObject(e.eventTime)}if(null!=e.userInfo){if("object"!=typeof e.userInfo)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.userInfo: object expected");t.userInfo=p.google.cloud.discoveryengine.v1beta.UserInfo.fromObject(e.userInfo)}if(null!=e.directUserRequest&&(t.directUserRequest=Boolean(e.directUserRequest)),null!=e.sessionId&&(t.sessionId=String(e.sessionId)),null!=e.pageInfo){if("object"!=typeof e.pageInfo)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.pageInfo: object expected");t.pageInfo=p.google.cloud.discoveryengine.v1beta.PageInfo.fromObject(e.pageInfo)}if(null!=e.attributionToken&&(t.attributionToken=String(e.attributionToken)),null!=e.filter&&(t.filter=String(e.filter)),e.documents){if(!Array.isArray(e.documents))throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.documents: array expected");t.documents=[];for(var n=0;n<e.documents.length;++n){if("object"!=typeof e.documents[n])throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.documents: object expected");t.documents[n]=p.google.cloud.discoveryengine.v1beta.DocumentInfo.fromObject(e.documents[n])}}if(null!=e.panel){if("object"!=typeof e.panel)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.panel: object expected");t.panel=p.google.cloud.discoveryengine.v1beta.PanelInfo.fromObject(e.panel)}if(null!=e.searchInfo){if("object"!=typeof e.searchInfo)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.searchInfo: object expected");t.searchInfo=p.google.cloud.discoveryengine.v1beta.SearchInfo.fromObject(e.searchInfo)}if(null!=e.completionInfo){if("object"!=typeof e.completionInfo)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.completionInfo: object expected");t.completionInfo=p.google.cloud.discoveryengine.v1beta.CompletionInfo.fromObject(e.completionInfo)}if(null!=e.transactionInfo){if("object"!=typeof e.transactionInfo)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.transactionInfo: object expected");t.transactionInfo=p.google.cloud.discoveryengine.v1beta.TransactionInfo.fromObject(e.transactionInfo)}if(e.tagIds){if(!Array.isArray(e.tagIds))throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.tagIds: array expected");t.tagIds=[];for(n=0;n<e.tagIds.length;++n)t.tagIds[n]=String(e.tagIds[n])}if(e.promotionIds){if(!Array.isArray(e.promotionIds))throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.promotionIds: array expected");t.promotionIds=[];for(n=0;n<e.promotionIds.length;++n)t.promotionIds[n]=String(e.promotionIds[n])}if(e.attributes){if("object"!=typeof e.attributes)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.attributes: object expected");t.attributes={};for(var o=Object.keys(e.attributes),n=0;n<o.length;++n){if("object"!=typeof e.attributes[o[n]])throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.attributes: object expected");t.attributes[o[n]]=p.google.cloud.discoveryengine.v1beta.CustomAttribute.fromObject(e.attributes[o[n]])}}if(null!=e.mediaInfo){if("object"!=typeof e.mediaInfo)throw TypeError(".google.cloud.discoveryengine.v1beta.UserEvent.mediaInfo: object expected");t.mediaInfo=p.google.cloud.discoveryengine.v1beta.MediaInfo.fromObject(e.mediaInfo)}return t},y.toObject=function(e,t){var n,o={};if(((t=t||{}).arrays||t.defaults)&&(o.documents=[],o.tagIds=[],o.promotionIds=[]),(t.objects||t.defaults)&&(o.attributes={}),t.defaults&&(o.eventType="",o.userPseudoId="",o.eventTime=null,o.userInfo=null,o.directUserRequest=!1,o.sessionId="",o.pageInfo=null,o.attributionToken="",o.filter="",o.panel=null,o.searchInfo=null,o.completionInfo=null,o.transactionInfo=null,o.mediaInfo=null),null!=e.eventType&&e.hasOwnProperty("eventType")&&(o.eventType=e.eventType),null!=e.userPseudoId&&e.hasOwnProperty("userPseudoId")&&(o.userPseudoId=e.userPseudoId),null!=e.eventTime&&e.hasOwnProperty("eventTime")&&(o.eventTime=p.google.protobuf.Timestamp.toObject(e.eventTime,t)),null!=e.userInfo&&e.hasOwnProperty("userInfo")&&(o.userInfo=p.google.cloud.discoveryengine.v1beta.UserInfo.toObject(e.userInfo,t)),null!=e.directUserRequest&&e.hasOwnProperty("directUserRequest")&&(o.directUserRequest=e.directUserRequest),null!=e.sessionId&&e.hasOwnProperty("sessionId")&&(o.sessionId=e.sessionId),null!=e.pageInfo&&e.hasOwnProperty("pageInfo")&&(o.pageInfo=p.google.cloud.discoveryengine.v1beta.PageInfo.toObject(e.pageInfo,t)),null!=e.attributionToken&&e.hasOwnProperty("attributionToken")&&(o.attributionToken=e.attributionToken),null!=e.filter&&e.hasOwnProperty("filter")&&(o.filter=e.filter),e.documents&&e.documents.length){o.documents=[];for(var r=0;r<e.documents.length;++r)o.documents[r]=p.google.cloud.discoveryengine.v1beta.DocumentInfo.toObject(e.documents[r],t)}if(null!=e.panel&&e.hasOwnProperty("panel")&&(o.panel=p.google.cloud.discoveryengine.v1beta.PanelInfo.toObject(e.panel,t)),null!=e.searchInfo&&e.hasOwnProperty("searchInfo")&&(o.searchInfo=p.google.cloud.discoveryengine.v1beta.SearchInfo.toObject(e.searchInfo,t)),null!=e.completionInfo&&e.hasOwnProperty("completionInfo")&&(o.completionInfo=p.google.cloud.discoveryengine.v1beta.CompletionInfo.toObject(e.completionInfo,t)),null!=e.transactionInfo&&e.hasOwnProperty("transactionInfo")&&(o.transactionInfo=p.google.cloud.discoveryengine.v1beta.TransactionInfo.toObject(e.transactionInfo,t)),e.tagIds&&e.tagIds.length){o.tagIds=[];for(r=0;r<e.tagIds.length;++r)o.tagIds[r]=e.tagIds[r]}if(e.promotionIds&&e.promotionIds.length){o.promotionIds=[];for(r=0;r<e.promotionIds.length;++r)o.promotionIds[r]=e.promotionIds[r]}if(e.attributes&&(n=Object.keys(e.attributes)).length){o.attributes={};for(r=0;r<n.length;++r)o.attributes[n[r]]=p.google.cloud.discoveryengine.v1beta.CustomAttribute.toObject(e.attributes[n[r]],t)}return null!=e.mediaInfo&&e.hasOwnProperty("mediaInfo")&&(o.mediaInfo=p.google.cloud.discoveryengine.v1beta.MediaInfo.toObject(e.mediaInfo,t)),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.cloud.discoveryengine.v1beta.UserEvent"},y),i.PageInfo=(ie.prototype.pageviewId="",ie.prototype.pageCategory="",ie.prototype.uri="",ie.prototype.referrerUri="",ie.create=function(e){return new ie(e)},ie.encode=function(e,t){return t=t||a.create(),null!=e.pageviewId&&Object.hasOwnProperty.call(e,"pageviewId")&&t.uint32(10).string(e.pageviewId),null!=e.pageCategory&&Object.hasOwnProperty.call(e,"pageCategory")&&t.uint32(18).string(e.pageCategory),null!=e.uri&&Object.hasOwnProperty.call(e,"uri")&&t.uint32(26).string(e.uri),null!=e.referrerUri&&Object.hasOwnProperty.call(e,"referrerUri")&&t.uint32(34).string(e.referrerUri),t},ie.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ie.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.PageInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.pageviewId=e.string();break;case 2:o.pageCategory=e.string();break;case 3:o.uri=e.string();break;case 4:o.referrerUri=e.string();break;default:e.skipType(7&r)}}return o},ie.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ie.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.pageviewId&&e.hasOwnProperty("pageviewId")&&!u.isString(e.pageviewId)?"pageviewId: string expected":null!=e.pageCategory&&e.hasOwnProperty("pageCategory")&&!u.isString(e.pageCategory)?"pageCategory: string expected":null!=e.uri&&e.hasOwnProperty("uri")&&!u.isString(e.uri)?"uri: string expected":null!=e.referrerUri&&e.hasOwnProperty("referrerUri")&&!u.isString(e.referrerUri)?"referrerUri: string expected":null},ie.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.PageInfo?e:(t=new p.google.cloud.discoveryengine.v1beta.PageInfo,null!=e.pageviewId&&(t.pageviewId=String(e.pageviewId)),null!=e.pageCategory&&(t.pageCategory=String(e.pageCategory)),null!=e.uri&&(t.uri=String(e.uri)),null!=e.referrerUri&&(t.referrerUri=String(e.referrerUri)),t)},ie.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.pageviewId="",n.pageCategory="",n.uri="",n.referrerUri=""),null!=e.pageviewId&&e.hasOwnProperty("pageviewId")&&(n.pageviewId=e.pageviewId),null!=e.pageCategory&&e.hasOwnProperty("pageCategory")&&(n.pageCategory=e.pageCategory),null!=e.uri&&e.hasOwnProperty("uri")&&(n.uri=e.uri),null!=e.referrerUri&&e.hasOwnProperty("referrerUri")&&(n.referrerUri=e.referrerUri),n},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.cloud.discoveryengine.v1beta.PageInfo"},ie),i.SearchInfo=(ae.prototype.searchQuery="",ae.prototype.orderBy="",ae.prototype.offset=null,Object.defineProperty(ae.prototype,"_offset",{get:u.oneOfGetter(t=["offset"]),set:u.oneOfSetter(t)}),ae.create=function(e){return new ae(e)},ae.encode=function(e,t){return t=t||a.create(),null!=e.searchQuery&&Object.hasOwnProperty.call(e,"searchQuery")&&t.uint32(10).string(e.searchQuery),null!=e.orderBy&&Object.hasOwnProperty.call(e,"orderBy")&&t.uint32(18).string(e.orderBy),null!=e.offset&&Object.hasOwnProperty.call(e,"offset")&&t.uint32(24).int32(e.offset),t},ae.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ae.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.searchQuery=e.string();break;case 2:o.orderBy=e.string();break;case 3:o.offset=e.int32();break;default:e.skipType(7&r)}}return o},ae.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ae.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.searchQuery&&e.hasOwnProperty("searchQuery")&&!u.isString(e.searchQuery)?"searchQuery: string expected":null!=e.orderBy&&e.hasOwnProperty("orderBy")&&!u.isString(e.orderBy)?"orderBy: string expected":null!=e.offset&&e.hasOwnProperty("offset")&&!u.isInteger(e.offset)?"offset: integer expected":null},ae.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.SearchInfo?e:(t=new p.google.cloud.discoveryengine.v1beta.SearchInfo,null!=e.searchQuery&&(t.searchQuery=String(e.searchQuery)),null!=e.orderBy&&(t.orderBy=String(e.orderBy)),null!=e.offset&&(t.offset=0|e.offset),t)},ae.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.searchQuery="",n.orderBy=""),null!=e.searchQuery&&e.hasOwnProperty("searchQuery")&&(n.searchQuery=e.searchQuery),null!=e.orderBy&&e.hasOwnProperty("orderBy")&&(n.orderBy=e.orderBy),null!=e.offset&&e.hasOwnProperty("offset")&&(n.offset=e.offset,t.oneofs)&&(n._offset="offset"),n},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.cloud.discoveryengine.v1beta.SearchInfo"},ae),i.CompletionInfo=(le.prototype.selectedSuggestion="",le.prototype.selectedPosition=0,le.create=function(e){return new le(e)},le.encode=function(e,t){return t=t||a.create(),null!=e.selectedSuggestion&&Object.hasOwnProperty.call(e,"selectedSuggestion")&&t.uint32(10).string(e.selectedSuggestion),null!=e.selectedPosition&&Object.hasOwnProperty.call(e,"selectedPosition")&&t.uint32(16).int32(e.selectedPosition),t},le.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},le.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.CompletionInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.selectedSuggestion=e.string();break;case 2:o.selectedPosition=e.int32();break;default:e.skipType(7&r)}}return o},le.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},le.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.selectedSuggestion&&e.hasOwnProperty("selectedSuggestion")&&!u.isString(e.selectedSuggestion)?"selectedSuggestion: string expected":null!=e.selectedPosition&&e.hasOwnProperty("selectedPosition")&&!u.isInteger(e.selectedPosition)?"selectedPosition: integer expected":null},le.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.CompletionInfo?e:(t=new p.google.cloud.discoveryengine.v1beta.CompletionInfo,null!=e.selectedSuggestion&&(t.selectedSuggestion=String(e.selectedSuggestion)),null!=e.selectedPosition&&(t.selectedPosition=0|e.selectedPosition),t)},le.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.selectedSuggestion="",n.selectedPosition=0),null!=e.selectedSuggestion&&e.hasOwnProperty("selectedSuggestion")&&(n.selectedSuggestion=e.selectedSuggestion),null!=e.selectedPosition&&e.hasOwnProperty("selectedPosition")&&(n.selectedPosition=e.selectedPosition),n},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.cloud.discoveryengine.v1beta.CompletionInfo"},le),i.TransactionInfo=(m.prototype.value=null,m.prototype.currency="",m.prototype.transactionId="",m.prototype.tax=null,m.prototype.cost=null,m.prototype.discountValue=null,Object.defineProperty(m.prototype,"_value",{get:u.oneOfGetter(n=["value"]),set:u.oneOfSetter(n)}),Object.defineProperty(m.prototype,"_tax",{get:u.oneOfGetter(n=["tax"]),set:u.oneOfSetter(n)}),Object.defineProperty(m.prototype,"_cost",{get:u.oneOfGetter(n=["cost"]),set:u.oneOfSetter(n)}),Object.defineProperty(m.prototype,"_discountValue",{get:u.oneOfGetter(n=["discountValue"]),set:u.oneOfSetter(n)}),m.create=function(e){return new m(e)},m.encode=function(e,t){return t=t||a.create(),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(13).float(e.value),null!=e.currency&&Object.hasOwnProperty.call(e,"currency")&&t.uint32(18).string(e.currency),null!=e.transactionId&&Object.hasOwnProperty.call(e,"transactionId")&&t.uint32(26).string(e.transactionId),null!=e.tax&&Object.hasOwnProperty.call(e,"tax")&&t.uint32(37).float(e.tax),null!=e.cost&&Object.hasOwnProperty.call(e,"cost")&&t.uint32(45).float(e.cost),null!=e.discountValue&&Object.hasOwnProperty.call(e,"discountValue")&&t.uint32(53).float(e.discountValue),t},m.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},m.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.TransactionInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.value=e.float();break;case 2:o.currency=e.string();break;case 3:o.transactionId=e.string();break;case 4:o.tax=e.float();break;case 5:o.cost=e.float();break;case 6:o.discountValue=e.float();break;default:e.skipType(7&r)}}return o},m.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},m.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.value&&e.hasOwnProperty("value")&&"number"!=typeof e.value?"value: number expected":null!=e.currency&&e.hasOwnProperty("currency")&&!u.isString(e.currency)?"currency: string expected":null!=e.transactionId&&e.hasOwnProperty("transactionId")&&!u.isString(e.transactionId)?"transactionId: string expected":null!=e.tax&&e.hasOwnProperty("tax")&&"number"!=typeof e.tax?"tax: number expected":null!=e.cost&&e.hasOwnProperty("cost")&&"number"!=typeof e.cost?"cost: number expected":null!=e.discountValue&&e.hasOwnProperty("discountValue")&&"number"!=typeof e.discountValue?"discountValue: number expected":null},m.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.TransactionInfo?e:(t=new p.google.cloud.discoveryengine.v1beta.TransactionInfo,null!=e.value&&(t.value=Number(e.value)),null!=e.currency&&(t.currency=String(e.currency)),null!=e.transactionId&&(t.transactionId=String(e.transactionId)),null!=e.tax&&(t.tax=Number(e.tax)),null!=e.cost&&(t.cost=Number(e.cost)),null!=e.discountValue&&(t.discountValue=Number(e.discountValue)),t)},m.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.currency="",n.transactionId=""),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.json&&!isFinite(e.value)?String(e.value):e.value,t.oneofs)&&(n._value="value"),null!=e.currency&&e.hasOwnProperty("currency")&&(n.currency=e.currency),null!=e.transactionId&&e.hasOwnProperty("transactionId")&&(n.transactionId=e.transactionId),null!=e.tax&&e.hasOwnProperty("tax")&&(n.tax=t.json&&!isFinite(e.tax)?String(e.tax):e.tax,t.oneofs)&&(n._tax="tax"),null!=e.cost&&e.hasOwnProperty("cost")&&(n.cost=t.json&&!isFinite(e.cost)?String(e.cost):e.cost,t.oneofs)&&(n._cost="cost"),null!=e.discountValue&&e.hasOwnProperty("discountValue")&&(n.discountValue=t.json&&!isFinite(e.discountValue)?String(e.discountValue):e.discountValue,t.oneofs)&&(n._discountValue="discountValue"),n},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.cloud.discoveryengine.v1beta.TransactionInfo"},m),i.DocumentInfo=(b.prototype.id=null,b.prototype.name=null,b.prototype.quantity=null,b.prototype.promotionIds=u.emptyArray,Object.defineProperty(b.prototype,"documentDescriptor",{get:u.oneOfGetter(t=["id","name"]),set:u.oneOfSetter(t)}),Object.defineProperty(b.prototype,"_quantity",{get:u.oneOfGetter(t=["quantity"]),set:u.oneOfSetter(t)}),b.create=function(e){return new b(e)},b.encode=function(e,t){if(t=t||a.create(),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(18).string(e.name),null!=e.quantity&&Object.hasOwnProperty.call(e,"quantity")&&t.uint32(24).int32(e.quantity),null!=e.promotionIds&&e.promotionIds.length)for(var n=0;n<e.promotionIds.length;++n)t.uint32(34).string(e.promotionIds[n]);return t},b.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},b.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.DocumentInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.id=e.string();break;case 2:o.name=e.string();break;case 3:o.quantity=e.int32();break;case 4:o.promotionIds&&o.promotionIds.length||(o.promotionIds=[]),o.promotionIds.push(e.string());break;default:e.skipType(7&r)}}return o},b.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},b.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.id&&e.hasOwnProperty("id")&&(t.documentDescriptor=1,!u.isString(e.id)))return"id: string expected";if(null!=e.name&&e.hasOwnProperty("name")){if(1===t.documentDescriptor)return"documentDescriptor: multiple values";if(t.documentDescriptor=1,!u.isString(e.name))return"name: string expected"}if(null!=e.quantity&&e.hasOwnProperty("quantity")&&(t._quantity=1,!u.isInteger(e.quantity)))return"quantity: integer expected";if(null!=e.promotionIds&&e.hasOwnProperty("promotionIds")){if(!Array.isArray(e.promotionIds))return"promotionIds: array expected";for(var n=0;n<e.promotionIds.length;++n)if(!u.isString(e.promotionIds[n]))return"promotionIds: string[] expected"}return null},b.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.DocumentInfo)return e;var t=new p.google.cloud.discoveryengine.v1beta.DocumentInfo;if(null!=e.id&&(t.id=String(e.id)),null!=e.name&&(t.name=String(e.name)),null!=e.quantity&&(t.quantity=0|e.quantity),e.promotionIds){if(!Array.isArray(e.promotionIds))throw TypeError(".google.cloud.discoveryengine.v1beta.DocumentInfo.promotionIds: array expected");t.promotionIds=[];for(var n=0;n<e.promotionIds.length;++n)t.promotionIds[n]=String(e.promotionIds[n])}return t},b.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.promotionIds=[]),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id,t.oneofs)&&(n.documentDescriptor="id"),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name,t.oneofs)&&(n.documentDescriptor="name"),null!=e.quantity&&e.hasOwnProperty("quantity")&&(n.quantity=e.quantity,t.oneofs)&&(n._quantity="quantity"),e.promotionIds&&e.promotionIds.length){n.promotionIds=[];for(var o=0;o<e.promotionIds.length;++o)n.promotionIds[o]=e.promotionIds[o]}return n},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.cloud.discoveryengine.v1beta.DocumentInfo"},b),i.PanelInfo=(h.prototype.panelId="",h.prototype.displayName="",h.prototype.panelPosition=null,h.prototype.totalPanels=null,Object.defineProperty(h.prototype,"_panelPosition",{get:u.oneOfGetter(n=["panelPosition"]),set:u.oneOfSetter(n)}),Object.defineProperty(h.prototype,"_totalPanels",{get:u.oneOfGetter(n=["totalPanels"]),set:u.oneOfSetter(n)}),h.create=function(e){return new h(e)},h.encode=function(e,t){return t=t||a.create(),null!=e.panelId&&Object.hasOwnProperty.call(e,"panelId")&&t.uint32(18).string(e.panelId),null!=e.displayName&&Object.hasOwnProperty.call(e,"displayName")&&t.uint32(26).string(e.displayName),null!=e.panelPosition&&Object.hasOwnProperty.call(e,"panelPosition")&&t.uint32(32).int32(e.panelPosition),null!=e.totalPanels&&Object.hasOwnProperty.call(e,"totalPanels")&&t.uint32(40).int32(e.totalPanels),t},h.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},h.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.PanelInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 2:o.panelId=e.string();break;case 3:o.displayName=e.string();break;case 4:o.panelPosition=e.int32();break;case 5:o.totalPanels=e.int32();break;default:e.skipType(7&r)}}return o},h.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},h.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.panelId&&e.hasOwnProperty("panelId")&&!u.isString(e.panelId)?"panelId: string expected":null!=e.displayName&&e.hasOwnProperty("displayName")&&!u.isString(e.displayName)?"displayName: string expected":null!=e.panelPosition&&e.hasOwnProperty("panelPosition")&&!u.isInteger(e.panelPosition)?"panelPosition: integer expected":null!=e.totalPanels&&e.hasOwnProperty("totalPanels")&&!u.isInteger(e.totalPanels)?"totalPanels: integer expected":null},h.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.PanelInfo?e:(t=new p.google.cloud.discoveryengine.v1beta.PanelInfo,null!=e.panelId&&(t.panelId=String(e.panelId)),null!=e.displayName&&(t.displayName=String(e.displayName)),null!=e.panelPosition&&(t.panelPosition=0|e.panelPosition),null!=e.totalPanels&&(t.totalPanels=0|e.totalPanels),t)},h.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.panelId="",n.displayName=""),null!=e.panelId&&e.hasOwnProperty("panelId")&&(n.panelId=e.panelId),null!=e.displayName&&e.hasOwnProperty("displayName")&&(n.displayName=e.displayName),null!=e.panelPosition&&e.hasOwnProperty("panelPosition")&&(n.panelPosition=e.panelPosition,t.oneofs)&&(n._panelPosition="panelPosition"),null!=e.totalPanels&&e.hasOwnProperty("totalPanels")&&(n.totalPanels=e.totalPanels,t.oneofs)&&(n._totalPanels="totalPanels"),n},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.cloud.discoveryengine.v1beta.PanelInfo"},h),i.MediaInfo=(se.prototype.mediaProgressDuration=null,se.prototype.mediaProgressPercentage=null,Object.defineProperty(se.prototype,"_mediaProgressPercentage",{get:u.oneOfGetter(t=["mediaProgressPercentage"]),set:u.oneOfSetter(t)}),se.create=function(e){return new se(e)},se.encode=function(e,t){return t=t||a.create(),null!=e.mediaProgressDuration&&Object.hasOwnProperty.call(e,"mediaProgressDuration")&&p.google.protobuf.Duration.encode(e.mediaProgressDuration,t.uint32(10).fork()).ldelim(),null!=e.mediaProgressPercentage&&Object.hasOwnProperty.call(e,"mediaProgressPercentage")&&t.uint32(21).float(e.mediaProgressPercentage),t},se.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},se.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.MediaInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.mediaProgressDuration=p.google.protobuf.Duration.decode(e,e.uint32());break;case 2:o.mediaProgressPercentage=e.float();break;default:e.skipType(7&r)}}return o},se.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},se.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.mediaProgressDuration&&e.hasOwnProperty("mediaProgressDuration")){var t=p.google.protobuf.Duration.verify(e.mediaProgressDuration);if(t)return"mediaProgressDuration."+t}return null!=e.mediaProgressPercentage&&e.hasOwnProperty("mediaProgressPercentage")&&"number"!=typeof e.mediaProgressPercentage?"mediaProgressPercentage: number expected":null},se.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.MediaInfo)return e;var t=new p.google.cloud.discoveryengine.v1beta.MediaInfo;if(null!=e.mediaProgressDuration){if("object"!=typeof e.mediaProgressDuration)throw TypeError(".google.cloud.discoveryengine.v1beta.MediaInfo.mediaProgressDuration: object expected");t.mediaProgressDuration=p.google.protobuf.Duration.fromObject(e.mediaProgressDuration)}return null!=e.mediaProgressPercentage&&(t.mediaProgressPercentage=Number(e.mediaProgressPercentage)),t},se.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.mediaProgressDuration=null),null!=e.mediaProgressDuration&&e.hasOwnProperty("mediaProgressDuration")&&(n.mediaProgressDuration=p.google.protobuf.Duration.toObject(e.mediaProgressDuration,t)),null!=e.mediaProgressPercentage&&e.hasOwnProperty("mediaProgressPercentage")&&(n.mediaProgressPercentage=t.json&&!isFinite(e.mediaProgressPercentage)?String(e.mediaProgressPercentage):e.mediaProgressPercentage,t.oneofs)&&(n._mediaProgressPercentage="mediaProgressPercentage"),n},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.cloud.discoveryengine.v1beta.MediaInfo"},se),i.RecommendationService=(((ce.prototype=Object.create(o.rpc.Service.prototype)).constructor=ce).create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(ce.prototype.recommend=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.RecommendRequest,p.google.cloud.discoveryengine.v1beta.RecommendResponse,t,n)},"name",{value:"Recommend"}),ce),i.RecommendRequest=(v.prototype.servingConfig="",v.prototype.userEvent=null,v.prototype.pageSize=0,v.prototype.filter="",v.prototype.validateOnly=!1,v.prototype.params=u.emptyObject,v.prototype.userLabels=u.emptyObject,v.create=function(e){return new v(e)},v.encode=function(e,t){if(t=t||a.create(),null!=e.servingConfig&&Object.hasOwnProperty.call(e,"servingConfig")&&t.uint32(10).string(e.servingConfig),null!=e.userEvent&&Object.hasOwnProperty.call(e,"userEvent")&&p.google.cloud.discoveryengine.v1beta.UserEvent.encode(e.userEvent,t.uint32(18).fork()).ldelim(),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&t.uint32(24).int32(e.pageSize),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&t.uint32(34).string(e.filter),null!=e.validateOnly&&Object.hasOwnProperty.call(e,"validateOnly")&&t.uint32(40).bool(e.validateOnly),null!=e.params&&Object.hasOwnProperty.call(e,"params"))for(var n=Object.keys(e.params),o=0;o<n.length;++o)t.uint32(50).fork().uint32(10).string(n[o]),p.google.protobuf.Value.encode(e.params[n[o]],t.uint32(18).fork()).ldelim().ldelim();if(null!=e.userLabels&&Object.hasOwnProperty.call(e,"userLabels"))for(n=Object.keys(e.userLabels),o=0;o<n.length;++o)t.uint32(66).fork().uint32(10).string(n[o]).uint32(18).string(e.userLabels[n[o]]).ldelim();return t},v.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},v.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.RecommendRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.servingConfig=e.string();break;case 2:o.userEvent=p.google.cloud.discoveryengine.v1beta.UserEvent.decode(e,e.uint32());break;case 3:o.pageSize=e.int32();break;case 4:o.filter=e.string();break;case 5:o.validateOnly=e.bool();break;case 6:o.params===u.emptyObject&&(o.params={});for(var i=e.uint32()+e.pos,a="",l=null;e.pos<i;)switch((s=e.uint32())>>>3){case 1:a=e.string();break;case 2:l=p.google.protobuf.Value.decode(e,e.uint32());break;default:e.skipType(7&s)}o.params[a]=l;break;case 8:o.userLabels===u.emptyObject&&(o.userLabels={});var s,i=e.uint32()+e.pos;for(l=a="";e.pos<i;)switch((s=e.uint32())>>>3){case 1:a=e.string();break;case 2:l=e.string();break;default:e.skipType(7&s)}o.userLabels[a]=l;break;default:e.skipType(7&r)}}return o},v.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},v.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.servingConfig&&e.hasOwnProperty("servingConfig")&&!u.isString(e.servingConfig))return"servingConfig: string expected";if(null!=e.userEvent&&e.hasOwnProperty("userEvent")&&(t=p.google.cloud.discoveryengine.v1beta.UserEvent.verify(e.userEvent)))return"userEvent."+t;if(null!=e.pageSize&&e.hasOwnProperty("pageSize")&&!u.isInteger(e.pageSize))return"pageSize: integer expected";if(null!=e.filter&&e.hasOwnProperty("filter")&&!u.isString(e.filter))return"filter: string expected";if(null!=e.validateOnly&&e.hasOwnProperty("validateOnly")&&"boolean"!=typeof e.validateOnly)return"validateOnly: boolean expected";if(null!=e.params&&e.hasOwnProperty("params")){if(!u.isObject(e.params))return"params: object expected";for(var t,n=Object.keys(e.params),o=0;o<n.length;++o)if(t=p.google.protobuf.Value.verify(e.params[n[o]]))return"params."+t}if(null!=e.userLabels&&e.hasOwnProperty("userLabels")){if(!u.isObject(e.userLabels))return"userLabels: object expected";for(n=Object.keys(e.userLabels),o=0;o<n.length;++o)if(!u.isString(e.userLabels[n[o]]))return"userLabels: string{k:string} expected"}return null},v.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.RecommendRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.RecommendRequest;if(null!=e.servingConfig&&(t.servingConfig=String(e.servingConfig)),null!=e.userEvent){if("object"!=typeof e.userEvent)throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.userEvent: object expected");t.userEvent=p.google.cloud.discoveryengine.v1beta.UserEvent.fromObject(e.userEvent)}if(null!=e.pageSize&&(t.pageSize=0|e.pageSize),null!=e.filter&&(t.filter=String(e.filter)),null!=e.validateOnly&&(t.validateOnly=Boolean(e.validateOnly)),e.params){if("object"!=typeof e.params)throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.params: object expected");t.params={};for(var n=Object.keys(e.params),o=0;o<n.length;++o){if("object"!=typeof e.params[n[o]])throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.params: object expected");t.params[n[o]]=p.google.protobuf.Value.fromObject(e.params[n[o]])}}if(e.userLabels){if("object"!=typeof e.userLabels)throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendRequest.userLabels: object expected");t.userLabels={};for(n=Object.keys(e.userLabels),o=0;o<n.length;++o)t.userLabels[n[o]]=String(e.userLabels[n[o]])}return t},v.toObject=function(e,t){var n,o={};if(((t=t||{}).objects||t.defaults)&&(o.params={},o.userLabels={}),t.defaults&&(o.servingConfig="",o.userEvent=null,o.pageSize=0,o.filter="",o.validateOnly=!1),null!=e.servingConfig&&e.hasOwnProperty("servingConfig")&&(o.servingConfig=e.servingConfig),null!=e.userEvent&&e.hasOwnProperty("userEvent")&&(o.userEvent=p.google.cloud.discoveryengine.v1beta.UserEvent.toObject(e.userEvent,t)),null!=e.pageSize&&e.hasOwnProperty("pageSize")&&(o.pageSize=e.pageSize),null!=e.filter&&e.hasOwnProperty("filter")&&(o.filter=e.filter),null!=e.validateOnly&&e.hasOwnProperty("validateOnly")&&(o.validateOnly=e.validateOnly),e.params&&(n=Object.keys(e.params)).length){o.params={};for(var r=0;r<n.length;++r)o.params[n[r]]=p.google.protobuf.Value.toObject(e.params[n[r]],t)}if(e.userLabels&&(n=Object.keys(e.userLabels)).length){o.userLabels={};for(r=0;r<n.length;++r)o.userLabels[n[r]]=e.userLabels[n[r]]}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.cloud.discoveryengine.v1beta.RecommendRequest"},v),i.RecommendResponse=(ue.prototype.results=u.emptyArray,ue.prototype.attributionToken="",ue.prototype.missingIds=u.emptyArray,ue.prototype.validateOnly=!1,ue.create=function(e){return new ue(e)},ue.encode=function(e,t){if(t=t||a.create(),null!=e.results&&e.results.length)for(var n=0;n<e.results.length;++n)p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.encode(e.results[n],t.uint32(10).fork()).ldelim();if(null!=e.attributionToken&&Object.hasOwnProperty.call(e,"attributionToken")&&t.uint32(18).string(e.attributionToken),null!=e.missingIds&&e.missingIds.length)for(n=0;n<e.missingIds.length;++n)t.uint32(26).string(e.missingIds[n]);return null!=e.validateOnly&&Object.hasOwnProperty.call(e,"validateOnly")&&t.uint32(32).bool(e.validateOnly),t},ue.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ue.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.RecommendResponse;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.results&&o.results.length||(o.results=[]),o.results.push(p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.decode(e,e.uint32()));break;case 2:o.attributionToken=e.string();break;case 3:o.missingIds&&o.missingIds.length||(o.missingIds=[]),o.missingIds.push(e.string());break;case 4:o.validateOnly=e.bool();break;default:e.skipType(7&r)}}return o},ue.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ue.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.results&&e.hasOwnProperty("results")){if(!Array.isArray(e.results))return"results: array expected";for(var t=0;t<e.results.length;++t){var n=p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.verify(e.results[t]);if(n)return"results."+n}}if(null!=e.attributionToken&&e.hasOwnProperty("attributionToken")&&!u.isString(e.attributionToken))return"attributionToken: string expected";if(null!=e.missingIds&&e.hasOwnProperty("missingIds")){if(!Array.isArray(e.missingIds))return"missingIds: array expected";for(t=0;t<e.missingIds.length;++t)if(!u.isString(e.missingIds[t]))return"missingIds: string[] expected"}return null!=e.validateOnly&&e.hasOwnProperty("validateOnly")&&"boolean"!=typeof e.validateOnly?"validateOnly: boolean expected":null},ue.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.RecommendResponse)return e;var t=new p.google.cloud.discoveryengine.v1beta.RecommendResponse;if(e.results){if(!Array.isArray(e.results))throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.results: array expected");t.results=[];for(var n=0;n<e.results.length;++n){if("object"!=typeof e.results[n])throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.results: object expected");t.results[n]=p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.fromObject(e.results[n])}}if(null!=e.attributionToken&&(t.attributionToken=String(e.attributionToken)),e.missingIds){if(!Array.isArray(e.missingIds))throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.missingIds: array expected");t.missingIds=[];for(n=0;n<e.missingIds.length;++n)t.missingIds[n]=String(e.missingIds[n])}return null!=e.validateOnly&&(t.validateOnly=Boolean(e.validateOnly)),t},ue.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.results=[],n.missingIds=[]),t.defaults&&(n.attributionToken="",n.validateOnly=!1),e.results&&e.results.length){n.results=[];for(var o=0;o<e.results.length;++o)n.results[o]=p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.toObject(e.results[o],t)}if(null!=e.attributionToken&&e.hasOwnProperty("attributionToken")&&(n.attributionToken=e.attributionToken),e.missingIds&&e.missingIds.length){n.missingIds=[];for(o=0;o<e.missingIds.length;++o)n.missingIds[o]=e.missingIds[o]}return null!=e.validateOnly&&e.hasOwnProperty("validateOnly")&&(n.validateOnly=e.validateOnly),n},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.cloud.discoveryengine.v1beta.RecommendResponse"},ue.RecommendationResult=(pe.prototype.id="",pe.prototype.document=null,pe.prototype.metadata=u.emptyObject,pe.create=function(e){return new pe(e)},pe.encode=function(e,t){if(t=t||a.create(),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&p.google.cloud.discoveryengine.v1beta.Document.encode(e.document,t.uint32(18).fork()).ldelim(),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata"))for(var n=Object.keys(e.metadata),o=0;o<n.length;++o)t.uint32(26).fork().uint32(10).string(n[o]),p.google.protobuf.Value.encode(e.metadata[n[o]],t.uint32(18).fork()).ldelim().ldelim();return t},pe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},pe.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.id=e.string();break;case 2:o.document=p.google.cloud.discoveryengine.v1beta.Document.decode(e,e.uint32());break;case 3:o.metadata===u.emptyObject&&(o.metadata={});for(var i=e.uint32()+e.pos,a="",l=null;e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:a=e.string();break;case 2:l=p.google.protobuf.Value.decode(e,e.uint32());break;default:e.skipType(7&s)}}o.metadata[a]=l;break;default:e.skipType(7&r)}}return o},pe.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},pe.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!u.isString(e.id))return"id: string expected";if(null!=e.document&&e.hasOwnProperty("document")&&(t=p.google.cloud.discoveryengine.v1beta.Document.verify(e.document)))return"document."+t;if(null!=e.metadata&&e.hasOwnProperty("metadata")){if(!u.isObject(e.metadata))return"metadata: object expected";for(var t,n=Object.keys(e.metadata),o=0;o<n.length;++o)if(t=p.google.protobuf.Value.verify(e.metadata[n[o]]))return"metadata."+t}return null},pe.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult)return e;var t=new p.google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult;if(null!=e.id&&(t.id=String(e.id)),null!=e.document){if("object"!=typeof e.document)throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.document: object expected");t.document=p.google.cloud.discoveryengine.v1beta.Document.fromObject(e.document)}if(e.metadata){if("object"!=typeof e.metadata)throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata: object expected");t.metadata={};for(var n=Object.keys(e.metadata),o=0;o<n.length;++o){if("object"!=typeof e.metadata[n[o]])throw TypeError(".google.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult.metadata: object expected");t.metadata[n[o]]=p.google.protobuf.Value.fromObject(e.metadata[n[o]])}}return t},pe.toObject=function(e,t){var n,o={};if(((t=t||{}).objects||t.defaults)&&(o.metadata={}),t.defaults&&(o.id="",o.document=null),null!=e.id&&e.hasOwnProperty("id")&&(o.id=e.id),null!=e.document&&e.hasOwnProperty("document")&&(o.document=p.google.cloud.discoveryengine.v1beta.Document.toObject(e.document,t)),e.metadata&&(n=Object.keys(e.metadata)).length){o.metadata={};for(var r=0;r<n.length;++r)o.metadata[n[r]]=p.google.protobuf.Value.toObject(e.metadata[n[r]],t)}return o},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.cloud.discoveryengine.v1beta.RecommendResponse.RecommendationResult"},pe),ue),i.Schema=(ge.prototype.structSchema=null,ge.prototype.jsonSchema=null,ge.prototype.name="",Object.defineProperty(ge.prototype,"schema",{get:u.oneOfGetter(n=["structSchema","jsonSchema"]),set:u.oneOfSetter(n)}),ge.create=function(e){return new ge(e)},ge.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.structSchema&&Object.hasOwnProperty.call(e,"structSchema")&&p.google.protobuf.Struct.encode(e.structSchema,t.uint32(18).fork()).ldelim(),null!=e.jsonSchema&&Object.hasOwnProperty.call(e,"jsonSchema")&&t.uint32(26).string(e.jsonSchema),t},ge.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ge.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.Schema;e.pos<n;){var r=e.uint32();switch(r>>>3){case 2:o.structSchema=p.google.protobuf.Struct.decode(e,e.uint32());break;case 3:o.jsonSchema=e.string();break;case 1:o.name=e.string();break;default:e.skipType(7&r)}}return o},ge.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ge.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.structSchema&&e.hasOwnProperty("structSchema")){t.schema=1;var n=p.google.protobuf.Struct.verify(e.structSchema);if(n)return"structSchema."+n}if(null!=e.jsonSchema&&e.hasOwnProperty("jsonSchema")){if(1===t.schema)return"schema: multiple values";if(t.schema=1,!u.isString(e.jsonSchema))return"jsonSchema: string expected"}return null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name)?"name: string expected":null},ge.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.Schema)return e;var t=new p.google.cloud.discoveryengine.v1beta.Schema;if(null!=e.structSchema){if("object"!=typeof e.structSchema)throw TypeError(".google.cloud.discoveryengine.v1beta.Schema.structSchema: object expected");t.structSchema=p.google.protobuf.Struct.fromObject(e.structSchema)}return null!=e.jsonSchema&&(t.jsonSchema=String(e.jsonSchema)),null!=e.name&&(t.name=String(e.name)),t},ge.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.structSchema&&e.hasOwnProperty("structSchema")&&(n.structSchema=p.google.protobuf.Struct.toObject(e.structSchema,t),t.oneofs)&&(n.schema="structSchema"),null!=e.jsonSchema&&e.hasOwnProperty("jsonSchema")&&(n.jsonSchema=e.jsonSchema,t.oneofs)&&(n.schema="jsonSchema"),n},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.cloud.discoveryengine.v1beta.Schema"},ge),i.SchemaService=(((de.prototype=Object.create(o.rpc.Service.prototype)).constructor=de).create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(de.prototype.getSchema=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.GetSchemaRequest,p.google.cloud.discoveryengine.v1beta.Schema,t,n)},"name",{value:"GetSchema"}),Object.defineProperty(de.prototype.listSchemas=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.ListSchemasRequest,p.google.cloud.discoveryengine.v1beta.ListSchemasResponse,t,n)},"name",{value:"ListSchemas"}),Object.defineProperty(de.prototype.createSchema=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.CreateSchemaRequest,p.google.longrunning.Operation,t,n)},"name",{value:"CreateSchema"}),Object.defineProperty(de.prototype.updateSchema=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest,p.google.longrunning.Operation,t,n)},"name",{value:"UpdateSchema"}),Object.defineProperty(de.prototype.deleteSchema=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest,p.google.longrunning.Operation,t,n)},"name",{value:"DeleteSchema"}),de),i.GetSchemaRequest=(fe.prototype.name="",fe.create=function(e){return new fe(e)},fe.encode=function(e,t){return t=t||a.create(),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).ldelim()},fe.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.GetSchemaRequest;e.pos<n;){var r=e.uint32();r>>>3==1?o.name=e.string():e.skipType(7&r)}return o},fe.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},fe.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name)?"name: string expected":null},fe.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.GetSchemaRequest?e:(t=new p.google.cloud.discoveryengine.v1beta.GetSchemaRequest,null!=e.name&&(t.name=String(e.name)),t)},fe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},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.cloud.discoveryengine.v1beta.GetSchemaRequest"},fe),i.ListSchemasRequest=(ye.prototype.parent="",ye.prototype.pageSize=0,ye.prototype.pageToken="",ye.create=function(e){return new ye(e)},ye.encode=function(e,t){return t=t||a.create(),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},ye.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ye.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ListSchemasRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.parent=e.string();break;case 2:o.pageSize=e.int32();break;case 3:o.pageToken=e.string();break;default:e.skipType(7&r)}}return o},ye.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ye.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.parent&&e.hasOwnProperty("parent")&&!u.isString(e.parent)?"parent: string expected":null!=e.pageSize&&e.hasOwnProperty("pageSize")&&!u.isInteger(e.pageSize)?"pageSize: integer expected":null!=e.pageToken&&e.hasOwnProperty("pageToken")&&!u.isString(e.pageToken)?"pageToken: string expected":null},ye.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.ListSchemasRequest?e:(t=new p.google.cloud.discoveryengine.v1beta.ListSchemasRequest,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)},ye.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.parent="",n.pageSize=0,n.pageToken=""),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=e.parent),null!=e.pageSize&&e.hasOwnProperty("pageSize")&&(n.pageSize=e.pageSize),null!=e.pageToken&&e.hasOwnProperty("pageToken")&&(n.pageToken=e.pageToken),n},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.cloud.discoveryengine.v1beta.ListSchemasRequest"},ye),i.ListSchemasResponse=(me.prototype.schemas=u.emptyArray,me.prototype.nextPageToken="",me.create=function(e){return new me(e)},me.encode=function(e,t){if(t=t||a.create(),null!=e.schemas&&e.schemas.length)for(var n=0;n<e.schemas.length;++n)p.google.cloud.discoveryengine.v1beta.Schema.encode(e.schemas[n],t.uint32(10).fork()).ldelim();return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(18).string(e.nextPageToken),t},me.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},me.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.ListSchemasResponse;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.schemas&&o.schemas.length||(o.schemas=[]),o.schemas.push(p.google.cloud.discoveryengine.v1beta.Schema.decode(e,e.uint32()));break;case 2:o.nextPageToken=e.string();break;default:e.skipType(7&r)}}return o},me.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},me.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.schemas&&e.hasOwnProperty("schemas")){if(!Array.isArray(e.schemas))return"schemas: array expected";for(var t=0;t<e.schemas.length;++t){var n=p.google.cloud.discoveryengine.v1beta.Schema.verify(e.schemas[t]);if(n)return"schemas."+n}}return null!=e.nextPageToken&&e.hasOwnProperty("nextPageToken")&&!u.isString(e.nextPageToken)?"nextPageToken: string expected":null},me.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.ListSchemasResponse)return e;var t=new p.google.cloud.discoveryengine.v1beta.ListSchemasResponse;if(e.schemas){if(!Array.isArray(e.schemas))throw TypeError(".google.cloud.discoveryengine.v1beta.ListSchemasResponse.schemas: array expected");t.schemas=[];for(var n=0;n<e.schemas.length;++n){if("object"!=typeof e.schemas[n])throw TypeError(".google.cloud.discoveryengine.v1beta.ListSchemasResponse.schemas: object expected");t.schemas[n]=p.google.cloud.discoveryengine.v1beta.Schema.fromObject(e.schemas[n])}}return null!=e.nextPageToken&&(t.nextPageToken=String(e.nextPageToken)),t},me.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.schemas=[]),t.defaults&&(n.nextPageToken=""),e.schemas&&e.schemas.length){n.schemas=[];for(var o=0;o<e.schemas.length;++o)n.schemas[o]=p.google.cloud.discoveryengine.v1beta.Schema.toObject(e.schemas[o],t)}return null!=e.nextPageToken&&e.hasOwnProperty("nextPageToken")&&(n.nextPageToken=e.nextPageToken),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.cloud.discoveryengine.v1beta.ListSchemasResponse"},me),i.CreateSchemaRequest=(be.prototype.parent="",be.prototype.schema=null,be.prototype.schemaId="",be.create=function(e){return new be(e)},be.encode=function(e,t){return t=t||a.create(),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.schema&&Object.hasOwnProperty.call(e,"schema")&&p.google.cloud.discoveryengine.v1beta.Schema.encode(e.schema,t.uint32(18).fork()).ldelim(),null!=e.schemaId&&Object.hasOwnProperty.call(e,"schemaId")&&t.uint32(26).string(e.schemaId),t},be.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},be.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.CreateSchemaRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.parent=e.string();break;case 2:o.schema=p.google.cloud.discoveryengine.v1beta.Schema.decode(e,e.uint32());break;case 3:o.schemaId=e.string();break;default:e.skipType(7&r)}}return o},be.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},be.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.parent&&e.hasOwnProperty("parent")&&!u.isString(e.parent))return"parent: string expected";if(null!=e.schema&&e.hasOwnProperty("schema")){var t=p.google.cloud.discoveryengine.v1beta.Schema.verify(e.schema);if(t)return"schema."+t}return null!=e.schemaId&&e.hasOwnProperty("schemaId")&&!u.isString(e.schemaId)?"schemaId: string expected":null},be.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.CreateSchemaRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.CreateSchemaRequest;if(null!=e.parent&&(t.parent=String(e.parent)),null!=e.schema){if("object"!=typeof e.schema)throw TypeError(".google.cloud.discoveryengine.v1beta.CreateSchemaRequest.schema: object expected");t.schema=p.google.cloud.discoveryengine.v1beta.Schema.fromObject(e.schema)}return null!=e.schemaId&&(t.schemaId=String(e.schemaId)),t},be.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.parent="",n.schema=null,n.schemaId=""),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=e.parent),null!=e.schema&&e.hasOwnProperty("schema")&&(n.schema=p.google.cloud.discoveryengine.v1beta.Schema.toObject(e.schema,t)),null!=e.schemaId&&e.hasOwnProperty("schemaId")&&(n.schemaId=e.schemaId),n},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.cloud.discoveryengine.v1beta.CreateSchemaRequest"},be),i.UpdateSchemaRequest=(he.prototype.schema=null,he.prototype.allowMissing=!1,he.create=function(e){return new he(e)},he.encode=function(e,t){return t=t||a.create(),null!=e.schema&&Object.hasOwnProperty.call(e,"schema")&&p.google.cloud.discoveryengine.v1beta.Schema.encode(e.schema,t.uint32(10).fork()).ldelim(),null!=e.allowMissing&&Object.hasOwnProperty.call(e,"allowMissing")&&t.uint32(24).bool(e.allowMissing),t},he.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},he.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.schema=p.google.cloud.discoveryengine.v1beta.Schema.decode(e,e.uint32());break;case 3:o.allowMissing=e.bool();break;default:e.skipType(7&r)}}return o},he.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},he.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.schema&&e.hasOwnProperty("schema")){var t=p.google.cloud.discoveryengine.v1beta.Schema.verify(e.schema);if(t)return"schema."+t}return null!=e.allowMissing&&e.hasOwnProperty("allowMissing")&&"boolean"!=typeof e.allowMissing?"allowMissing: boolean expected":null},he.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.UpdateSchemaRequest;if(null!=e.schema){if("object"!=typeof e.schema)throw TypeError(".google.cloud.discoveryengine.v1beta.UpdateSchemaRequest.schema: object expected");t.schema=p.google.cloud.discoveryengine.v1beta.Schema.fromObject(e.schema)}return null!=e.allowMissing&&(t.allowMissing=Boolean(e.allowMissing)),t},he.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.schema=null,n.allowMissing=!1),null!=e.schema&&e.hasOwnProperty("schema")&&(n.schema=p.google.cloud.discoveryengine.v1beta.Schema.toObject(e.schema,t)),null!=e.allowMissing&&e.hasOwnProperty("allowMissing")&&(n.allowMissing=e.allowMissing),n},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.cloud.discoveryengine.v1beta.UpdateSchemaRequest"},he),i.DeleteSchemaRequest=(ve.prototype.name="",ve.create=function(e){return new ve(e)},ve.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},ve.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ve.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest;e.pos<n;){var r=e.uint32();r>>>3==1?o.name=e.string():e.skipType(7&r)}return o},ve.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ve.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name)?"name: string expected":null},ve.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest?e:(t=new p.google.cloud.discoveryengine.v1beta.DeleteSchemaRequest,null!=e.name&&(t.name=String(e.name)),t)},ve.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},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.cloud.discoveryengine.v1beta.DeleteSchemaRequest"},ve),i.CreateSchemaMetadata=(Oe.prototype.createTime=null,Oe.prototype.updateTime=null,Oe.create=function(e){return new Oe(e)},Oe.encode=function(e,t){return t=t||a.create(),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&p.google.protobuf.Timestamp.encode(e.createTime,t.uint32(10).fork()).ldelim(),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&p.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(18).fork()).ldelim(),t},Oe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Oe.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.CreateSchemaMetadata;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.createTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;case 2:o.updateTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},Oe.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Oe.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t;if(null!=e.createTime&&e.hasOwnProperty("createTime")&&(t=p.google.protobuf.Timestamp.verify(e.createTime)))return"createTime."+t;if(null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(t=p.google.protobuf.Timestamp.verify(e.updateTime)))return"updateTime."+t;return null},Oe.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.CreateSchemaMetadata)return e;var t=new p.google.cloud.discoveryengine.v1beta.CreateSchemaMetadata;if(null!=e.createTime){if("object"!=typeof e.createTime)throw TypeError(".google.cloud.discoveryengine.v1beta.CreateSchemaMetadata.createTime: object expected");t.createTime=p.google.protobuf.Timestamp.fromObject(e.createTime)}if(null!=e.updateTime){if("object"!=typeof e.updateTime)throw TypeError(".google.cloud.discoveryengine.v1beta.CreateSchemaMetadata.updateTime: object expected");t.updateTime=p.google.protobuf.Timestamp.fromObject(e.updateTime)}return t},Oe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.createTime=null,n.updateTime=null),null!=e.createTime&&e.hasOwnProperty("createTime")&&(n.createTime=p.google.protobuf.Timestamp.toObject(e.createTime,t)),null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(n.updateTime=p.google.protobuf.Timestamp.toObject(e.updateTime,t)),n},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.cloud.discoveryengine.v1beta.CreateSchemaMetadata"},Oe),i.UpdateSchemaMetadata=(Se.prototype.createTime=null,Se.prototype.updateTime=null,Se.create=function(e){return new Se(e)},Se.encode=function(e,t){return t=t||a.create(),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&p.google.protobuf.Timestamp.encode(e.createTime,t.uint32(10).fork()).ldelim(),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&p.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(18).fork()).ldelim(),t},Se.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Se.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.createTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;case 2:o.updateTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},Se.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Se.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t;if(null!=e.createTime&&e.hasOwnProperty("createTime")&&(t=p.google.protobuf.Timestamp.verify(e.createTime)))return"createTime."+t;if(null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(t=p.google.protobuf.Timestamp.verify(e.updateTime)))return"updateTime."+t;return null},Se.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata)return e;var t=new p.google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata;if(null!=e.createTime){if("object"!=typeof e.createTime)throw TypeError(".google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata.createTime: object expected");t.createTime=p.google.protobuf.Timestamp.fromObject(e.createTime)}if(null!=e.updateTime){if("object"!=typeof e.updateTime)throw TypeError(".google.cloud.discoveryengine.v1beta.UpdateSchemaMetadata.updateTime: object expected");t.updateTime=p.google.protobuf.Timestamp.fromObject(e.updateTime)}return t},Se.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.createTime=null,n.updateTime=null),null!=e.createTime&&e.hasOwnProperty("createTime")&&(n.createTime=p.google.protobuf.Timestamp.toObject(e.createTime,t)),null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(n.updateTime=p.google.protobuf.Timestamp.toObject(e.updateTime,t)),n},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.cloud.discoveryengine.v1beta.UpdateSchemaMetadata"},Se),i.DeleteSchemaMetadata=(we.prototype.createTime=null,we.prototype.updateTime=null,we.create=function(e){return new we(e)},we.encode=function(e,t){return t=t||a.create(),null!=e.createTime&&Object.hasOwnProperty.call(e,"createTime")&&p.google.protobuf.Timestamp.encode(e.createTime,t.uint32(10).fork()).ldelim(),null!=e.updateTime&&Object.hasOwnProperty.call(e,"updateTime")&&p.google.protobuf.Timestamp.encode(e.updateTime,t.uint32(18).fork()).ldelim(),t},we.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},we.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.createTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;case 2:o.updateTime=p.google.protobuf.Timestamp.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},we.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},we.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t;if(null!=e.createTime&&e.hasOwnProperty("createTime")&&(t=p.google.protobuf.Timestamp.verify(e.createTime)))return"createTime."+t;if(null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(t=p.google.protobuf.Timestamp.verify(e.updateTime)))return"updateTime."+t;return null},we.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata)return e;var t=new p.google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata;if(null!=e.createTime){if("object"!=typeof e.createTime)throw TypeError(".google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata.createTime: object expected");t.createTime=p.google.protobuf.Timestamp.fromObject(e.createTime)}if(null!=e.updateTime){if("object"!=typeof e.updateTime)throw TypeError(".google.cloud.discoveryengine.v1beta.DeleteSchemaMetadata.updateTime: object expected");t.updateTime=p.google.protobuf.Timestamp.fromObject(e.updateTime)}return t},we.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.createTime=null,n.updateTime=null),null!=e.createTime&&e.hasOwnProperty("createTime")&&(n.createTime=p.google.protobuf.Timestamp.toObject(e.createTime,t)),null!=e.updateTime&&e.hasOwnProperty("updateTime")&&(n.updateTime=p.google.protobuf.Timestamp.toObject(e.updateTime,t)),n},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.cloud.discoveryengine.v1beta.DeleteSchemaMetadata"},we),i.SearchService=(((je.prototype=Object.create(o.rpc.Service.prototype)).constructor=je).create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(je.prototype.search=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.SearchRequest,p.google.cloud.discoveryengine.v1beta.SearchResponse,t,n)},"name",{value:"Search"}),je),i.SearchRequest=(O.prototype.servingConfig="",O.prototype.branch="",O.prototype.query="",O.prototype.pageSize=0,O.prototype.pageToken="",O.prototype.offset=0,O.prototype.filter="",O.prototype.orderBy="",O.prototype.facetSpecs=u.emptyArray,O.prototype.boostSpec=null,O.prototype.params=u.emptyObject,O.prototype.queryExpansionSpec=null,O.prototype.spellCorrectionSpec=null,O.prototype.userPseudoId="",O.prototype.contentSearchSpec=null,O.create=function(e){return new O(e)},O.encode=function(e,t){if(t=t||a.create(),null!=e.servingConfig&&Object.hasOwnProperty.call(e,"servingConfig")&&t.uint32(10).string(e.servingConfig),null!=e.branch&&Object.hasOwnProperty.call(e,"branch")&&t.uint32(18).string(e.branch),null!=e.query&&Object.hasOwnProperty.call(e,"query")&&t.uint32(26).string(e.query),null!=e.pageSize&&Object.hasOwnProperty.call(e,"pageSize")&&t.uint32(32).int32(e.pageSize),null!=e.pageToken&&Object.hasOwnProperty.call(e,"pageToken")&&t.uint32(42).string(e.pageToken),null!=e.offset&&Object.hasOwnProperty.call(e,"offset")&&t.uint32(48).int32(e.offset),null!=e.filter&&Object.hasOwnProperty.call(e,"filter")&&t.uint32(58).string(e.filter),null!=e.orderBy&&Object.hasOwnProperty.call(e,"orderBy")&&t.uint32(66).string(e.orderBy),null!=e.facetSpecs&&e.facetSpecs.length)for(var n=0;n<e.facetSpecs.length;++n)p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.encode(e.facetSpecs[n],t.uint32(74).fork()).ldelim();if(null!=e.boostSpec&&Object.hasOwnProperty.call(e,"boostSpec")&&p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.encode(e.boostSpec,t.uint32(82).fork()).ldelim(),null!=e.params&&Object.hasOwnProperty.call(e,"params"))for(var o=Object.keys(e.params),n=0;n<o.length;++n)t.uint32(90).fork().uint32(10).string(o[n]),p.google.protobuf.Value.encode(e.params[o[n]],t.uint32(18).fork()).ldelim().ldelim();return null!=e.queryExpansionSpec&&Object.hasOwnProperty.call(e,"queryExpansionSpec")&&p.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.encode(e.queryExpansionSpec,t.uint32(106).fork()).ldelim(),null!=e.spellCorrectionSpec&&Object.hasOwnProperty.call(e,"spellCorrectionSpec")&&p.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.encode(e.spellCorrectionSpec,t.uint32(114).fork()).ldelim(),null!=e.userPseudoId&&Object.hasOwnProperty.call(e,"userPseudoId")&&t.uint32(122).string(e.userPseudoId),null!=e.contentSearchSpec&&Object.hasOwnProperty.call(e,"contentSearchSpec")&&p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.encode(e.contentSearchSpec,t.uint32(194).fork()).ldelim(),t},O.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},O.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.servingConfig=e.string();break;case 2:o.branch=e.string();break;case 3:o.query=e.string();break;case 4:o.pageSize=e.int32();break;case 5:o.pageToken=e.string();break;case 6:o.offset=e.int32();break;case 7:o.filter=e.string();break;case 8:o.orderBy=e.string();break;case 9:o.facetSpecs&&o.facetSpecs.length||(o.facetSpecs=[]),o.facetSpecs.push(p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.decode(e,e.uint32()));break;case 10:o.boostSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.decode(e,e.uint32());break;case 11:o.params===u.emptyObject&&(o.params={});for(var i=e.uint32()+e.pos,a="",l=null;e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:a=e.string();break;case 2:l=p.google.protobuf.Value.decode(e,e.uint32());break;default:e.skipType(7&s)}}o.params[a]=l;break;case 13:o.queryExpansionSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.decode(e,e.uint32());break;case 14:o.spellCorrectionSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.decode(e,e.uint32());break;case 15:o.userPseudoId=e.string();break;case 24:o.contentSearchSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},O.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},O.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.servingConfig&&e.hasOwnProperty("servingConfig")&&!u.isString(e.servingConfig))return"servingConfig: string expected";if(null!=e.branch&&e.hasOwnProperty("branch")&&!u.isString(e.branch))return"branch: string expected";if(null!=e.query&&e.hasOwnProperty("query")&&!u.isString(e.query))return"query: string expected";if(null!=e.pageSize&&e.hasOwnProperty("pageSize")&&!u.isInteger(e.pageSize))return"pageSize: integer expected";if(null!=e.pageToken&&e.hasOwnProperty("pageToken")&&!u.isString(e.pageToken))return"pageToken: string expected";if(null!=e.offset&&e.hasOwnProperty("offset")&&!u.isInteger(e.offset))return"offset: integer expected";if(null!=e.filter&&e.hasOwnProperty("filter")&&!u.isString(e.filter))return"filter: string expected";if(null!=e.orderBy&&e.hasOwnProperty("orderBy")&&!u.isString(e.orderBy))return"orderBy: string expected";if(null!=e.facetSpecs&&e.hasOwnProperty("facetSpecs")){if(!Array.isArray(e.facetSpecs))return"facetSpecs: array expected";for(var t=0;t<e.facetSpecs.length;++t)if(n=p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.verify(e.facetSpecs[t]))return"facetSpecs."+n}if(null!=e.boostSpec&&e.hasOwnProperty("boostSpec")&&(n=p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.verify(e.boostSpec)))return"boostSpec."+n;if(null!=e.params&&e.hasOwnProperty("params")){if(!u.isObject(e.params))return"params: object expected";for(var n,o=Object.keys(e.params),t=0;t<o.length;++t)if(n=p.google.protobuf.Value.verify(e.params[o[t]]))return"params."+n}if(null!=e.queryExpansionSpec&&e.hasOwnProperty("queryExpansionSpec")&&(n=p.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.verify(e.queryExpansionSpec)))return"queryExpansionSpec."+n;if(null!=e.spellCorrectionSpec&&e.hasOwnProperty("spellCorrectionSpec")&&(n=p.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.verify(e.spellCorrectionSpec)))return"spellCorrectionSpec."+n;if(null!=e.userPseudoId&&e.hasOwnProperty("userPseudoId")&&!u.isString(e.userPseudoId))return"userPseudoId: string expected";if(null!=e.contentSearchSpec&&e.hasOwnProperty("contentSearchSpec")&&(n=p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.verify(e.contentSearchSpec)))return"contentSearchSpec."+n;return null},O.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.SearchRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.SearchRequest;if(null!=e.servingConfig&&(t.servingConfig=String(e.servingConfig)),null!=e.branch&&(t.branch=String(e.branch)),null!=e.query&&(t.query=String(e.query)),null!=e.pageSize&&(t.pageSize=0|e.pageSize),null!=e.pageToken&&(t.pageToken=String(e.pageToken)),null!=e.offset&&(t.offset=0|e.offset),null!=e.filter&&(t.filter=String(e.filter)),null!=e.orderBy&&(t.orderBy=String(e.orderBy)),e.facetSpecs){if(!Array.isArray(e.facetSpecs))throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.facetSpecs: array expected");t.facetSpecs=[];for(var n=0;n<e.facetSpecs.length;++n){if("object"!=typeof e.facetSpecs[n])throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.facetSpecs: object expected");t.facetSpecs[n]=p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.fromObject(e.facetSpecs[n])}}if(null!=e.boostSpec){if("object"!=typeof e.boostSpec)throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.boostSpec: object expected");t.boostSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.fromObject(e.boostSpec)}if(e.params){if("object"!=typeof e.params)throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.params: object expected");t.params={};for(var o=Object.keys(e.params),n=0;n<o.length;++n){if("object"!=typeof e.params[o[n]])throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.params: object expected");t.params[o[n]]=p.google.protobuf.Value.fromObject(e.params[o[n]])}}if(null!=e.queryExpansionSpec){if("object"!=typeof e.queryExpansionSpec)throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.queryExpansionSpec: object expected");t.queryExpansionSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.fromObject(e.queryExpansionSpec)}if(null!=e.spellCorrectionSpec){if("object"!=typeof e.spellCorrectionSpec)throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.spellCorrectionSpec: object expected");t.spellCorrectionSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.fromObject(e.spellCorrectionSpec)}if(null!=e.userPseudoId&&(t.userPseudoId=String(e.userPseudoId)),null!=e.contentSearchSpec){if("object"!=typeof e.contentSearchSpec)throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.contentSearchSpec: object expected");t.contentSearchSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.fromObject(e.contentSearchSpec)}return t},O.toObject=function(e,t){var n,o={};if(((t=t||{}).arrays||t.defaults)&&(o.facetSpecs=[]),(t.objects||t.defaults)&&(o.params={}),t.defaults&&(o.servingConfig="",o.branch="",o.query="",o.pageSize=0,o.pageToken="",o.offset=0,o.filter="",o.orderBy="",o.boostSpec=null,o.queryExpansionSpec=null,o.spellCorrectionSpec=null,o.userPseudoId="",o.contentSearchSpec=null),null!=e.servingConfig&&e.hasOwnProperty("servingConfig")&&(o.servingConfig=e.servingConfig),null!=e.branch&&e.hasOwnProperty("branch")&&(o.branch=e.branch),null!=e.query&&e.hasOwnProperty("query")&&(o.query=e.query),null!=e.pageSize&&e.hasOwnProperty("pageSize")&&(o.pageSize=e.pageSize),null!=e.pageToken&&e.hasOwnProperty("pageToken")&&(o.pageToken=e.pageToken),null!=e.offset&&e.hasOwnProperty("offset")&&(o.offset=e.offset),null!=e.filter&&e.hasOwnProperty("filter")&&(o.filter=e.filter),null!=e.orderBy&&e.hasOwnProperty("orderBy")&&(o.orderBy=e.orderBy),e.facetSpecs&&e.facetSpecs.length){o.facetSpecs=[];for(var r=0;r<e.facetSpecs.length;++r)o.facetSpecs[r]=p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.toObject(e.facetSpecs[r],t)}if(null!=e.boostSpec&&e.hasOwnProperty("boostSpec")&&(o.boostSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.toObject(e.boostSpec,t)),e.params&&(n=Object.keys(e.params)).length){o.params={};for(r=0;r<n.length;++r)o.params[n[r]]=p.google.protobuf.Value.toObject(e.params[n[r]],t)}return null!=e.queryExpansionSpec&&e.hasOwnProperty("queryExpansionSpec")&&(o.queryExpansionSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.toObject(e.queryExpansionSpec,t)),null!=e.spellCorrectionSpec&&e.hasOwnProperty("spellCorrectionSpec")&&(o.spellCorrectionSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.toObject(e.spellCorrectionSpec,t)),null!=e.userPseudoId&&e.hasOwnProperty("userPseudoId")&&(o.userPseudoId=e.userPseudoId),null!=e.contentSearchSpec&&e.hasOwnProperty("contentSearchSpec")&&(o.contentSearchSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.toObject(e.contentSearchSpec,t)),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.cloud.discoveryengine.v1beta.SearchRequest"},O.FacetSpec=(Pe.prototype.facetKey=null,Pe.prototype.limit=0,Pe.prototype.excludedFilterKeys=u.emptyArray,Pe.prototype.enableDynamicPosition=!1,Pe.create=function(e){return new Pe(e)},Pe.encode=function(e,t){if(t=t||a.create(),null!=e.facetKey&&Object.hasOwnProperty.call(e,"facetKey")&&p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.encode(e.facetKey,t.uint32(10).fork()).ldelim(),null!=e.limit&&Object.hasOwnProperty.call(e,"limit")&&t.uint32(16).int32(e.limit),null!=e.excludedFilterKeys&&e.excludedFilterKeys.length)for(var n=0;n<e.excludedFilterKeys.length;++n)t.uint32(26).string(e.excludedFilterKeys[n]);return null!=e.enableDynamicPosition&&Object.hasOwnProperty.call(e,"enableDynamicPosition")&&t.uint32(32).bool(e.enableDynamicPosition),t},Pe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Pe.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.facetKey=p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.decode(e,e.uint32());break;case 2:o.limit=e.int32();break;case 3:o.excludedFilterKeys&&o.excludedFilterKeys.length||(o.excludedFilterKeys=[]),o.excludedFilterKeys.push(e.string());break;case 4:o.enableDynamicPosition=e.bool();break;default:e.skipType(7&r)}}return o},Pe.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Pe.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.facetKey&&e.hasOwnProperty("facetKey")){var t=p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.verify(e.facetKey);if(t)return"facetKey."+t}if(null!=e.limit&&e.hasOwnProperty("limit")&&!u.isInteger(e.limit))return"limit: integer expected";if(null!=e.excludedFilterKeys&&e.hasOwnProperty("excludedFilterKeys")){if(!Array.isArray(e.excludedFilterKeys))return"excludedFilterKeys: array expected";for(var n=0;n<e.excludedFilterKeys.length;++n)if(!u.isString(e.excludedFilterKeys[n]))return"excludedFilterKeys: string[] expected"}return null!=e.enableDynamicPosition&&e.hasOwnProperty("enableDynamicPosition")&&"boolean"!=typeof e.enableDynamicPosition?"enableDynamicPosition: boolean expected":null},Pe.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec)return e;var t=new p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec;if(null!=e.facetKey){if("object"!=typeof e.facetKey)throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.facetKey: object expected");t.facetKey=p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.fromObject(e.facetKey)}if(null!=e.limit&&(t.limit=0|e.limit),e.excludedFilterKeys){if(!Array.isArray(e.excludedFilterKeys))throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.excludedFilterKeys: array expected");t.excludedFilterKeys=[];for(var n=0;n<e.excludedFilterKeys.length;++n)t.excludedFilterKeys[n]=String(e.excludedFilterKeys[n])}return null!=e.enableDynamicPosition&&(t.enableDynamicPosition=Boolean(e.enableDynamicPosition)),t},Pe.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.excludedFilterKeys=[]),t.defaults&&(n.facetKey=null,n.limit=0,n.enableDynamicPosition=!1),null!=e.facetKey&&e.hasOwnProperty("facetKey")&&(n.facetKey=p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.toObject(e.facetKey,t)),null!=e.limit&&e.hasOwnProperty("limit")&&(n.limit=e.limit),e.excludedFilterKeys&&e.excludedFilterKeys.length){n.excludedFilterKeys=[];for(var o=0;o<e.excludedFilterKeys.length;++o)n.excludedFilterKeys[o]=e.excludedFilterKeys[o]}return null!=e.enableDynamicPosition&&e.hasOwnProperty("enableDynamicPosition")&&(n.enableDynamicPosition=e.enableDynamicPosition),n},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.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec"},Pe.FacetKey=(S.prototype.key="",S.prototype.intervals=u.emptyArray,S.prototype.restrictedValues=u.emptyArray,S.prototype.prefixes=u.emptyArray,S.prototype.contains=u.emptyArray,S.prototype.caseInsensitive=!1,S.prototype.orderBy="",S.create=function(e){return new S(e)},S.encode=function(e,t){if(t=t||a.create(),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(10).string(e.key),null!=e.intervals&&e.intervals.length)for(var n=0;n<e.intervals.length;++n)p.google.cloud.discoveryengine.v1beta.Interval.encode(e.intervals[n],t.uint32(18).fork()).ldelim();if(null!=e.restrictedValues&&e.restrictedValues.length)for(n=0;n<e.restrictedValues.length;++n)t.uint32(26).string(e.restrictedValues[n]);if(null!=e.prefixes&&e.prefixes.length)for(n=0;n<e.prefixes.length;++n)t.uint32(34).string(e.prefixes[n]);if(null!=e.contains&&e.contains.length)for(n=0;n<e.contains.length;++n)t.uint32(42).string(e.contains[n]);return null!=e.caseInsensitive&&Object.hasOwnProperty.call(e,"caseInsensitive")&&t.uint32(48).bool(e.caseInsensitive),null!=e.orderBy&&Object.hasOwnProperty.call(e,"orderBy")&&t.uint32(58).string(e.orderBy),t},S.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},S.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.key=e.string();break;case 2:o.intervals&&o.intervals.length||(o.intervals=[]),o.intervals.push(p.google.cloud.discoveryengine.v1beta.Interval.decode(e,e.uint32()));break;case 3:o.restrictedValues&&o.restrictedValues.length||(o.restrictedValues=[]),o.restrictedValues.push(e.string());break;case 4:o.prefixes&&o.prefixes.length||(o.prefixes=[]),o.prefixes.push(e.string());break;case 5:o.contains&&o.contains.length||(o.contains=[]),o.contains.push(e.string());break;case 6:o.caseInsensitive=e.bool();break;case 7:o.orderBy=e.string();break;default:e.skipType(7&r)}}return o},S.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},S.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!u.isString(e.key))return"key: string expected";if(null!=e.intervals&&e.hasOwnProperty("intervals")){if(!Array.isArray(e.intervals))return"intervals: array expected";for(var t=0;t<e.intervals.length;++t){var n=p.google.cloud.discoveryengine.v1beta.Interval.verify(e.intervals[t]);if(n)return"intervals."+n}}if(null!=e.restrictedValues&&e.hasOwnProperty("restrictedValues")){if(!Array.isArray(e.restrictedValues))return"restrictedValues: array expected";for(t=0;t<e.restrictedValues.length;++t)if(!u.isString(e.restrictedValues[t]))return"restrictedValues: string[] expected"}if(null!=e.prefixes&&e.hasOwnProperty("prefixes")){if(!Array.isArray(e.prefixes))return"prefixes: array expected";for(t=0;t<e.prefixes.length;++t)if(!u.isString(e.prefixes[t]))return"prefixes: string[] expected"}if(null!=e.contains&&e.hasOwnProperty("contains")){if(!Array.isArray(e.contains))return"contains: array expected";for(t=0;t<e.contains.length;++t)if(!u.isString(e.contains[t]))return"contains: string[] expected"}return null!=e.caseInsensitive&&e.hasOwnProperty("caseInsensitive")&&"boolean"!=typeof e.caseInsensitive?"caseInsensitive: boolean expected":null!=e.orderBy&&e.hasOwnProperty("orderBy")&&!u.isString(e.orderBy)?"orderBy: string expected":null},S.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey)return e;var t=new p.google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey;if(null!=e.key&&(t.key=String(e.key)),e.intervals){if(!Array.isArray(e.intervals))throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals: array expected");t.intervals=[];for(var n=0;n<e.intervals.length;++n){if("object"!=typeof e.intervals[n])throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.intervals: object expected");t.intervals[n]=p.google.cloud.discoveryengine.v1beta.Interval.fromObject(e.intervals[n])}}if(e.restrictedValues){if(!Array.isArray(e.restrictedValues))throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.restrictedValues: array expected");t.restrictedValues=[];for(n=0;n<e.restrictedValues.length;++n)t.restrictedValues[n]=String(e.restrictedValues[n])}if(e.prefixes){if(!Array.isArray(e.prefixes))throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.prefixes: array expected");t.prefixes=[];for(n=0;n<e.prefixes.length;++n)t.prefixes[n]=String(e.prefixes[n])}if(e.contains){if(!Array.isArray(e.contains))throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey.contains: array expected");t.contains=[];for(n=0;n<e.contains.length;++n)t.contains[n]=String(e.contains[n])}return null!=e.caseInsensitive&&(t.caseInsensitive=Boolean(e.caseInsensitive)),null!=e.orderBy&&(t.orderBy=String(e.orderBy)),t},S.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.intervals=[],n.restrictedValues=[],n.prefixes=[],n.contains=[]),t.defaults&&(n.key="",n.caseInsensitive=!1,n.orderBy=""),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),e.intervals&&e.intervals.length){n.intervals=[];for(var o=0;o<e.intervals.length;++o)n.intervals[o]=p.google.cloud.discoveryengine.v1beta.Interval.toObject(e.intervals[o],t)}if(e.restrictedValues&&e.restrictedValues.length){n.restrictedValues=[];for(o=0;o<e.restrictedValues.length;++o)n.restrictedValues[o]=e.restrictedValues[o]}if(e.prefixes&&e.prefixes.length){n.prefixes=[];for(o=0;o<e.prefixes.length;++o)n.prefixes[o]=e.prefixes[o]}if(e.contains&&e.contains.length){n.contains=[];for(o=0;o<e.contains.length;++o)n.contains[o]=e.contains[o]}return null!=e.caseInsensitive&&e.hasOwnProperty("caseInsensitive")&&(n.caseInsensitive=e.caseInsensitive),null!=e.orderBy&&e.hasOwnProperty("orderBy")&&(n.orderBy=e.orderBy),n},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.cloud.discoveryengine.v1beta.SearchRequest.FacetSpec.FacetKey"},S),Pe),O.BoostSpec=(Te.prototype.conditionBoostSpecs=u.emptyArray,Te.create=function(e){return new Te(e)},Te.encode=function(e,t){if(t=t||a.create(),null!=e.conditionBoostSpecs&&e.conditionBoostSpecs.length)for(var n=0;n<e.conditionBoostSpecs.length;++n)p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.encode(e.conditionBoostSpecs[n],t.uint32(10).fork()).ldelim();return t},Te.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Te.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec;e.pos<n;){var r=e.uint32();r>>>3==1?(o.conditionBoostSpecs&&o.conditionBoostSpecs.length||(o.conditionBoostSpecs=[]),o.conditionBoostSpecs.push(p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.decode(e,e.uint32()))):e.skipType(7&r)}return o},Te.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Te.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.conditionBoostSpecs&&e.hasOwnProperty("conditionBoostSpecs")){if(!Array.isArray(e.conditionBoostSpecs))return"conditionBoostSpecs: array expected";for(var t=0;t<e.conditionBoostSpecs.length;++t){var n=p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.verify(e.conditionBoostSpecs[t]);if(n)return"conditionBoostSpecs."+n}}return null},Te.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec)return e;var t=new p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec;if(e.conditionBoostSpecs){if(!Array.isArray(e.conditionBoostSpecs))throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.conditionBoostSpecs: array expected");t.conditionBoostSpecs=[];for(var n=0;n<e.conditionBoostSpecs.length;++n){if("object"!=typeof e.conditionBoostSpecs[n])throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.conditionBoostSpecs: object expected");t.conditionBoostSpecs[n]=p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.fromObject(e.conditionBoostSpecs[n])}}return t},Te.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.conditionBoostSpecs=[]),e.conditionBoostSpecs&&e.conditionBoostSpecs.length){n.conditionBoostSpecs=[];for(var o=0;o<e.conditionBoostSpecs.length;++o)n.conditionBoostSpecs[o]=p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec.toObject(e.conditionBoostSpecs[o],t)}return n},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.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec"},Te.ConditionBoostSpec=(xe.prototype.condition="",xe.prototype.boost=0,xe.create=function(e){return new xe(e)},xe.encode=function(e,t){return t=t||a.create(),null!=e.condition&&Object.hasOwnProperty.call(e,"condition")&&t.uint32(10).string(e.condition),null!=e.boost&&Object.hasOwnProperty.call(e,"boost")&&t.uint32(21).float(e.boost),t},xe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},xe.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.condition=e.string();break;case 2:o.boost=e.float();break;default:e.skipType(7&r)}}return o},xe.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},xe.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.condition&&e.hasOwnProperty("condition")&&!u.isString(e.condition)?"condition: string expected":null!=e.boost&&e.hasOwnProperty("boost")&&"number"!=typeof e.boost?"boost: number expected":null},xe.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec?e:(t=new p.google.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec,null!=e.condition&&(t.condition=String(e.condition)),null!=e.boost&&(t.boost=Number(e.boost)),t)},xe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.condition="",n.boost=0),null!=e.condition&&e.hasOwnProperty("condition")&&(n.condition=e.condition),null!=e.boost&&e.hasOwnProperty("boost")&&(n.boost=t.json&&!isFinite(e.boost)?String(e.boost):e.boost),n},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.cloud.discoveryengine.v1beta.SearchRequest.BoostSpec.ConditionBoostSpec"},xe),Te),O.QueryExpansionSpec=(ke.prototype.condition=0,ke.create=function(e){return new ke(e)},ke.encode=function(e,t){return t=t||a.create(),null!=e.condition&&Object.hasOwnProperty.call(e,"condition")&&t.uint32(8).int32(e.condition),t},ke.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ke.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec;e.pos<n;){var r=e.uint32();r>>>3==1?o.condition=e.int32():e.skipType(7&r)}return o},ke.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ke.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.condition&&e.hasOwnProperty("condition"))switch(e.condition){default:return"condition: enum value expected";case 0:case 1:case 2:}return null},ke.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec)return e;var t=new p.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec;switch(e.condition){default:"number"==typeof e.condition&&(t.condition=e.condition);break;case"CONDITION_UNSPECIFIED":case 0:t.condition=0;break;case"DISABLED":case 1:t.condition=1;break;case"AUTO":case 2:t.condition=2}return t},ke.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.condition=t.enums===String?"CONDITION_UNSPECIFIED":0),null!=e.condition&&e.hasOwnProperty("condition")&&(n.condition=t.enums!==String||void 0===p.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition[e.condition]?e.condition:p.google.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec.Condition[e.condition]),n},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.cloud.discoveryengine.v1beta.SearchRequest.QueryExpansionSpec"},ke.Condition=(t={},(n=Object.create(t))[t[0]="CONDITION_UNSPECIFIED"]=0,n[t[1]="DISABLED"]=1,n[t[2]="AUTO"]=2,n),ke),O.SpellCorrectionSpec=(Ie.prototype.mode=0,Ie.create=function(e){return new Ie(e)},Ie.encode=function(e,t){return t=t||a.create(),null!=e.mode&&Object.hasOwnProperty.call(e,"mode")&&t.uint32(8).int32(e.mode),t},Ie.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ie.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec;e.pos<n;){var r=e.uint32();r>>>3==1?o.mode=e.int32():e.skipType(7&r)}return o},Ie.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Ie.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.mode&&e.hasOwnProperty("mode"))switch(e.mode){default:return"mode: enum value expected";case 0:case 1:case 2:}return null},Ie.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec)return e;var t=new p.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec;switch(e.mode){default:"number"==typeof e.mode&&(t.mode=e.mode);break;case"MODE_UNSPECIFIED":case 0:t.mode=0;break;case"SUGGESTION_ONLY":case 1:t.mode=1;break;case"AUTO":case 2:t.mode=2}return t},Ie.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.mode=t.enums===String?"MODE_UNSPECIFIED":0),null!=e.mode&&e.hasOwnProperty("mode")&&(n.mode=t.enums!==String||void 0===p.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode[e.mode]?e.mode:p.google.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec.Mode[e.mode]),n},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.cloud.discoveryengine.v1beta.SearchRequest.SpellCorrectionSpec"},Ie.Mode=(t={},(n=Object.create(t))[t[0]="MODE_UNSPECIFIED"]=0,n[t[1]="SUGGESTION_ONLY"]=1,n[t[2]="AUTO"]=2,n),Ie),O.ContentSearchSpec=(De.prototype.snippetSpec=null,De.prototype.summarySpec=null,De.create=function(e){return new De(e)},De.encode=function(e,t){return t=t||a.create(),null!=e.snippetSpec&&Object.hasOwnProperty.call(e,"snippetSpec")&&p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.encode(e.snippetSpec,t.uint32(10).fork()).ldelim(),null!=e.summarySpec&&Object.hasOwnProperty.call(e,"summarySpec")&&p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.encode(e.summarySpec,t.uint32(18).fork()).ldelim(),t},De.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},De.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.snippetSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.decode(e,e.uint32());break;case 2:o.summarySpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},De.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},De.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t;if(null!=e.snippetSpec&&e.hasOwnProperty("snippetSpec")&&(t=p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.verify(e.snippetSpec)))return"snippetSpec."+t;if(null!=e.summarySpec&&e.hasOwnProperty("summarySpec")&&(t=p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.verify(e.summarySpec)))return"summarySpec."+t;return null},De.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec)return e;var t=new p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec;if(null!=e.snippetSpec){if("object"!=typeof e.snippetSpec)throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.snippetSpec: object expected");t.snippetSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.fromObject(e.snippetSpec)}if(null!=e.summarySpec){if("object"!=typeof e.summarySpec)throw TypeError(".google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.summarySpec: object expected");t.summarySpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.fromObject(e.summarySpec)}return t},De.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.snippetSpec=null,n.summarySpec=null),null!=e.snippetSpec&&e.hasOwnProperty("snippetSpec")&&(n.snippetSpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec.toObject(e.snippetSpec,t)),null!=e.summarySpec&&e.hasOwnProperty("summarySpec")&&(n.summarySpec=p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec.toObject(e.summarySpec,t)),n},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.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec"},De.SnippetSpec=(Ee.prototype.maxSnippetCount=0,Ee.prototype.referenceOnly=!1,Ee.create=function(e){return new Ee(e)},Ee.encode=function(e,t){return t=t||a.create(),null!=e.maxSnippetCount&&Object.hasOwnProperty.call(e,"maxSnippetCount")&&t.uint32(8).int32(e.maxSnippetCount),null!=e.referenceOnly&&Object.hasOwnProperty.call(e,"referenceOnly")&&t.uint32(16).bool(e.referenceOnly),t},Ee.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ee.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.maxSnippetCount=e.int32();break;case 2:o.referenceOnly=e.bool();break;default:e.skipType(7&r)}}return o},Ee.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Ee.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.maxSnippetCount&&e.hasOwnProperty("maxSnippetCount")&&!u.isInteger(e.maxSnippetCount)?"maxSnippetCount: integer expected":null!=e.referenceOnly&&e.hasOwnProperty("referenceOnly")&&"boolean"!=typeof e.referenceOnly?"referenceOnly: boolean expected":null},Ee.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec?e:(t=new p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec,null!=e.maxSnippetCount&&(t.maxSnippetCount=0|e.maxSnippetCount),null!=e.referenceOnly&&(t.referenceOnly=Boolean(e.referenceOnly)),t)},Ee.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.maxSnippetCount=0,n.referenceOnly=!1),null!=e.maxSnippetCount&&e.hasOwnProperty("maxSnippetCount")&&(n.maxSnippetCount=e.maxSnippetCount),null!=e.referenceOnly&&e.hasOwnProperty("referenceOnly")&&(n.referenceOnly=e.referenceOnly),n},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.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SnippetSpec"},Ee),De.SummarySpec=(Ce.prototype.summaryResultCount=0,Ce.create=function(e){return new Ce(e)},Ce.encode=function(e,t){return t=t||a.create(),null!=e.summaryResultCount&&Object.hasOwnProperty.call(e,"summaryResultCount")&&t.uint32(8).int32(e.summaryResultCount),t},Ce.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ce.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec;e.pos<n;){var r=e.uint32();r>>>3==1?o.summaryResultCount=e.int32():e.skipType(7&r)}return o},Ce.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Ce.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.summaryResultCount&&e.hasOwnProperty("summaryResultCount")&&!u.isInteger(e.summaryResultCount)?"summaryResultCount: integer expected":null},Ce.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec?e:(t=new p.google.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec,null!=e.summaryResultCount&&(t.summaryResultCount=0|e.summaryResultCount),t)},Ce.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.summaryResultCount=0),null!=e.summaryResultCount&&e.hasOwnProperty("summaryResultCount")&&(n.summaryResultCount=e.summaryResultCount),n},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.cloud.discoveryengine.v1beta.SearchRequest.ContentSearchSpec.SummarySpec"},Ce),De),O),i.SearchResponse=(w.prototype.results=u.emptyArray,w.prototype.facets=u.emptyArray,w.prototype.guidedSearchResult=null,w.prototype.totalSize=0,w.prototype.attributionToken="",w.prototype.nextPageToken="",w.prototype.correctedQuery="",w.prototype.summary=null,w.prototype.appliedControls=u.emptyArray,w.create=function(e){return new w(e)},w.encode=function(e,t){if(t=t||a.create(),null!=e.results&&e.results.length)for(var n=0;n<e.results.length;++n)p.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.encode(e.results[n],t.uint32(10).fork()).ldelim();if(null!=e.facets&&e.facets.length)for(n=0;n<e.facets.length;++n)p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.encode(e.facets[n],t.uint32(18).fork()).ldelim();if(null!=e.totalSize&&Object.hasOwnProperty.call(e,"totalSize")&&t.uint32(24).int32(e.totalSize),null!=e.attributionToken&&Object.hasOwnProperty.call(e,"attributionToken")&&t.uint32(34).string(e.attributionToken),null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(42).string(e.nextPageToken),null!=e.correctedQuery&&Object.hasOwnProperty.call(e,"correctedQuery")&&t.uint32(58).string(e.correctedQuery),null!=e.guidedSearchResult&&Object.hasOwnProperty.call(e,"guidedSearchResult")&&p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.encode(e.guidedSearchResult,t.uint32(66).fork()).ldelim(),null!=e.summary&&Object.hasOwnProperty.call(e,"summary")&&p.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.encode(e.summary,t.uint32(74).fork()).ldelim(),null!=e.appliedControls&&e.appliedControls.length)for(n=0;n<e.appliedControls.length;++n)t.uint32(82).string(e.appliedControls[n]);return t},w.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},w.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchResponse;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.results&&o.results.length||(o.results=[]),o.results.push(p.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.decode(e,e.uint32()));break;case 2:o.facets&&o.facets.length||(o.facets=[]),o.facets.push(p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.decode(e,e.uint32()));break;case 8:o.guidedSearchResult=p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.decode(e,e.uint32());break;case 3:o.totalSize=e.int32();break;case 4:o.attributionToken=e.string();break;case 5:o.nextPageToken=e.string();break;case 7:o.correctedQuery=e.string();break;case 9:o.summary=p.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.decode(e,e.uint32());break;case 10:o.appliedControls&&o.appliedControls.length||(o.appliedControls=[]),o.appliedControls.push(e.string());break;default:e.skipType(7&r)}}return o},w.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},w.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.results&&e.hasOwnProperty("results")){if(!Array.isArray(e.results))return"results: array expected";for(var t=0;t<e.results.length;++t)if(n=p.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.verify(e.results[t]))return"results."+n}if(null!=e.facets&&e.hasOwnProperty("facets")){if(!Array.isArray(e.facets))return"facets: array expected";for(t=0;t<e.facets.length;++t)if(n=p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.verify(e.facets[t]))return"facets."+n}var n;if(null!=e.guidedSearchResult&&e.hasOwnProperty("guidedSearchResult")&&(n=p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.verify(e.guidedSearchResult)))return"guidedSearchResult."+n;if(null!=e.totalSize&&e.hasOwnProperty("totalSize")&&!u.isInteger(e.totalSize))return"totalSize: integer expected";if(null!=e.attributionToken&&e.hasOwnProperty("attributionToken")&&!u.isString(e.attributionToken))return"attributionToken: string expected";if(null!=e.nextPageToken&&e.hasOwnProperty("nextPageToken")&&!u.isString(e.nextPageToken))return"nextPageToken: string expected";if(null!=e.correctedQuery&&e.hasOwnProperty("correctedQuery")&&!u.isString(e.correctedQuery))return"correctedQuery: string expected";if(null!=e.summary&&e.hasOwnProperty("summary")&&(n=p.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.verify(e.summary)))return"summary."+n;if(null!=e.appliedControls&&e.hasOwnProperty("appliedControls")){if(!Array.isArray(e.appliedControls))return"appliedControls: array expected";for(t=0;t<e.appliedControls.length;++t)if(!u.isString(e.appliedControls[t]))return"appliedControls: string[] expected"}return null},w.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.SearchResponse)return e;var t=new p.google.cloud.discoveryengine.v1beta.SearchResponse;if(e.results){if(!Array.isArray(e.results))throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.results: array expected");t.results=[];for(var n=0;n<e.results.length;++n){if("object"!=typeof e.results[n])throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.results: object expected");t.results[n]=p.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.fromObject(e.results[n])}}if(e.facets){if(!Array.isArray(e.facets))throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.facets: array expected");t.facets=[];for(n=0;n<e.facets.length;++n){if("object"!=typeof e.facets[n])throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.facets: object expected");t.facets[n]=p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.fromObject(e.facets[n])}}if(null!=e.guidedSearchResult){if("object"!=typeof e.guidedSearchResult)throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.guidedSearchResult: object expected");t.guidedSearchResult=p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.fromObject(e.guidedSearchResult)}if(null!=e.totalSize&&(t.totalSize=0|e.totalSize),null!=e.attributionToken&&(t.attributionToken=String(e.attributionToken)),null!=e.nextPageToken&&(t.nextPageToken=String(e.nextPageToken)),null!=e.correctedQuery&&(t.correctedQuery=String(e.correctedQuery)),null!=e.summary){if("object"!=typeof e.summary)throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.summary: object expected");t.summary=p.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.fromObject(e.summary)}if(e.appliedControls){if(!Array.isArray(e.appliedControls))throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.appliedControls: array expected");t.appliedControls=[];for(n=0;n<e.appliedControls.length;++n)t.appliedControls[n]=String(e.appliedControls[n])}return t},w.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.results=[],n.facets=[],n.appliedControls=[]),t.defaults&&(n.totalSize=0,n.attributionToken="",n.nextPageToken="",n.correctedQuery="",n.guidedSearchResult=null,n.summary=null),e.results&&e.results.length){n.results=[];for(var o=0;o<e.results.length;++o)n.results[o]=p.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.toObject(e.results[o],t)}if(e.facets&&e.facets.length){n.facets=[];for(o=0;o<e.facets.length;++o)n.facets[o]=p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.toObject(e.facets[o],t)}if(null!=e.totalSize&&e.hasOwnProperty("totalSize")&&(n.totalSize=e.totalSize),null!=e.attributionToken&&e.hasOwnProperty("attributionToken")&&(n.attributionToken=e.attributionToken),null!=e.nextPageToken&&e.hasOwnProperty("nextPageToken")&&(n.nextPageToken=e.nextPageToken),null!=e.correctedQuery&&e.hasOwnProperty("correctedQuery")&&(n.correctedQuery=e.correctedQuery),null!=e.guidedSearchResult&&e.hasOwnProperty("guidedSearchResult")&&(n.guidedSearchResult=p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.toObject(e.guidedSearchResult,t)),null!=e.summary&&e.hasOwnProperty("summary")&&(n.summary=p.google.cloud.discoveryengine.v1beta.SearchResponse.Summary.toObject(e.summary,t)),e.appliedControls&&e.appliedControls.length){n.appliedControls=[];for(o=0;o<e.appliedControls.length;++o)n.appliedControls[o]=e.appliedControls[o]}return n},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.cloud.discoveryengine.v1beta.SearchResponse"},w.SearchResult=(Re.prototype.id="",Re.prototype.document=null,Re.create=function(e){return new Re(e)},Re.encode=function(e,t){return t=t||a.create(),null!=e.id&&Object.hasOwnProperty.call(e,"id")&&t.uint32(10).string(e.id),null!=e.document&&Object.hasOwnProperty.call(e,"document")&&p.google.cloud.discoveryengine.v1beta.Document.encode(e.document,t.uint32(18).fork()).ldelim(),t},Re.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Re.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.id=e.string();break;case 2:o.document=p.google.cloud.discoveryengine.v1beta.Document.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},Re.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Re.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.id&&e.hasOwnProperty("id")&&!u.isString(e.id))return"id: string expected";if(null!=e.document&&e.hasOwnProperty("document")){e=p.google.cloud.discoveryengine.v1beta.Document.verify(e.document);if(e)return"document."+e}return null},Re.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult)return e;var t=new p.google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult;if(null!=e.id&&(t.id=String(e.id)),null!=e.document){if("object"!=typeof e.document)throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.SearchResult.document: object expected");t.document=p.google.cloud.discoveryengine.v1beta.Document.fromObject(e.document)}return t},Re.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.id="",n.document=null),null!=e.id&&e.hasOwnProperty("id")&&(n.id=e.id),null!=e.document&&e.hasOwnProperty("document")&&(n.document=p.google.cloud.discoveryengine.v1beta.Document.toObject(e.document,t)),n},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.cloud.discoveryengine.v1beta.SearchResponse.SearchResult"},Re),w.Facet=(Ne.prototype.key="",Ne.prototype.values=u.emptyArray,Ne.prototype.dynamicFacet=!1,Ne.create=function(e){return new Ne(e)},Ne.encode=function(e,t){if(t=t||a.create(),null!=e.key&&Object.hasOwnProperty.call(e,"key")&&t.uint32(10).string(e.key),null!=e.values&&e.values.length)for(var n=0;n<e.values.length;++n)p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.encode(e.values[n],t.uint32(18).fork()).ldelim();return null!=e.dynamicFacet&&Object.hasOwnProperty.call(e,"dynamicFacet")&&t.uint32(24).bool(e.dynamicFacet),t},Ne.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ne.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.key=e.string();break;case 2:o.values&&o.values.length||(o.values=[]),o.values.push(p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.decode(e,e.uint32()));break;case 3:o.dynamicFacet=e.bool();break;default:e.skipType(7&r)}}return o},Ne.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Ne.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.key&&e.hasOwnProperty("key")&&!u.isString(e.key))return"key: string expected";if(null!=e.values&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var n=p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.verify(e.values[t]);if(n)return"values."+n}}return null!=e.dynamicFacet&&e.hasOwnProperty("dynamicFacet")&&"boolean"!=typeof e.dynamicFacet?"dynamicFacet: boolean expected":null},Ne.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet)return e;var t=new p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet;if(null!=e.key&&(t.key=String(e.key)),e.values){if(!Array.isArray(e.values))throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.Facet.values: array expected");t.values=[];for(var n=0;n<e.values.length;++n){if("object"!=typeof e.values[n])throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.Facet.values: object expected");t.values[n]=p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.fromObject(e.values[n])}}return null!=e.dynamicFacet&&(t.dynamicFacet=Boolean(e.dynamicFacet)),t},Ne.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.values=[]),t.defaults&&(n.key="",n.dynamicFacet=!1),null!=e.key&&e.hasOwnProperty("key")&&(n.key=e.key),e.values&&e.values.length){n.values=[];for(var o=0;o<e.values.length;++o)n.values[o]=p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.toObject(e.values[o],t)}return null!=e.dynamicFacet&&e.hasOwnProperty("dynamicFacet")&&(n.dynamicFacet=e.dynamicFacet),n},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.cloud.discoveryengine.v1beta.SearchResponse.Facet"},Ne.FacetValue=(Ae.prototype.value=null,Ae.prototype.interval=null,Ae.prototype.count=u.Long?u.Long.fromBits(0,0,!1):0,Object.defineProperty(Ae.prototype,"facetValue",{get:u.oneOfGetter(t=["value","interval"]),set:u.oneOfSetter(t)}),Ae.create=function(e){return new Ae(e)},Ae.encode=function(e,t){return t=t||a.create(),null!=e.value&&Object.hasOwnProperty.call(e,"value")&&t.uint32(10).string(e.value),null!=e.interval&&Object.hasOwnProperty.call(e,"interval")&&p.google.cloud.discoveryengine.v1beta.Interval.encode(e.interval,t.uint32(18).fork()).ldelim(),null!=e.count&&Object.hasOwnProperty.call(e,"count")&&t.uint32(24).int64(e.count),t},Ae.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ae.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.value=e.string();break;case 2:o.interval=p.google.cloud.discoveryengine.v1beta.Interval.decode(e,e.uint32());break;case 3:o.count=e.int64();break;default:e.skipType(7&r)}}return o},Ae.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Ae.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.value&&e.hasOwnProperty("value")&&(t.facetValue=1,!u.isString(e.value)))return"value: string expected";if(null!=e.interval&&e.hasOwnProperty("interval")){if(1===t.facetValue)return"facetValue: multiple values";t.facetValue=1;t=p.google.cloud.discoveryengine.v1beta.Interval.verify(e.interval);if(t)return"interval."+t}return null!=e.count&&e.hasOwnProperty("count")&&!(u.isInteger(e.count)||e.count&&u.isInteger(e.count.low)&&u.isInteger(e.count.high))?"count: integer|Long expected":null},Ae.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue)return e;var t=new p.google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue;if(null!=e.value&&(t.value=String(e.value)),null!=e.interval){if("object"!=typeof e.interval)throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue.interval: object expected");t.interval=p.google.cloud.discoveryengine.v1beta.Interval.fromObject(e.interval)}return null!=e.count&&(u.Long?(t.count=u.Long.fromValue(e.count)).unsigned=!1:"string"==typeof e.count?t.count=parseInt(e.count,10):"number"==typeof e.count?t.count=e.count:"object"==typeof e.count&&(t.count=new u.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber())),t},Ae.toObject=function(e,t){var n,o={};return(t=t||{}).defaults&&(u.Long?(n=new u.Long(0,0,!1),o.count=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.count=t.longs===String?"0":0),null!=e.value&&e.hasOwnProperty("value")&&(o.value=e.value,t.oneofs)&&(o.facetValue="value"),null!=e.interval&&e.hasOwnProperty("interval")&&(o.interval=p.google.cloud.discoveryengine.v1beta.Interval.toObject(e.interval,t),t.oneofs)&&(o.facetValue="interval"),null!=e.count&&e.hasOwnProperty("count")&&("number"==typeof e.count?o.count=t.longs===String?String(e.count):e.count:o.count=t.longs===String?u.Long.prototype.toString.call(e.count):t.longs===Number?new u.LongBits(e.count.low>>>0,e.count.high>>>0).toNumber():e.count),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.cloud.discoveryengine.v1beta.SearchResponse.Facet.FacetValue"},Ae),Ne),w.GuidedSearchResult=(Ue.prototype.refinementAttributes=u.emptyArray,Ue.create=function(e){return new Ue(e)},Ue.encode=function(e,t){if(t=t||a.create(),null!=e.refinementAttributes&&e.refinementAttributes.length)for(var n=0;n<e.refinementAttributes.length;++n)p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute.encode(e.refinementAttributes[n],t.uint32(10).fork()).ldelim();return t},Ue.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ue.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult;e.pos<n;){var r=e.uint32();r>>>3==1?(o.refinementAttributes&&o.refinementAttributes.length||(o.refinementAttributes=[]),o.refinementAttributes.push(p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute.decode(e,e.uint32()))):e.skipType(7&r)}return o},Ue.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Ue.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.refinementAttributes&&e.hasOwnProperty("refinementAttributes")){if(!Array.isArray(e.refinementAttributes))return"refinementAttributes: array expected";for(var t=0;t<e.refinementAttributes.length;++t){var n=p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute.verify(e.refinementAttributes[t]);if(n)return"refinementAttributes."+n}}return null},Ue.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult)return e;var t=new p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult;if(e.refinementAttributes){if(!Array.isArray(e.refinementAttributes))throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.refinementAttributes: array expected");t.refinementAttributes=[];for(var n=0;n<e.refinementAttributes.length;++n){if("object"!=typeof e.refinementAttributes[n])throw TypeError(".google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.refinementAttributes: object expected");t.refinementAttributes[n]=p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute.fromObject(e.refinementAttributes[n])}}return t},Ue.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.refinementAttributes=[]),e.refinementAttributes&&e.refinementAttributes.length){n.refinementAttributes=[];for(var o=0;o<e.refinementAttributes.length;++o)n.refinementAttributes[o]=p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute.toObject(e.refinementAttributes[o],t)}return n},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.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult"},Ue.RefinementAttribute=(Le.prototype.attributeKey="",Le.prototype.attributeValue="",Le.create=function(e){return new Le(e)},Le.encode=function(e,t){return t=t||a.create(),null!=e.attributeKey&&Object.hasOwnProperty.call(e,"attributeKey")&&t.uint32(10).string(e.attributeKey),null!=e.attributeValue&&Object.hasOwnProperty.call(e,"attributeValue")&&t.uint32(18).string(e.attributeValue),t},Le.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Le.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.attributeKey=e.string();break;case 2:o.attributeValue=e.string();break;default:e.skipType(7&r)}}return o},Le.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Le.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.attributeKey&&e.hasOwnProperty("attributeKey")&&!u.isString(e.attributeKey)?"attributeKey: string expected":null!=e.attributeValue&&e.hasOwnProperty("attributeValue")&&!u.isString(e.attributeValue)?"attributeValue: string expected":null},Le.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute?e:(t=new p.google.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute,null!=e.attributeKey&&(t.attributeKey=String(e.attributeKey)),null!=e.attributeValue&&(t.attributeValue=String(e.attributeValue)),t)},Le.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.attributeKey="",n.attributeValue=""),null!=e.attributeKey&&e.hasOwnProperty("attributeKey")&&(n.attributeKey=e.attributeKey),null!=e.attributeValue&&e.hasOwnProperty("attributeValue")&&(n.attributeValue=e.attributeValue),n},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.cloud.discoveryengine.v1beta.SearchResponse.GuidedSearchResult.RefinementAttribute"},Le),Ue),w.Summary=(qe.prototype.summaryText="",qe.create=function(e){return new qe(e)},qe.encode=function(e,t){return t=t||a.create(),null!=e.summaryText&&Object.hasOwnProperty.call(e,"summaryText")&&t.uint32(10).string(e.summaryText),t},qe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},qe.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.SearchResponse.Summary;e.pos<n;){var r=e.uint32();r>>>3==1?o.summaryText=e.string():e.skipType(7&r)}return o},qe.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},qe.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.summaryText&&e.hasOwnProperty("summaryText")&&!u.isString(e.summaryText)?"summaryText: string expected":null},qe.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.SearchResponse.Summary?e:(t=new p.google.cloud.discoveryengine.v1beta.SearchResponse.Summary,null!=e.summaryText&&(t.summaryText=String(e.summaryText)),t)},qe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.summaryText=""),null!=e.summaryText&&e.hasOwnProperty("summaryText")&&(n.summaryText=e.summaryText),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.cloud.discoveryengine.v1beta.SearchResponse.Summary"},qe),w),i.UserEventService=(((Ve.prototype=Object.create(o.rpc.Service.prototype)).constructor=Ve).create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(Ve.prototype.writeUserEvent=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.WriteUserEventRequest,p.google.cloud.discoveryengine.v1beta.UserEvent,t,n)},"name",{value:"WriteUserEvent"}),Object.defineProperty(Ve.prototype.collectUserEvent=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.CollectUserEventRequest,p.google.api.HttpBody,t,n)},"name",{value:"CollectUserEvent"}),Object.defineProperty(Ve.prototype.importUserEvents=function e(t,n){return this.rpcCall(e,p.google.cloud.discoveryengine.v1beta.ImportUserEventsRequest,p.google.longrunning.Operation,t,n)},"name",{value:"ImportUserEvents"}),Ve),i.WriteUserEventRequest=(Fe.prototype.parent="",Fe.prototype.userEvent=null,Object.defineProperty(Fe.prototype,"_userEvent",{get:u.oneOfGetter(n=["userEvent"]),set:u.oneOfSetter(n)}),Fe.create=function(e){return new Fe(e)},Fe.encode=function(e,t){return t=t||a.create(),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.userEvent&&Object.hasOwnProperty.call(e,"userEvent")&&p.google.cloud.discoveryengine.v1beta.UserEvent.encode(e.userEvent,t.uint32(18).fork()).ldelim(),t},Fe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Fe.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.WriteUserEventRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.parent=e.string();break;case 2:o.userEvent=p.google.cloud.discoveryengine.v1beta.UserEvent.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},Fe.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Fe.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.parent&&e.hasOwnProperty("parent")&&!u.isString(e.parent))return"parent: string expected";if(null!=e.userEvent&&e.hasOwnProperty("userEvent")){e=p.google.cloud.discoveryengine.v1beta.UserEvent.verify(e.userEvent);if(e)return"userEvent."+e}return null},Fe.fromObject=function(e){if(e instanceof p.google.cloud.discoveryengine.v1beta.WriteUserEventRequest)return e;var t=new p.google.cloud.discoveryengine.v1beta.WriteUserEventRequest;if(null!=e.parent&&(t.parent=String(e.parent)),null!=e.userEvent){if("object"!=typeof e.userEvent)throw TypeError(".google.cloud.discoveryengine.v1beta.WriteUserEventRequest.userEvent: object expected");t.userEvent=p.google.cloud.discoveryengine.v1beta.UserEvent.fromObject(e.userEvent)}return t},Fe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.parent=""),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=e.parent),null!=e.userEvent&&e.hasOwnProperty("userEvent")&&(n.userEvent=p.google.cloud.discoveryengine.v1beta.UserEvent.toObject(e.userEvent,t),t.oneofs)&&(n._userEvent="userEvent"),n},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.cloud.discoveryengine.v1beta.WriteUserEventRequest"},Fe),i.CollectUserEventRequest=(Be.prototype.parent="",Be.prototype.userEvent="",Be.prototype.uri=null,Be.prototype.ets=null,Object.defineProperty(Be.prototype,"_uri",{get:u.oneOfGetter(t=["uri"]),set:u.oneOfSetter(t)}),Object.defineProperty(Be.prototype,"_ets",{get:u.oneOfGetter(t=["ets"]),set:u.oneOfSetter(t)}),Be.create=function(e){return new Be(e)},Be.encode=function(e,t){return t=t||a.create(),null!=e.parent&&Object.hasOwnProperty.call(e,"parent")&&t.uint32(10).string(e.parent),null!=e.userEvent&&Object.hasOwnProperty.call(e,"userEvent")&&t.uint32(18).string(e.userEvent),null!=e.uri&&Object.hasOwnProperty.call(e,"uri")&&t.uint32(26).string(e.uri),null!=e.ets&&Object.hasOwnProperty.call(e,"ets")&&t.uint32(32).int64(e.ets),t},Be.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Be.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.cloud.discoveryengine.v1beta.CollectUserEventRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.parent=e.string();break;case 2:o.userEvent=e.string();break;case 3:o.uri=e.string();break;case 4:o.ets=e.int64();break;default:e.skipType(7&r)}}return o},Be.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Be.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.parent&&e.hasOwnProperty("parent")&&!u.isString(e.parent)?"parent: string expected":null!=e.userEvent&&e.hasOwnProperty("userEvent")&&!u.isString(e.userEvent)?"userEvent: string expected":null!=e.uri&&e.hasOwnProperty("uri")&&!u.isString(e.uri)?"uri: string expected":null==e.ets||!e.hasOwnProperty("ets")||u.isInteger(e.ets)||e.ets&&u.isInteger(e.ets.low)&&u.isInteger(e.ets.high)?null:"ets: integer|Long expected"},Be.fromObject=function(e){var t;return e instanceof p.google.cloud.discoveryengine.v1beta.CollectUserEventRequest?e:(t=new p.google.cloud.discoveryengine.v1beta.CollectUserEventRequest,null!=e.parent&&(t.parent=String(e.parent)),null!=e.userEvent&&(t.userEvent=String(e.userEvent)),null!=e.uri&&(t.uri=String(e.uri)),null!=e.ets&&(u.Long?(t.ets=u.Long.fromValue(e.ets)).unsigned=!1:"string"==typeof e.ets?t.ets=parseInt(e.ets,10):"number"==typeof e.ets?t.ets=e.ets:"object"==typeof e.ets&&(t.ets=new u.LongBits(e.ets.low>>>0,e.ets.high>>>0).toNumber())),t)},Be.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.parent="",n.userEvent=""),null!=e.parent&&e.hasOwnProperty("parent")&&(n.parent=e.parent),null!=e.userEvent&&e.hasOwnProperty("userEvent")&&(n.userEvent=e.userEvent),null!=e.uri&&e.hasOwnProperty("uri")&&(n.uri=e.uri,t.oneofs)&&(n._uri="uri"),null!=e.ets&&e.hasOwnProperty("ets")&&("number"==typeof e.ets?n.ets=t.longs===String?String(e.ets):e.ets:n.ets=t.longs===String?u.Long.prototype.toString.call(e.ets):t.longs===Number?new u.LongBits(e.ets.low>>>0,e.ets.high>>>0).toNumber():e.ets,t.oneofs)&&(n._ets="ets"),n},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.cloud.discoveryengine.v1beta.CollectUserEventRequest"},Be),i),e),r),L.api=((n={}).ResourceDescriptor=(j.prototype.type="",j.prototype.pattern=u.emptyArray,j.prototype.nameField="",j.prototype.history=0,j.prototype.plural="",j.prototype.singular="",j.prototype.style=u.emptyArray,j.create=function(e){return new j(e)},j.encode=function(e,t){if(t=t||a.create(),null!=e.type&&Object.hasOwnProperty.call(e,"type")&&t.uint32(10).string(e.type),null!=e.pattern&&e.pattern.length)for(var n=0;n<e.pattern.length;++n)t.uint32(18).string(e.pattern[n]);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(n=0;n<e.style.length;++n)t.int32(e.style[n]);t.ldelim()}return t},j.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},j.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.ResourceDescriptor;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.type=e.string();break;case 2:o.pattern&&o.pattern.length||(o.pattern=[]),o.pattern.push(e.string());break;case 3:o.nameField=e.string();break;case 4:o.history=e.int32();break;case 5:o.plural=e.string();break;case 6:o.singular=e.string();break;case 10:if(o.style&&o.style.length||(o.style=[]),2==(7&r))for(var i=e.uint32()+e.pos;e.pos<i;)o.style.push(e.int32());else o.style.push(e.int32());break;default:e.skipType(7&r)}}return o},j.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},j.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.type&&e.hasOwnProperty("type")&&!u.isString(e.type))return"type: string expected";if(null!=e.pattern&&e.hasOwnProperty("pattern")){if(!Array.isArray(e.pattern))return"pattern: array expected";for(var t=0;t<e.pattern.length;++t)if(!u.isString(e.pattern[t]))return"pattern: string[] expected"}if(null!=e.nameField&&e.hasOwnProperty("nameField")&&!u.isString(e.nameField))return"nameField: string expected";if(null!=e.history&&e.hasOwnProperty("history"))switch(e.history){default:return"history: enum value expected";case 0:case 1:case 2:}if(null!=e.plural&&e.hasOwnProperty("plural")&&!u.isString(e.plural))return"plural: string expected";if(null!=e.singular&&e.hasOwnProperty("singular")&&!u.isString(e.singular))return"singular: string expected";if(null!=e.style&&e.hasOwnProperty("style")){if(!Array.isArray(e.style))return"style: array expected";for(t=0;t<e.style.length;++t)switch(e.style[t]){default:return"style: enum value[] expected";case 0:case 1:}}return null},j.fromObject=function(e){if(e instanceof p.google.api.ResourceDescriptor)return e;var t=new p.google.api.ResourceDescriptor;if(null!=e.type&&(t.type=String(e.type)),e.pattern){if(!Array.isArray(e.pattern))throw TypeError(".google.api.ResourceDescriptor.pattern: array expected");t.pattern=[];for(var n=0;n<e.pattern.length;++n)t.pattern[n]=String(e.pattern[n])}switch(null!=e.nameField&&(t.nameField=String(e.nameField)),e.history){default:"number"==typeof e.history&&(t.history=e.history);break;case"HISTORY_UNSPECIFIED":case 0:t.history=0;break;case"ORIGINALLY_SINGLE_PATTERN":case 1:t.history=1;break;case"FUTURE_MULTI_PATTERN":case 2:t.history=2}if(null!=e.plural&&(t.plural=String(e.plural)),null!=e.singular&&(t.singular=String(e.singular)),e.style){if(!Array.isArray(e.style))throw TypeError(".google.api.ResourceDescriptor.style: array expected");t.style=[];for(n=0;n<e.style.length;++n)switch(e.style[n]){default:if("number"==typeof e.style[n]){t.style[n]=e.style[n];break}case"STYLE_UNSPECIFIED":case 0:t.style[n]=0;break;case"DECLARATIVE_FRIENDLY":case 1:t.style[n]=1}}return t},j.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.pattern=[],n.style=[]),t.defaults&&(n.type="",n.nameField="",n.history=t.enums===String?"HISTORY_UNSPECIFIED":0,n.plural="",n.singular=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),e.pattern&&e.pattern.length){n.pattern=[];for(var o=0;o<e.pattern.length;++o)n.pattern[o]=e.pattern[o]}if(null!=e.nameField&&e.hasOwnProperty("nameField")&&(n.nameField=e.nameField),null!=e.history&&e.hasOwnProperty("history")&&(n.history=t.enums!==String||void 0===p.google.api.ResourceDescriptor.History[e.history]?e.history:p.google.api.ResourceDescriptor.History[e.history]),null!=e.plural&&e.hasOwnProperty("plural")&&(n.plural=e.plural),null!=e.singular&&e.hasOwnProperty("singular")&&(n.singular=e.singular),e.style&&e.style.length){n.style=[];for(o=0;o<e.style.length;++o)n.style[o]=t.enums!==String||void 0===p.google.api.ResourceDescriptor.Style[e.style[o]]?e.style[o]:p.google.api.ResourceDescriptor.Style[e.style[o]]}return n},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.api.ResourceDescriptor"},j.History=(t={},(i=Object.create(t))[t[0]="HISTORY_UNSPECIFIED"]=0,i[t[1]="ORIGINALLY_SINGLE_PATTERN"]=1,i[t[2]="FUTURE_MULTI_PATTERN"]=2,i),j.Style=(t={},(i=Object.create(t))[t[0]="STYLE_UNSPECIFIED"]=0,i[t[1]="DECLARATIVE_FRIENDLY"]=1,i),j),n.ResourceReference=(Me.prototype.type="",Me.prototype.childType="",Me.create=function(e){return new Me(e)},Me.encode=function(e,t){return t=t||a.create(),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},Me.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Me.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.ResourceReference;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.type=e.string();break;case 2:o.childType=e.string();break;default:e.skipType(7&r)}}return o},Me.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Me.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type&&e.hasOwnProperty("type")&&!u.isString(e.type)?"type: string expected":null!=e.childType&&e.hasOwnProperty("childType")&&!u.isString(e.childType)?"childType: string expected":null},Me.fromObject=function(e){var t;return e instanceof p.google.api.ResourceReference?e:(t=new p.google.api.ResourceReference,null!=e.type&&(t.type=String(e.type)),null!=e.childType&&(t.childType=String(e.childType)),t)},Me.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.type="",n.childType=""),null!=e.type&&e.hasOwnProperty("type")&&(n.type=e.type),null!=e.childType&&e.hasOwnProperty("childType")&&(n.childType=e.childType),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.api.ResourceReference"},Me),n.Http=(Je.prototype.rules=u.emptyArray,Je.prototype.fullyDecodeReservedExpansion=!1,Je.create=function(e){return new Je(e)},Je.encode=function(e,t){if(t=t||a.create(),null!=e.rules&&e.rules.length)for(var n=0;n<e.rules.length;++n)p.google.api.HttpRule.encode(e.rules[n],t.uint32(10).fork()).ldelim();return null!=e.fullyDecodeReservedExpansion&&Object.hasOwnProperty.call(e,"fullyDecodeReservedExpansion")&&t.uint32(16).bool(e.fullyDecodeReservedExpansion),t},Je.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Je.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.Http;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.rules&&o.rules.length||(o.rules=[]),o.rules.push(p.google.api.HttpRule.decode(e,e.uint32()));break;case 2:o.fullyDecodeReservedExpansion=e.bool();break;default:e.skipType(7&r)}}return o},Je.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Je.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.rules&&e.hasOwnProperty("rules")){if(!Array.isArray(e.rules))return"rules: array expected";for(var t=0;t<e.rules.length;++t){var n=p.google.api.HttpRule.verify(e.rules[t]);if(n)return"rules."+n}}return null!=e.fullyDecodeReservedExpansion&&e.hasOwnProperty("fullyDecodeReservedExpansion")&&"boolean"!=typeof e.fullyDecodeReservedExpansion?"fullyDecodeReservedExpansion: boolean expected":null},Je.fromObject=function(e){if(e instanceof p.google.api.Http)return e;var t=new p.google.api.Http;if(e.rules){if(!Array.isArray(e.rules))throw TypeError(".google.api.Http.rules: array expected");t.rules=[];for(var n=0;n<e.rules.length;++n){if("object"!=typeof e.rules[n])throw TypeError(".google.api.Http.rules: object expected");t.rules[n]=p.google.api.HttpRule.fromObject(e.rules[n])}}return null!=e.fullyDecodeReservedExpansion&&(t.fullyDecodeReservedExpansion=Boolean(e.fullyDecodeReservedExpansion)),t},Je.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.rules=[]),t.defaults&&(n.fullyDecodeReservedExpansion=!1),e.rules&&e.rules.length){n.rules=[];for(var o=0;o<e.rules.length;++o)n.rules[o]=p.google.api.HttpRule.toObject(e.rules[o],t)}return null!=e.fullyDecodeReservedExpansion&&e.hasOwnProperty("fullyDecodeReservedExpansion")&&(n.fullyDecodeReservedExpansion=e.fullyDecodeReservedExpansion),n},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.api.Http"},Je),n.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=u.emptyArray,Object.defineProperty(P.prototype,"pattern",{get:u.oneOfGetter(t=["get","put","post","delete","patch","custom"]),set:u.oneOfSetter(t)}),P.create=function(e){return new P(e)},P.encode=function(e,t){if(t=t||a.create(),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")&&p.google.api.CustomHttpPattern.encode(e.custom,t.uint32(66).fork()).ldelim(),null!=e.additionalBindings&&e.additionalBindings.length)for(var n=0;n<e.additionalBindings.length;++n)p.google.api.HttpRule.encode(e.additionalBindings[n],t.uint32(90).fork()).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).ldelim()},P.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.HttpRule;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.selector=e.string();break;case 2:o.get=e.string();break;case 3:o.put=e.string();break;case 4:o.post=e.string();break;case 5:o.delete=e.string();break;case 6:o.patch=e.string();break;case 8:o.custom=p.google.api.CustomHttpPattern.decode(e,e.uint32());break;case 7:o.body=e.string();break;case 12:o.responseBody=e.string();break;case 11:o.additionalBindings&&o.additionalBindings.length||(o.additionalBindings=[]),o.additionalBindings.push(p.google.api.HttpRule.decode(e,e.uint32()));break;default:e.skipType(7&r)}}return o},P.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},P.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t={};if(null!=e.selector&&e.hasOwnProperty("selector")&&!u.isString(e.selector))return"selector: string expected";if(null!=e.get&&e.hasOwnProperty("get")&&(t.pattern=1,!u.isString(e.get)))return"get: string expected";if(null!=e.put&&e.hasOwnProperty("put")){if(1===t.pattern)return"pattern: multiple values";if(t.pattern=1,!u.isString(e.put))return"put: string expected"}if(null!=e.post&&e.hasOwnProperty("post")){if(1===t.pattern)return"pattern: multiple values";if(t.pattern=1,!u.isString(e.post))return"post: string expected"}if(null!=e.delete&&e.hasOwnProperty("delete")){if(1===t.pattern)return"pattern: multiple values";if(t.pattern=1,!u.isString(e.delete))return"delete: string expected"}if(null!=e.patch&&e.hasOwnProperty("patch")){if(1===t.pattern)return"pattern: multiple values";if(t.pattern=1,!u.isString(e.patch))return"patch: string expected"}if(null!=e.custom&&e.hasOwnProperty("custom")){if(1===t.pattern)return"pattern: multiple values";if(t.pattern=1,n=p.google.api.CustomHttpPattern.verify(e.custom))return"custom."+n}if(null!=e.body&&e.hasOwnProperty("body")&&!u.isString(e.body))return"body: string expected";if(null!=e.responseBody&&e.hasOwnProperty("responseBody")&&!u.isString(e.responseBody))return"responseBody: string expected";if(null!=e.additionalBindings&&e.hasOwnProperty("additionalBindings")){if(!Array.isArray(e.additionalBindings))return"additionalBindings: array expected";for(var n,o=0;o<e.additionalBindings.length;++o)if(n=p.google.api.HttpRule.verify(e.additionalBindings[o]))return"additionalBindings."+n}return null},P.fromObject=function(e){if(e instanceof p.google.api.HttpRule)return e;var t=new p.google.api.HttpRule;if(null!=e.selector&&(t.selector=String(e.selector)),null!=e.get&&(t.get=String(e.get)),null!=e.put&&(t.put=String(e.put)),null!=e.post&&(t.post=String(e.post)),null!=e.delete&&(t.delete=String(e.delete)),null!=e.patch&&(t.patch=String(e.patch)),null!=e.custom){if("object"!=typeof e.custom)throw TypeError(".google.api.HttpRule.custom: object expected");t.custom=p.google.api.CustomHttpPattern.fromObject(e.custom)}if(null!=e.body&&(t.body=String(e.body)),null!=e.responseBody&&(t.responseBody=String(e.responseBody)),e.additionalBindings){if(!Array.isArray(e.additionalBindings))throw TypeError(".google.api.HttpRule.additionalBindings: array expected");t.additionalBindings=[];for(var n=0;n<e.additionalBindings.length;++n){if("object"!=typeof e.additionalBindings[n])throw TypeError(".google.api.HttpRule.additionalBindings: object expected");t.additionalBindings[n]=p.google.api.HttpRule.fromObject(e.additionalBindings[n])}}return t},P.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.additionalBindings=[]),t.defaults&&(n.selector="",n.body="",n.responseBody=""),null!=e.selector&&e.hasOwnProperty("selector")&&(n.selector=e.selector),null!=e.get&&e.hasOwnProperty("get")&&(n.get=e.get,t.oneofs)&&(n.pattern="get"),null!=e.put&&e.hasOwnProperty("put")&&(n.put=e.put,t.oneofs)&&(n.pattern="put"),null!=e.post&&e.hasOwnProperty("post")&&(n.post=e.post,t.oneofs)&&(n.pattern="post"),null!=e.delete&&e.hasOwnProperty("delete")&&(n.delete=e.delete,t.oneofs)&&(n.pattern="delete"),null!=e.patch&&e.hasOwnProperty("patch")&&(n.patch=e.patch,t.oneofs)&&(n.pattern="patch"),null!=e.body&&e.hasOwnProperty("body")&&(n.body=e.body),null!=e.custom&&e.hasOwnProperty("custom")&&(n.custom=p.google.api.CustomHttpPattern.toObject(e.custom,t),t.oneofs)&&(n.pattern="custom"),e.additionalBindings&&e.additionalBindings.length){n.additionalBindings=[];for(var o=0;o<e.additionalBindings.length;++o)n.additionalBindings[o]=p.google.api.HttpRule.toObject(e.additionalBindings[o],t)}return null!=e.responseBody&&e.hasOwnProperty("responseBody")&&(n.responseBody=e.responseBody),n},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),n.CustomHttpPattern=(Ge.prototype.kind="",Ge.prototype.path="",Ge.create=function(e){return new Ge(e)},Ge.encode=function(e,t){return t=t||a.create(),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},Ge.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ge.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.CustomHttpPattern;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.kind=e.string();break;case 2:o.path=e.string();break;default:e.skipType(7&r)}}return o},Ge.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Ge.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.kind&&e.hasOwnProperty("kind")&&!u.isString(e.kind)?"kind: string expected":null!=e.path&&e.hasOwnProperty("path")&&!u.isString(e.path)?"path: string expected":null},Ge.fromObject=function(e){var t;return e instanceof p.google.api.CustomHttpPattern?e:(t=new p.google.api.CustomHttpPattern,null!=e.kind&&(t.kind=String(e.kind)),null!=e.path&&(t.path=String(e.path)),t)},Ge.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.kind="",n.path=""),null!=e.kind&&e.hasOwnProperty("kind")&&(n.kind=e.kind),null!=e.path&&e.hasOwnProperty("path")&&(n.path=e.path),n},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.api.CustomHttpPattern"},Ge),n.CommonLanguageSettings=(_e.prototype.referenceDocsUri="",_e.prototype.destinations=u.emptyArray,_e.create=function(e){return new _e(e)},_e.encode=function(e,t){if(t=t||a.create(),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 n=0;n<e.destinations.length;++n)t.int32(e.destinations[n]);t.ldelim()}return t},_e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},_e.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.CommonLanguageSettings;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.referenceDocsUri=e.string();break;case 2:if(o.destinations&&o.destinations.length||(o.destinations=[]),2==(7&r))for(var i=e.uint32()+e.pos;e.pos<i;)o.destinations.push(e.int32());else o.destinations.push(e.int32());break;default:e.skipType(7&r)}}return o},_e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},_e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.referenceDocsUri&&e.hasOwnProperty("referenceDocsUri")&&!u.isString(e.referenceDocsUri))return"referenceDocsUri: string expected";if(null!=e.destinations&&e.hasOwnProperty("destinations")){if(!Array.isArray(e.destinations))return"destinations: array expected";for(var t=0;t<e.destinations.length;++t)switch(e.destinations[t]){default:return"destinations: enum value[] expected";case 0:case 10:case 20:}}return null},_e.fromObject=function(e){if(e instanceof p.google.api.CommonLanguageSettings)return e;var t=new p.google.api.CommonLanguageSettings;if(null!=e.referenceDocsUri&&(t.referenceDocsUri=String(e.referenceDocsUri)),e.destinations){if(!Array.isArray(e.destinations))throw TypeError(".google.api.CommonLanguageSettings.destinations: array expected");t.destinations=[];for(var n=0;n<e.destinations.length;++n)switch(e.destinations[n]){default:if("number"==typeof e.destinations[n]){t.destinations[n]=e.destinations[n];break}case"CLIENT_LIBRARY_DESTINATION_UNSPECIFIED":case 0:t.destinations[n]=0;break;case"GITHUB":case 10:t.destinations[n]=10;break;case"PACKAGE_MANAGER":case 20:t.destinations[n]=20}}return t},_e.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.destinations=[]),t.defaults&&(n.referenceDocsUri=""),null!=e.referenceDocsUri&&e.hasOwnProperty("referenceDocsUri")&&(n.referenceDocsUri=e.referenceDocsUri),e.destinations&&e.destinations.length){n.destinations=[];for(var o=0;o<e.destinations.length;++o)n.destinations[o]=t.enums!==String||void 0===p.google.api.ClientLibraryDestination[e.destinations[o]]?e.destinations[o]:p.google.api.ClientLibraryDestination[e.destinations[o]]}return n},_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.CommonLanguageSettings"},_e),n.ClientLibrarySettings=(T.prototype.version="",T.prototype.launchStage=0,T.prototype.restNumericEnums=!1,T.prototype.javaSettings=null,T.prototype.cppSettings=null,T.prototype.phpSettings=null,T.prototype.pythonSettings=null,T.prototype.nodeSettings=null,T.prototype.dotnetSettings=null,T.prototype.rubySettings=null,T.prototype.goSettings=null,T.create=function(e){return new T(e)},T.encode=function(e,t){return t=t||a.create(),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")&&p.google.api.JavaSettings.encode(e.javaSettings,t.uint32(170).fork()).ldelim(),null!=e.cppSettings&&Object.hasOwnProperty.call(e,"cppSettings")&&p.google.api.CppSettings.encode(e.cppSettings,t.uint32(178).fork()).ldelim(),null!=e.phpSettings&&Object.hasOwnProperty.call(e,"phpSettings")&&p.google.api.PhpSettings.encode(e.phpSettings,t.uint32(186).fork()).ldelim(),null!=e.pythonSettings&&Object.hasOwnProperty.call(e,"pythonSettings")&&p.google.api.PythonSettings.encode(e.pythonSettings,t.uint32(194).fork()).ldelim(),null!=e.nodeSettings&&Object.hasOwnProperty.call(e,"nodeSettings")&&p.google.api.NodeSettings.encode(e.nodeSettings,t.uint32(202).fork()).ldelim(),null!=e.dotnetSettings&&Object.hasOwnProperty.call(e,"dotnetSettings")&&p.google.api.DotnetSettings.encode(e.dotnetSettings,t.uint32(210).fork()).ldelim(),null!=e.rubySettings&&Object.hasOwnProperty.call(e,"rubySettings")&&p.google.api.RubySettings.encode(e.rubySettings,t.uint32(218).fork()).ldelim(),null!=e.goSettings&&Object.hasOwnProperty.call(e,"goSettings")&&p.google.api.GoSettings.encode(e.goSettings,t.uint32(226).fork()).ldelim(),t},T.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},T.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.ClientLibrarySettings;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.version=e.string();break;case 2:o.launchStage=e.int32();break;case 3:o.restNumericEnums=e.bool();break;case 21:o.javaSettings=p.google.api.JavaSettings.decode(e,e.uint32());break;case 22:o.cppSettings=p.google.api.CppSettings.decode(e,e.uint32());break;case 23:o.phpSettings=p.google.api.PhpSettings.decode(e,e.uint32());break;case 24:o.pythonSettings=p.google.api.PythonSettings.decode(e,e.uint32());break;case 25:o.nodeSettings=p.google.api.NodeSettings.decode(e,e.uint32());break;case 26:o.dotnetSettings=p.google.api.DotnetSettings.decode(e,e.uint32());break;case 27:o.rubySettings=p.google.api.RubySettings.decode(e,e.uint32());break;case 28:o.goSettings=p.google.api.GoSettings.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},T.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},T.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.version&&e.hasOwnProperty("version")&&!u.isString(e.version))return"version: string expected";if(null!=e.launchStage&&e.hasOwnProperty("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&&e.hasOwnProperty("restNumericEnums")&&"boolean"!=typeof e.restNumericEnums)return"restNumericEnums: boolean expected";var t;if(null!=e.javaSettings&&e.hasOwnProperty("javaSettings")&&(t=p.google.api.JavaSettings.verify(e.javaSettings)))return"javaSettings."+t;if(null!=e.cppSettings&&e.hasOwnProperty("cppSettings")&&(t=p.google.api.CppSettings.verify(e.cppSettings)))return"cppSettings."+t;if(null!=e.phpSettings&&e.hasOwnProperty("phpSettings")&&(t=p.google.api.PhpSettings.verify(e.phpSettings)))return"phpSettings."+t;if(null!=e.pythonSettings&&e.hasOwnProperty("pythonSettings")&&(t=p.google.api.PythonSettings.verify(e.pythonSettings)))return"pythonSettings."+t;if(null!=e.nodeSettings&&e.hasOwnProperty("nodeSettings")&&(t=p.google.api.NodeSettings.verify(e.nodeSettings)))return"nodeSettings."+t;if(null!=e.dotnetSettings&&e.hasOwnProperty("dotnetSettings")&&(t=p.google.api.DotnetSettings.verify(e.dotnetSettings)))return"dotnetSettings."+t;if(null!=e.rubySettings&&e.hasOwnProperty("rubySettings")&&(t=p.google.api.RubySettings.verify(e.rubySettings)))return"rubySettings."+t;if(null!=e.goSettings&&e.hasOwnProperty("goSettings")&&(t=p.google.api.GoSettings.verify(e.goSettings)))return"goSettings."+t;return null},T.fromObject=function(e){if(e instanceof p.google.api.ClientLibrarySettings)return e;var t=new p.google.api.ClientLibrarySettings;switch(null!=e.version&&(t.version=String(e.version)),e.launchStage){default:"number"==typeof e.launchStage&&(t.launchStage=e.launchStage);break;case"LAUNCH_STAGE_UNSPECIFIED":case 0:t.launchStage=0;break;case"UNIMPLEMENTED":case 6:t.launchStage=6;break;case"PRELAUNCH":case 7:t.launchStage=7;break;case"EARLY_ACCESS":case 1:t.launchStage=1;break;case"ALPHA":case 2:t.launchStage=2;break;case"BETA":case 3:t.launchStage=3;break;case"GA":case 4:t.launchStage=4;break;case"DEPRECATED":case 5:t.launchStage=5}if(null!=e.restNumericEnums&&(t.restNumericEnums=Boolean(e.restNumericEnums)),null!=e.javaSettings){if("object"!=typeof e.javaSettings)throw TypeError(".google.api.ClientLibrarySettings.javaSettings: object expected");t.javaSettings=p.google.api.JavaSettings.fromObject(e.javaSettings)}if(null!=e.cppSettings){if("object"!=typeof e.cppSettings)throw TypeError(".google.api.ClientLibrarySettings.cppSettings: object expected");t.cppSettings=p.google.api.CppSettings.fromObject(e.cppSettings)}if(null!=e.phpSettings){if("object"!=typeof e.phpSettings)throw TypeError(".google.api.ClientLibrarySettings.phpSettings: object expected");t.phpSettings=p.google.api.PhpSettings.fromObject(e.phpSettings)}if(null!=e.pythonSettings){if("object"!=typeof e.pythonSettings)throw TypeError(".google.api.ClientLibrarySettings.pythonSettings: object expected");t.pythonSettings=p.google.api.PythonSettings.fromObject(e.pythonSettings)}if(null!=e.nodeSettings){if("object"!=typeof e.nodeSettings)throw TypeError(".google.api.ClientLibrarySettings.nodeSettings: object expected");t.nodeSettings=p.google.api.NodeSettings.fromObject(e.nodeSettings)}if(null!=e.dotnetSettings){if("object"!=typeof e.dotnetSettings)throw TypeError(".google.api.ClientLibrarySettings.dotnetSettings: object expected");t.dotnetSettings=p.google.api.DotnetSettings.fromObject(e.dotnetSettings)}if(null!=e.rubySettings){if("object"!=typeof e.rubySettings)throw TypeError(".google.api.ClientLibrarySettings.rubySettings: object expected");t.rubySettings=p.google.api.RubySettings.fromObject(e.rubySettings)}if(null!=e.goSettings){if("object"!=typeof e.goSettings)throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected");t.goSettings=p.google.api.GoSettings.fromObject(e.goSettings)}return t},T.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.version="",n.launchStage=t.enums===String?"LAUNCH_STAGE_UNSPECIFIED":0,n.restNumericEnums=!1,n.javaSettings=null,n.cppSettings=null,n.phpSettings=null,n.pythonSettings=null,n.nodeSettings=null,n.dotnetSettings=null,n.rubySettings=null,n.goSettings=null),null!=e.version&&e.hasOwnProperty("version")&&(n.version=e.version),null!=e.launchStage&&e.hasOwnProperty("launchStage")&&(n.launchStage=t.enums!==String||void 0===p.google.api.LaunchStage[e.launchStage]?e.launchStage:p.google.api.LaunchStage[e.launchStage]),null!=e.restNumericEnums&&e.hasOwnProperty("restNumericEnums")&&(n.restNumericEnums=e.restNumericEnums),null!=e.javaSettings&&e.hasOwnProperty("javaSettings")&&(n.javaSettings=p.google.api.JavaSettings.toObject(e.javaSettings,t)),null!=e.cppSettings&&e.hasOwnProperty("cppSettings")&&(n.cppSettings=p.google.api.CppSettings.toObject(e.cppSettings,t)),null!=e.phpSettings&&e.hasOwnProperty("phpSettings")&&(n.phpSettings=p.google.api.PhpSettings.toObject(e.phpSettings,t)),null!=e.pythonSettings&&e.hasOwnProperty("pythonSettings")&&(n.pythonSettings=p.google.api.PythonSettings.toObject(e.pythonSettings,t)),null!=e.nodeSettings&&e.hasOwnProperty("nodeSettings")&&(n.nodeSettings=p.google.api.NodeSettings.toObject(e.nodeSettings,t)),null!=e.dotnetSettings&&e.hasOwnProperty("dotnetSettings")&&(n.dotnetSettings=p.google.api.DotnetSettings.toObject(e.dotnetSettings,t)),null!=e.rubySettings&&e.hasOwnProperty("rubySettings")&&(n.rubySettings=p.google.api.RubySettings.toObject(e.rubySettings,t)),null!=e.goSettings&&e.hasOwnProperty("goSettings")&&(n.goSettings=p.google.api.GoSettings.toObject(e.goSettings,t)),n},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.api.ClientLibrarySettings"},T),n.Publishing=(x.prototype.methodSettings=u.emptyArray,x.prototype.newIssueUri="",x.prototype.documentationUri="",x.prototype.apiShortName="",x.prototype.githubLabel="",x.prototype.codeownerGithubTeams=u.emptyArray,x.prototype.docTagPrefix="",x.prototype.organization=0,x.prototype.librarySettings=u.emptyArray,x.create=function(e){return new x(e)},x.encode=function(e,t){if(t=t||a.create(),null!=e.methodSettings&&e.methodSettings.length)for(var n=0;n<e.methodSettings.length;++n)p.google.api.MethodSettings.encode(e.methodSettings[n],t.uint32(18).fork()).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(n=0;n<e.codeownerGithubTeams.length;++n)t.uint32(842).string(e.codeownerGithubTeams[n]);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(n=0;n<e.librarySettings.length;++n)p.google.api.ClientLibrarySettings.encode(e.librarySettings[n],t.uint32(874).fork()).ldelim();return t},x.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},x.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.Publishing;e.pos<n;){var r=e.uint32();switch(r>>>3){case 2:o.methodSettings&&o.methodSettings.length||(o.methodSettings=[]),o.methodSettings.push(p.google.api.MethodSettings.decode(e,e.uint32()));break;case 101:o.newIssueUri=e.string();break;case 102:o.documentationUri=e.string();break;case 103:o.apiShortName=e.string();break;case 104:o.githubLabel=e.string();break;case 105:o.codeownerGithubTeams&&o.codeownerGithubTeams.length||(o.codeownerGithubTeams=[]),o.codeownerGithubTeams.push(e.string());break;case 106:o.docTagPrefix=e.string();break;case 107:o.organization=e.int32();break;case 109:o.librarySettings&&o.librarySettings.length||(o.librarySettings=[]),o.librarySettings.push(p.google.api.ClientLibrarySettings.decode(e,e.uint32()));break;default:e.skipType(7&r)}}return o},x.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},x.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.methodSettings&&e.hasOwnProperty("methodSettings")){if(!Array.isArray(e.methodSettings))return"methodSettings: array expected";for(var t=0;t<e.methodSettings.length;++t)if(n=p.google.api.MethodSettings.verify(e.methodSettings[t]))return"methodSettings."+n}if(null!=e.newIssueUri&&e.hasOwnProperty("newIssueUri")&&!u.isString(e.newIssueUri))return"newIssueUri: string expected";if(null!=e.documentationUri&&e.hasOwnProperty("documentationUri")&&!u.isString(e.documentationUri))return"documentationUri: string expected";if(null!=e.apiShortName&&e.hasOwnProperty("apiShortName")&&!u.isString(e.apiShortName))return"apiShortName: string expected";if(null!=e.githubLabel&&e.hasOwnProperty("githubLabel")&&!u.isString(e.githubLabel))return"githubLabel: string expected";if(null!=e.codeownerGithubTeams&&e.hasOwnProperty("codeownerGithubTeams")){if(!Array.isArray(e.codeownerGithubTeams))return"codeownerGithubTeams: array expected";for(t=0;t<e.codeownerGithubTeams.length;++t)if(!u.isString(e.codeownerGithubTeams[t]))return"codeownerGithubTeams: string[] expected"}if(null!=e.docTagPrefix&&e.hasOwnProperty("docTagPrefix")&&!u.isString(e.docTagPrefix))return"docTagPrefix: string expected";if(null!=e.organization&&e.hasOwnProperty("organization"))switch(e.organization){default:return"organization: enum value expected";case 0:case 1:case 2:case 3:case 4:}if(null!=e.librarySettings&&e.hasOwnProperty("librarySettings")){if(!Array.isArray(e.librarySettings))return"librarySettings: array expected";for(var n,t=0;t<e.librarySettings.length;++t)if(n=p.google.api.ClientLibrarySettings.verify(e.librarySettings[t]))return"librarySettings."+n}return null},x.fromObject=function(e){if(e instanceof p.google.api.Publishing)return e;var t=new p.google.api.Publishing;if(e.methodSettings){if(!Array.isArray(e.methodSettings))throw TypeError(".google.api.Publishing.methodSettings: array expected");t.methodSettings=[];for(var n=0;n<e.methodSettings.length;++n){if("object"!=typeof e.methodSettings[n])throw TypeError(".google.api.Publishing.methodSettings: object expected");t.methodSettings[n]=p.google.api.MethodSettings.fromObject(e.methodSettings[n])}}if(null!=e.newIssueUri&&(t.newIssueUri=String(e.newIssueUri)),null!=e.documentationUri&&(t.documentationUri=String(e.documentationUri)),null!=e.apiShortName&&(t.apiShortName=String(e.apiShortName)),null!=e.githubLabel&&(t.githubLabel=String(e.githubLabel)),e.codeownerGithubTeams){if(!Array.isArray(e.codeownerGithubTeams))throw TypeError(".google.api.Publishing.codeownerGithubTeams: array expected");t.codeownerGithubTeams=[];for(n=0;n<e.codeownerGithubTeams.length;++n)t.codeownerGithubTeams[n]=String(e.codeownerGithubTeams[n])}switch(null!=e.docTagPrefix&&(t.docTagPrefix=String(e.docTagPrefix)),e.organization){default:"number"==typeof e.organization&&(t.organization=e.organization);break;case"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED":case 0:t.organization=0;break;case"CLOUD":case 1:t.organization=1;break;case"ADS":case 2:t.organization=2;break;case"PHOTOS":case 3:t.organization=3;break;case"STREET_VIEW":case 4:t.organization=4}if(e.librarySettings){if(!Array.isArray(e.librarySettings))throw TypeError(".google.api.Publishing.librarySettings: array expected");t.librarySettings=[];for(n=0;n<e.librarySettings.length;++n){if("object"!=typeof e.librarySettings[n])throw TypeError(".google.api.Publishing.librarySettings: object expected");t.librarySettings[n]=p.google.api.ClientLibrarySettings.fromObject(e.librarySettings[n])}}return t},x.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.methodSettings=[],n.codeownerGithubTeams=[],n.librarySettings=[]),t.defaults&&(n.newIssueUri="",n.documentationUri="",n.apiShortName="",n.githubLabel="",n.docTagPrefix="",n.organization=t.enums===String?"CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED":0),e.methodSettings&&e.methodSettings.length){n.methodSettings=[];for(var o=0;o<e.methodSettings.length;++o)n.methodSettings[o]=p.google.api.MethodSettings.toObject(e.methodSettings[o],t)}if(null!=e.newIssueUri&&e.hasOwnProperty("newIssueUri")&&(n.newIssueUri=e.newIssueUri),null!=e.documentationUri&&e.hasOwnProperty("documentationUri")&&(n.documentationUri=e.documentationUri),null!=e.apiShortName&&e.hasOwnProperty("apiShortName")&&(n.apiShortName=e.apiShortName),null!=e.githubLabel&&e.hasOwnProperty("githubLabel")&&(n.githubLabel=e.githubLabel),e.codeownerGithubTeams&&e.codeownerGithubTeams.length){n.codeownerGithubTeams=[];for(o=0;o<e.codeownerGithubTeams.length;++o)n.codeownerGithubTeams[o]=e.codeownerGithubTeams[o]}if(null!=e.docTagPrefix&&e.hasOwnProperty("docTagPrefix")&&(n.docTagPrefix=e.docTagPrefix),null!=e.organization&&e.hasOwnProperty("organization")&&(n.organization=t.enums!==String||void 0===p.google.api.ClientLibraryOrganization[e.organization]?e.organization:p.google.api.ClientLibraryOrganization[e.organization]),e.librarySettings&&e.librarySettings.length){n.librarySettings=[];for(o=0;o<e.librarySettings.length;++o)n.librarySettings[o]=p.google.api.ClientLibrarySettings.toObject(e.librarySettings[o],t)}return n},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.api.Publishing"},x),n.JavaSettings=(ze.prototype.libraryPackage="",ze.prototype.serviceClassNames=u.emptyObject,ze.prototype.common=null,ze.create=function(e){return new ze(e)},ze.encode=function(e,t){if(t=t||a.create(),null!=e.libraryPackage&&Object.hasOwnProperty.call(e,"libraryPackage")&&t.uint32(10).string(e.libraryPackage),null!=e.serviceClassNames&&Object.hasOwnProperty.call(e,"serviceClassNames"))for(var n=Object.keys(e.serviceClassNames),o=0;o<n.length;++o)t.uint32(18).fork().uint32(10).string(n[o]).uint32(18).string(e.serviceClassNames[n[o]]).ldelim();return null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(26).fork()).ldelim(),t},ze.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ze.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.JavaSettings;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.libraryPackage=e.string();break;case 2:o.serviceClassNames===u.emptyObject&&(o.serviceClassNames={});for(var i=e.uint32()+e.pos,a="",l="";e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:a=e.string();break;case 2:l=e.string();break;default:e.skipType(7&s)}}o.serviceClassNames[a]=l;break;case 3:o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},ze.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ze.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.libraryPackage&&e.hasOwnProperty("libraryPackage")&&!u.isString(e.libraryPackage))return"libraryPackage: string expected";if(null!=e.serviceClassNames&&e.hasOwnProperty("serviceClassNames")){if(!u.isObject(e.serviceClassNames))return"serviceClassNames: object expected";for(var t=Object.keys(e.serviceClassNames),n=0;n<t.length;++n)if(!u.isString(e.serviceClassNames[t[n]]))return"serviceClassNames: string{k:string} expected"}if(null!=e.common&&e.hasOwnProperty("common")){var o=p.google.api.CommonLanguageSettings.verify(e.common);if(o)return"common."+o}return null},ze.fromObject=function(e){if(e instanceof p.google.api.JavaSettings)return e;var t=new p.google.api.JavaSettings;if(null!=e.libraryPackage&&(t.libraryPackage=String(e.libraryPackage)),e.serviceClassNames){if("object"!=typeof e.serviceClassNames)throw TypeError(".google.api.JavaSettings.serviceClassNames: object expected");t.serviceClassNames={};for(var n=Object.keys(e.serviceClassNames),o=0;o<n.length;++o)t.serviceClassNames[n[o]]=String(e.serviceClassNames[n[o]])}if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.JavaSettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},ze.toObject=function(e,t){var n,o={};if(((t=t||{}).objects||t.defaults)&&(o.serviceClassNames={}),t.defaults&&(o.libraryPackage="",o.common=null),null!=e.libraryPackage&&e.hasOwnProperty("libraryPackage")&&(o.libraryPackage=e.libraryPackage),e.serviceClassNames&&(n=Object.keys(e.serviceClassNames)).length){o.serviceClassNames={};for(var r=0;r<n.length;++r)o.serviceClassNames[n[r]]=e.serviceClassNames[n[r]]}return null!=e.common&&e.hasOwnProperty("common")&&(o.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),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.api.JavaSettings"},ze),n.CppSettings=(He.prototype.common=null,He.create=function(e){return new He(e)},He.encode=function(e,t){return t=t||a.create(),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork()).ldelim(),t},He.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},He.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.CppSettings;e.pos<n;){var r=e.uint32();r>>>3==1?o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32()):e.skipType(7&r)}return o},He.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},He.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.common&&e.hasOwnProperty("common")){e=p.google.api.CommonLanguageSettings.verify(e.common);if(e)return"common."+e}return null},He.fromObject=function(e){if(e instanceof p.google.api.CppSettings)return e;var t=new p.google.api.CppSettings;if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.CppSettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},He.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.common=null),null!=e.common&&e.hasOwnProperty("common")&&(n.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),n},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.api.CppSettings"},He),n.PhpSettings=(Qe.prototype.common=null,Qe.create=function(e){return new Qe(e)},Qe.encode=function(e,t){return t=t||a.create(),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork()).ldelim(),t},Qe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Qe.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.PhpSettings;e.pos<n;){var r=e.uint32();r>>>3==1?o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32()):e.skipType(7&r)}return o},Qe.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Qe.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.common&&e.hasOwnProperty("common")){e=p.google.api.CommonLanguageSettings.verify(e.common);if(e)return"common."+e}return null},Qe.fromObject=function(e){if(e instanceof p.google.api.PhpSettings)return e;var t=new p.google.api.PhpSettings;if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.PhpSettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},Qe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.common=null),null!=e.common&&e.hasOwnProperty("common")&&(n.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),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.api.PhpSettings"},Qe),n.PythonSettings=(Ke.prototype.common=null,Ke.create=function(e){return new Ke(e)},Ke.encode=function(e,t){return t=t||a.create(),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork()).ldelim(),t},Ke.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ke.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.PythonSettings;e.pos<n;){var r=e.uint32();r>>>3==1?o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32()):e.skipType(7&r)}return o},Ke.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Ke.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.common&&e.hasOwnProperty("common")){e=p.google.api.CommonLanguageSettings.verify(e.common);if(e)return"common."+e}return null},Ke.fromObject=function(e){if(e instanceof p.google.api.PythonSettings)return e;var t=new p.google.api.PythonSettings;if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.PythonSettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},Ke.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.common=null),null!=e.common&&e.hasOwnProperty("common")&&(n.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),n},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.api.PythonSettings"},Ke),n.NodeSettings=(Ye.prototype.common=null,Ye.create=function(e){return new Ye(e)},Ye.encode=function(e,t){return t=t||a.create(),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork()).ldelim(),t},Ye.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ye.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.NodeSettings;e.pos<n;){var r=e.uint32();r>>>3==1?o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32()):e.skipType(7&r)}return o},Ye.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Ye.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.common&&e.hasOwnProperty("common")){e=p.google.api.CommonLanguageSettings.verify(e.common);if(e)return"common."+e}return null},Ye.fromObject=function(e){if(e instanceof p.google.api.NodeSettings)return e;var t=new p.google.api.NodeSettings;if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.NodeSettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},Ye.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.common=null),null!=e.common&&e.hasOwnProperty("common")&&(n.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),n},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.api.NodeSettings"},Ye),n.DotnetSettings=(We.prototype.common=null,We.create=function(e){return new We(e)},We.encode=function(e,t){return t=t||a.create(),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork()).ldelim(),t},We.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},We.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.DotnetSettings;e.pos<n;){var r=e.uint32();r>>>3==1?o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32()):e.skipType(7&r)}return o},We.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},We.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.common&&e.hasOwnProperty("common")){e=p.google.api.CommonLanguageSettings.verify(e.common);if(e)return"common."+e}return null},We.fromObject=function(e){if(e instanceof p.google.api.DotnetSettings)return e;var t=new p.google.api.DotnetSettings;if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.DotnetSettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},We.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.common=null),null!=e.common&&e.hasOwnProperty("common")&&(n.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),n},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.api.DotnetSettings"},We),n.RubySettings=(Xe.prototype.common=null,Xe.create=function(e){return new Xe(e)},Xe.encode=function(e,t){return t=t||a.create(),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork()).ldelim(),t},Xe.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Xe.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.RubySettings;e.pos<n;){var r=e.uint32();r>>>3==1?o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32()):e.skipType(7&r)}return o},Xe.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Xe.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.common&&e.hasOwnProperty("common")){e=p.google.api.CommonLanguageSettings.verify(e.common);if(e)return"common."+e}return null},Xe.fromObject=function(e){if(e instanceof p.google.api.RubySettings)return e;var t=new p.google.api.RubySettings;if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.RubySettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},Xe.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.common=null),null!=e.common&&e.hasOwnProperty("common")&&(n.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),n},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.api.RubySettings"},Xe),n.GoSettings=(Ze.prototype.common=null,Ze.create=function(e){return new Ze(e)},Ze.encode=function(e,t){return t=t||a.create(),null!=e.common&&Object.hasOwnProperty.call(e,"common")&&p.google.api.CommonLanguageSettings.encode(e.common,t.uint32(10).fork()).ldelim(),t},Ze.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ze.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.GoSettings;e.pos<n;){var r=e.uint32();r>>>3==1?o.common=p.google.api.CommonLanguageSettings.decode(e,e.uint32()):e.skipType(7&r)}return o},Ze.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Ze.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.common&&e.hasOwnProperty("common")){e=p.google.api.CommonLanguageSettings.verify(e.common);if(e)return"common."+e}return null},Ze.fromObject=function(e){if(e instanceof p.google.api.GoSettings)return e;var t=new p.google.api.GoSettings;if(null!=e.common){if("object"!=typeof e.common)throw TypeError(".google.api.GoSettings.common: object expected");t.common=p.google.api.CommonLanguageSettings.fromObject(e.common)}return t},Ze.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.common=null),null!=e.common&&e.hasOwnProperty("common")&&(n.common=p.google.api.CommonLanguageSettings.toObject(e.common,t)),n},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.api.GoSettings"},Ze),n.MethodSettings=($e.prototype.selector="",$e.prototype.longRunning=null,$e.create=function(e){return new $e(e)},$e.encode=function(e,t){return t=t||a.create(),null!=e.selector&&Object.hasOwnProperty.call(e,"selector")&&t.uint32(10).string(e.selector),null!=e.longRunning&&Object.hasOwnProperty.call(e,"longRunning")&&p.google.api.MethodSettings.LongRunning.encode(e.longRunning,t.uint32(18).fork()).ldelim(),t},$e.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},$e.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.MethodSettings;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.selector=e.string();break;case 2:o.longRunning=p.google.api.MethodSettings.LongRunning.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},$e.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},$e.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.selector&&e.hasOwnProperty("selector")&&!u.isString(e.selector))return"selector: string expected";if(null!=e.longRunning&&e.hasOwnProperty("longRunning")){e=p.google.api.MethodSettings.LongRunning.verify(e.longRunning);if(e)return"longRunning."+e}return null},$e.fromObject=function(e){if(e instanceof p.google.api.MethodSettings)return e;var t=new p.google.api.MethodSettings;if(null!=e.selector&&(t.selector=String(e.selector)),null!=e.longRunning){if("object"!=typeof e.longRunning)throw TypeError(".google.api.MethodSettings.longRunning: object expected");t.longRunning=p.google.api.MethodSettings.LongRunning.fromObject(e.longRunning)}return t},$e.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.selector="",n.longRunning=null),null!=e.selector&&e.hasOwnProperty("selector")&&(n.selector=e.selector),null!=e.longRunning&&e.hasOwnProperty("longRunning")&&(n.longRunning=p.google.api.MethodSettings.LongRunning.toObject(e.longRunning,t)),n},$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.MethodSettings"},$e.LongRunning=(et.prototype.initialPollDelay=null,et.prototype.pollDelayMultiplier=0,et.prototype.maxPollDelay=null,et.prototype.totalPollTimeout=null,et.create=function(e){return new et(e)},et.encode=function(e,t){return t=t||a.create(),null!=e.initialPollDelay&&Object.hasOwnProperty.call(e,"initialPollDelay")&&p.google.protobuf.Duration.encode(e.initialPollDelay,t.uint32(10).fork()).ldelim(),null!=e.pollDelayMultiplier&&Object.hasOwnProperty.call(e,"pollDelayMultiplier")&&t.uint32(21).float(e.pollDelayMultiplier),null!=e.maxPollDelay&&Object.hasOwnProperty.call(e,"maxPollDelay")&&p.google.protobuf.Duration.encode(e.maxPollDelay,t.uint32(26).fork()).ldelim(),null!=e.totalPollTimeout&&Object.hasOwnProperty.call(e,"totalPollTimeout")&&p.google.protobuf.Duration.encode(e.totalPollTimeout,t.uint32(34).fork()).ldelim(),t},et.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},et.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.MethodSettings.LongRunning;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.initialPollDelay=p.google.protobuf.Duration.decode(e,e.uint32());break;case 2:o.pollDelayMultiplier=e.float();break;case 3:o.maxPollDelay=p.google.protobuf.Duration.decode(e,e.uint32());break;case 4:o.totalPollTimeout=p.google.protobuf.Duration.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},et.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},et.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t;if(null!=e.initialPollDelay&&e.hasOwnProperty("initialPollDelay")&&(t=p.google.protobuf.Duration.verify(e.initialPollDelay)))return"initialPollDelay."+t;if(null!=e.pollDelayMultiplier&&e.hasOwnProperty("pollDelayMultiplier")&&"number"!=typeof e.pollDelayMultiplier)return"pollDelayMultiplier: number expected";if(null!=e.maxPollDelay&&e.hasOwnProperty("maxPollDelay")&&(t=p.google.protobuf.Duration.verify(e.maxPollDelay)))return"maxPollDelay."+t;if(null!=e.totalPollTimeout&&e.hasOwnProperty("totalPollTimeout")&&(t=p.google.protobuf.Duration.verify(e.totalPollTimeout)))return"totalPollTimeout."+t;return null},et.fromObject=function(e){if(e instanceof p.google.api.MethodSettings.LongRunning)return e;var t=new p.google.api.MethodSettings.LongRunning;if(null!=e.initialPollDelay){if("object"!=typeof e.initialPollDelay)throw TypeError(".google.api.MethodSettings.LongRunning.initialPollDelay: object expected");t.initialPollDelay=p.google.protobuf.Duration.fromObject(e.initialPollDelay)}if(null!=e.pollDelayMultiplier&&(t.pollDelayMultiplier=Number(e.pollDelayMultiplier)),null!=e.maxPollDelay){if("object"!=typeof e.maxPollDelay)throw TypeError(".google.api.MethodSettings.LongRunning.maxPollDelay: object expected");t.maxPollDelay=p.google.protobuf.Duration.fromObject(e.maxPollDelay)}if(null!=e.totalPollTimeout){if("object"!=typeof e.totalPollTimeout)throw TypeError(".google.api.MethodSettings.LongRunning.totalPollTimeout: object expected");t.totalPollTimeout=p.google.protobuf.Duration.fromObject(e.totalPollTimeout)}return t},et.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.initialPollDelay=null,n.pollDelayMultiplier=0,n.maxPollDelay=null,n.totalPollTimeout=null),null!=e.initialPollDelay&&e.hasOwnProperty("initialPollDelay")&&(n.initialPollDelay=p.google.protobuf.Duration.toObject(e.initialPollDelay,t)),null!=e.pollDelayMultiplier&&e.hasOwnProperty("pollDelayMultiplier")&&(n.pollDelayMultiplier=t.json&&!isFinite(e.pollDelayMultiplier)?String(e.pollDelayMultiplier):e.pollDelayMultiplier),null!=e.maxPollDelay&&e.hasOwnProperty("maxPollDelay")&&(n.maxPollDelay=p.google.protobuf.Duration.toObject(e.maxPollDelay,t)),null!=e.totalPollTimeout&&e.hasOwnProperty("totalPollTimeout")&&(n.totalPollTimeout=p.google.protobuf.Duration.toObject(e.totalPollTimeout,t)),n},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.api.MethodSettings.LongRunning"},et),$e),n.ClientLibraryOrganization=(i={},(t=Object.create(i))[i[0]="CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED"]=0,t[i[1]="CLOUD"]=1,t[i[2]="ADS"]=2,t[i[3]="PHOTOS"]=3,t[i[4]="STREET_VIEW"]=4,t),n.ClientLibraryDestination=(i={},(t=Object.create(i))[i[0]="CLIENT_LIBRARY_DESTINATION_UNSPECIFIED"]=0,t[i[10]="GITHUB"]=10,t[i[20]="PACKAGE_MANAGER"]=20,t),n.LaunchStage=(i={},(t=Object.create(i))[i[0]="LAUNCH_STAGE_UNSPECIFIED"]=0,t[i[6]="UNIMPLEMENTED"]=6,t[i[7]="PRELAUNCH"]=7,t[i[1]="EARLY_ACCESS"]=1,t[i[2]="ALPHA"]=2,t[i[3]="BETA"]=3,t[i[4]="GA"]=4,t[i[5]="DEPRECATED"]=5,t),n.FieldBehavior=(i={},(t=Object.create(i))[i[0]="FIELD_BEHAVIOR_UNSPECIFIED"]=0,t[i[1]="OPTIONAL"]=1,t[i[2]="REQUIRED"]=2,t[i[3]="OUTPUT_ONLY"]=3,t[i[4]="INPUT_ONLY"]=4,t[i[5]="IMMUTABLE"]=5,t[i[6]="UNORDERED_LIST"]=6,t[i[7]="NON_EMPTY_DEFAULT"]=7,t),n.HttpBody=(tt.prototype.contentType="",tt.prototype.data=u.newBuffer([]),tt.prototype.extensions=u.emptyArray,tt.create=function(e){return new tt(e)},tt.encode=function(e,t){if(t=t||a.create(),null!=e.contentType&&Object.hasOwnProperty.call(e,"contentType")&&t.uint32(10).string(e.contentType),null!=e.data&&Object.hasOwnProperty.call(e,"data")&&t.uint32(18).bytes(e.data),null!=e.extensions&&e.extensions.length)for(var n=0;n<e.extensions.length;++n)p.google.protobuf.Any.encode(e.extensions[n],t.uint32(26).fork()).ldelim();return t},tt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},tt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.api.HttpBody;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.contentType=e.string();break;case 2:o.data=e.bytes();break;case 3:o.extensions&&o.extensions.length||(o.extensions=[]),o.extensions.push(p.google.protobuf.Any.decode(e,e.uint32()));break;default:e.skipType(7&r)}}return o},tt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},tt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.contentType&&e.hasOwnProperty("contentType")&&!u.isString(e.contentType))return"contentType: string expected";if(null!=e.data&&e.hasOwnProperty("data")&&!(e.data&&"number"==typeof e.data.length||u.isString(e.data)))return"data: buffer expected";if(null!=e.extensions&&e.hasOwnProperty("extensions")){if(!Array.isArray(e.extensions))return"extensions: array expected";for(var t=0;t<e.extensions.length;++t){var n=p.google.protobuf.Any.verify(e.extensions[t]);if(n)return"extensions."+n}}return null},tt.fromObject=function(e){if(e instanceof p.google.api.HttpBody)return e;var t=new p.google.api.HttpBody;if(null!=e.contentType&&(t.contentType=String(e.contentType)),null!=e.data&&("string"==typeof e.data?u.base64.decode(e.data,t.data=u.newBuffer(u.base64.length(e.data)),0):0<=e.data.length&&(t.data=e.data)),e.extensions){if(!Array.isArray(e.extensions))throw TypeError(".google.api.HttpBody.extensions: array expected");t.extensions=[];for(var n=0;n<e.extensions.length;++n){if("object"!=typeof e.extensions[n])throw TypeError(".google.api.HttpBody.extensions: object expected");t.extensions[n]=p.google.protobuf.Any.fromObject(e.extensions[n])}}return t},tt.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.extensions=[]),t.defaults&&(n.contentType="",t.bytes===String?n.data="":(n.data=[],t.bytes!==Array&&(n.data=u.newBuffer(n.data)))),null!=e.contentType&&e.hasOwnProperty("contentType")&&(n.contentType=e.contentType),null!=e.data&&e.hasOwnProperty("data")&&(n.data=t.bytes===String?u.base64.encode(e.data,0,e.data.length):t.bytes===Array?Array.prototype.slice.call(e.data):e.data),e.extensions&&e.extensions.length){n.extensions=[];for(var o=0;o<e.extensions.length;++o)n.extensions[o]=p.google.protobuf.Any.toObject(e.extensions[o],t)}return n},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.api.HttpBody"},tt),n),L.protobuf=((e={}).FileDescriptorSet=(nt.prototype.file=u.emptyArray,nt.create=function(e){return new nt(e)},nt.encode=function(e,t){if(t=t||a.create(),null!=e.file&&e.file.length)for(var n=0;n<e.file.length;++n)p.google.protobuf.FileDescriptorProto.encode(e.file[n],t.uint32(10).fork()).ldelim();return t},nt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},nt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.FileDescriptorSet;e.pos<n;){var r=e.uint32();r>>>3==1?(o.file&&o.file.length||(o.file=[]),o.file.push(p.google.protobuf.FileDescriptorProto.decode(e,e.uint32()))):e.skipType(7&r)}return o},nt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},nt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.file&&e.hasOwnProperty("file")){if(!Array.isArray(e.file))return"file: array expected";for(var t=0;t<e.file.length;++t){var n=p.google.protobuf.FileDescriptorProto.verify(e.file[t]);if(n)return"file."+n}}return null},nt.fromObject=function(e){if(e instanceof p.google.protobuf.FileDescriptorSet)return e;var t=new p.google.protobuf.FileDescriptorSet;if(e.file){if(!Array.isArray(e.file))throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected");t.file=[];for(var n=0;n<e.file.length;++n){if("object"!=typeof e.file[n])throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected");t.file[n]=p.google.protobuf.FileDescriptorProto.fromObject(e.file[n])}}return t},nt.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.file=[]),e.file&&e.file.length){n.file=[];for(var o=0;o<e.file.length;++o)n.file[o]=p.google.protobuf.FileDescriptorProto.toObject(e.file[o],t)}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.protobuf.FileDescriptorSet"},nt),e.FileDescriptorProto=(k.prototype.name="",k.prototype.package="",k.prototype.dependency=u.emptyArray,k.prototype.publicDependency=u.emptyArray,k.prototype.weakDependency=u.emptyArray,k.prototype.messageType=u.emptyArray,k.prototype.enumType=u.emptyArray,k.prototype.service=u.emptyArray,k.prototype.extension=u.emptyArray,k.prototype.options=null,k.prototype.sourceCodeInfo=null,k.prototype.syntax="",k.prototype.edition="",k.create=function(e){return new k(e)},k.encode=function(e,t){if(t=t||a.create(),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 n=0;n<e.dependency.length;++n)t.uint32(26).string(e.dependency[n]);if(null!=e.messageType&&e.messageType.length)for(n=0;n<e.messageType.length;++n)p.google.protobuf.DescriptorProto.encode(e.messageType[n],t.uint32(34).fork()).ldelim();if(null!=e.enumType&&e.enumType.length)for(n=0;n<e.enumType.length;++n)p.google.protobuf.EnumDescriptorProto.encode(e.enumType[n],t.uint32(42).fork()).ldelim();if(null!=e.service&&e.service.length)for(n=0;n<e.service.length;++n)p.google.protobuf.ServiceDescriptorProto.encode(e.service[n],t.uint32(50).fork()).ldelim();if(null!=e.extension&&e.extension.length)for(n=0;n<e.extension.length;++n)p.google.protobuf.FieldDescriptorProto.encode(e.extension[n],t.uint32(58).fork()).ldelim();if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&p.google.protobuf.FileOptions.encode(e.options,t.uint32(66).fork()).ldelim(),null!=e.sourceCodeInfo&&Object.hasOwnProperty.call(e,"sourceCodeInfo")&&p.google.protobuf.SourceCodeInfo.encode(e.sourceCodeInfo,t.uint32(74).fork()).ldelim(),null!=e.publicDependency&&e.publicDependency.length)for(n=0;n<e.publicDependency.length;++n)t.uint32(80).int32(e.publicDependency[n]);if(null!=e.weakDependency&&e.weakDependency.length)for(n=0;n<e.weakDependency.length;++n)t.uint32(88).int32(e.weakDependency[n]);return null!=e.syntax&&Object.hasOwnProperty.call(e,"syntax")&&t.uint32(98).string(e.syntax),null!=e.edition&&Object.hasOwnProperty.call(e,"edition")&&t.uint32(106).string(e.edition),t},k.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},k.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.FileDescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.package=e.string();break;case 3:o.dependency&&o.dependency.length||(o.dependency=[]),o.dependency.push(e.string());break;case 10:if(o.publicDependency&&o.publicDependency.length||(o.publicDependency=[]),2==(7&r))for(var i=e.uint32()+e.pos;e.pos<i;)o.publicDependency.push(e.int32());else o.publicDependency.push(e.int32());break;case 11:if(o.weakDependency&&o.weakDependency.length||(o.weakDependency=[]),2==(7&r))for(i=e.uint32()+e.pos;e.pos<i;)o.weakDependency.push(e.int32());else o.weakDependency.push(e.int32());break;case 4:o.messageType&&o.messageType.length||(o.messageType=[]),o.messageType.push(p.google.protobuf.DescriptorProto.decode(e,e.uint32()));break;case 5:o.enumType&&o.enumType.length||(o.enumType=[]),o.enumType.push(p.google.protobuf.EnumDescriptorProto.decode(e,e.uint32()));break;case 6:o.service&&o.service.length||(o.service=[]),o.service.push(p.google.protobuf.ServiceDescriptorProto.decode(e,e.uint32()));break;case 7:o.extension&&o.extension.length||(o.extension=[]),o.extension.push(p.google.protobuf.FieldDescriptorProto.decode(e,e.uint32()));break;case 8:o.options=p.google.protobuf.FileOptions.decode(e,e.uint32());break;case 9:o.sourceCodeInfo=p.google.protobuf.SourceCodeInfo.decode(e,e.uint32());break;case 12:o.syntax=e.string();break;case 13:o.edition=e.string();break;default:e.skipType(7&r)}}return o},k.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},k.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name))return"name: string expected";if(null!=e.package&&e.hasOwnProperty("package")&&!u.isString(e.package))return"package: string expected";if(null!=e.dependency&&e.hasOwnProperty("dependency")){if(!Array.isArray(e.dependency))return"dependency: array expected";for(var t=0;t<e.dependency.length;++t)if(!u.isString(e.dependency[t]))return"dependency: string[] expected"}if(null!=e.publicDependency&&e.hasOwnProperty("publicDependency")){if(!Array.isArray(e.publicDependency))return"publicDependency: array expected";for(t=0;t<e.publicDependency.length;++t)if(!u.isInteger(e.publicDependency[t]))return"publicDependency: integer[] expected"}if(null!=e.weakDependency&&e.hasOwnProperty("weakDependency")){if(!Array.isArray(e.weakDependency))return"weakDependency: array expected";for(t=0;t<e.weakDependency.length;++t)if(!u.isInteger(e.weakDependency[t]))return"weakDependency: integer[] expected"}if(null!=e.messageType&&e.hasOwnProperty("messageType")){if(!Array.isArray(e.messageType))return"messageType: array expected";for(t=0;t<e.messageType.length;++t)if(n=p.google.protobuf.DescriptorProto.verify(e.messageType[t]))return"messageType."+n}if(null!=e.enumType&&e.hasOwnProperty("enumType")){if(!Array.isArray(e.enumType))return"enumType: array expected";for(t=0;t<e.enumType.length;++t)if(n=p.google.protobuf.EnumDescriptorProto.verify(e.enumType[t]))return"enumType."+n}if(null!=e.service&&e.hasOwnProperty("service")){if(!Array.isArray(e.service))return"service: array expected";for(t=0;t<e.service.length;++t)if(n=p.google.protobuf.ServiceDescriptorProto.verify(e.service[t]))return"service."+n}if(null!=e.extension&&e.hasOwnProperty("extension")){if(!Array.isArray(e.extension))return"extension: array expected";for(t=0;t<e.extension.length;++t)if(n=p.google.protobuf.FieldDescriptorProto.verify(e.extension[t]))return"extension."+n}var n;if(null!=e.options&&e.hasOwnProperty("options")&&(n=p.google.protobuf.FileOptions.verify(e.options)))return"options."+n;if(null!=e.sourceCodeInfo&&e.hasOwnProperty("sourceCodeInfo")&&(n=p.google.protobuf.SourceCodeInfo.verify(e.sourceCodeInfo)))return"sourceCodeInfo."+n;return null!=e.syntax&&e.hasOwnProperty("syntax")&&!u.isString(e.syntax)?"syntax: string expected":null!=e.edition&&e.hasOwnProperty("edition")&&!u.isString(e.edition)?"edition: string expected":null},k.fromObject=function(e){if(e instanceof p.google.protobuf.FileDescriptorProto)return e;var t=new p.google.protobuf.FileDescriptorProto;if(null!=e.name&&(t.name=String(e.name)),null!=e.package&&(t.package=String(e.package)),e.dependency){if(!Array.isArray(e.dependency))throw TypeError(".google.protobuf.FileDescriptorProto.dependency: array expected");t.dependency=[];for(var n=0;n<e.dependency.length;++n)t.dependency[n]=String(e.dependency[n])}if(e.publicDependency){if(!Array.isArray(e.publicDependency))throw TypeError(".google.protobuf.FileDescriptorProto.publicDependency: array expected");t.publicDependency=[];for(n=0;n<e.publicDependency.length;++n)t.publicDependency[n]=0|e.publicDependency[n]}if(e.weakDependency){if(!Array.isArray(e.weakDependency))throw TypeError(".google.protobuf.FileDescriptorProto.weakDependency: array expected");t.weakDependency=[];for(n=0;n<e.weakDependency.length;++n)t.weakDependency[n]=0|e.weakDependency[n]}if(e.messageType){if(!Array.isArray(e.messageType))throw TypeError(".google.protobuf.FileDescriptorProto.messageType: array expected");t.messageType=[];for(n=0;n<e.messageType.length;++n){if("object"!=typeof e.messageType[n])throw TypeError(".google.protobuf.FileDescriptorProto.messageType: object expected");t.messageType[n]=p.google.protobuf.DescriptorProto.fromObject(e.messageType[n])}}if(e.enumType){if(!Array.isArray(e.enumType))throw TypeError(".google.protobuf.FileDescriptorProto.enumType: array expected");t.enumType=[];for(n=0;n<e.enumType.length;++n){if("object"!=typeof e.enumType[n])throw TypeError(".google.protobuf.FileDescriptorProto.enumType: object expected");t.enumType[n]=p.google.protobuf.EnumDescriptorProto.fromObject(e.enumType[n])}}if(e.service){if(!Array.isArray(e.service))throw TypeError(".google.protobuf.FileDescriptorProto.service: array expected");t.service=[];for(n=0;n<e.service.length;++n){if("object"!=typeof e.service[n])throw TypeError(".google.protobuf.FileDescriptorProto.service: object expected");t.service[n]=p.google.protobuf.ServiceDescriptorProto.fromObject(e.service[n])}}if(e.extension){if(!Array.isArray(e.extension))throw TypeError(".google.protobuf.FileDescriptorProto.extension: array expected");t.extension=[];for(n=0;n<e.extension.length;++n){if("object"!=typeof e.extension[n])throw TypeError(".google.protobuf.FileDescriptorProto.extension: object expected");t.extension[n]=p.google.protobuf.FieldDescriptorProto.fromObject(e.extension[n])}}if(null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.FileDescriptorProto.options: object expected");t.options=p.google.protobuf.FileOptions.fromObject(e.options)}if(null!=e.sourceCodeInfo){if("object"!=typeof e.sourceCodeInfo)throw TypeError(".google.protobuf.FileDescriptorProto.sourceCodeInfo: object expected");t.sourceCodeInfo=p.google.protobuf.SourceCodeInfo.fromObject(e.sourceCodeInfo)}return null!=e.syntax&&(t.syntax=String(e.syntax)),null!=e.edition&&(t.edition=String(e.edition)),t},k.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.dependency=[],n.messageType=[],n.enumType=[],n.service=[],n.extension=[],n.publicDependency=[],n.weakDependency=[]),t.defaults&&(n.name="",n.package="",n.options=null,n.sourceCodeInfo=null,n.syntax="",n.edition=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.package&&e.hasOwnProperty("package")&&(n.package=e.package),e.dependency&&e.dependency.length){n.dependency=[];for(var o=0;o<e.dependency.length;++o)n.dependency[o]=e.dependency[o]}if(e.messageType&&e.messageType.length){n.messageType=[];for(o=0;o<e.messageType.length;++o)n.messageType[o]=p.google.protobuf.DescriptorProto.toObject(e.messageType[o],t)}if(e.enumType&&e.enumType.length){n.enumType=[];for(o=0;o<e.enumType.length;++o)n.enumType[o]=p.google.protobuf.EnumDescriptorProto.toObject(e.enumType[o],t)}if(e.service&&e.service.length){n.service=[];for(o=0;o<e.service.length;++o)n.service[o]=p.google.protobuf.ServiceDescriptorProto.toObject(e.service[o],t)}if(e.extension&&e.extension.length){n.extension=[];for(o=0;o<e.extension.length;++o)n.extension[o]=p.google.protobuf.FieldDescriptorProto.toObject(e.extension[o],t)}if(null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.FileOptions.toObject(e.options,t)),null!=e.sourceCodeInfo&&e.hasOwnProperty("sourceCodeInfo")&&(n.sourceCodeInfo=p.google.protobuf.SourceCodeInfo.toObject(e.sourceCodeInfo,t)),e.publicDependency&&e.publicDependency.length){n.publicDependency=[];for(o=0;o<e.publicDependency.length;++o)n.publicDependency[o]=e.publicDependency[o]}if(e.weakDependency&&e.weakDependency.length){n.weakDependency=[];for(o=0;o<e.weakDependency.length;++o)n.weakDependency[o]=e.weakDependency[o]}return null!=e.syntax&&e.hasOwnProperty("syntax")&&(n.syntax=e.syntax),null!=e.edition&&e.hasOwnProperty("edition")&&(n.edition=e.edition),n},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.protobuf.FileDescriptorProto"},k),e.DescriptorProto=(I.prototype.name="",I.prototype.field=u.emptyArray,I.prototype.extension=u.emptyArray,I.prototype.nestedType=u.emptyArray,I.prototype.enumType=u.emptyArray,I.prototype.extensionRange=u.emptyArray,I.prototype.oneofDecl=u.emptyArray,I.prototype.options=null,I.prototype.reservedRange=u.emptyArray,I.prototype.reservedName=u.emptyArray,I.create=function(e){return new I(e)},I.encode=function(e,t){if(t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.field&&e.field.length)for(var n=0;n<e.field.length;++n)p.google.protobuf.FieldDescriptorProto.encode(e.field[n],t.uint32(18).fork()).ldelim();if(null!=e.nestedType&&e.nestedType.length)for(n=0;n<e.nestedType.length;++n)p.google.protobuf.DescriptorProto.encode(e.nestedType[n],t.uint32(26).fork()).ldelim();if(null!=e.enumType&&e.enumType.length)for(n=0;n<e.enumType.length;++n)p.google.protobuf.EnumDescriptorProto.encode(e.enumType[n],t.uint32(34).fork()).ldelim();if(null!=e.extensionRange&&e.extensionRange.length)for(n=0;n<e.extensionRange.length;++n)p.google.protobuf.DescriptorProto.ExtensionRange.encode(e.extensionRange[n],t.uint32(42).fork()).ldelim();if(null!=e.extension&&e.extension.length)for(n=0;n<e.extension.length;++n)p.google.protobuf.FieldDescriptorProto.encode(e.extension[n],t.uint32(50).fork()).ldelim();if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&p.google.protobuf.MessageOptions.encode(e.options,t.uint32(58).fork()).ldelim(),null!=e.oneofDecl&&e.oneofDecl.length)for(n=0;n<e.oneofDecl.length;++n)p.google.protobuf.OneofDescriptorProto.encode(e.oneofDecl[n],t.uint32(66).fork()).ldelim();if(null!=e.reservedRange&&e.reservedRange.length)for(n=0;n<e.reservedRange.length;++n)p.google.protobuf.DescriptorProto.ReservedRange.encode(e.reservedRange[n],t.uint32(74).fork()).ldelim();if(null!=e.reservedName&&e.reservedName.length)for(n=0;n<e.reservedName.length;++n)t.uint32(82).string(e.reservedName[n]);return t},I.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},I.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.DescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.field&&o.field.length||(o.field=[]),o.field.push(p.google.protobuf.FieldDescriptorProto.decode(e,e.uint32()));break;case 6:o.extension&&o.extension.length||(o.extension=[]),o.extension.push(p.google.protobuf.FieldDescriptorProto.decode(e,e.uint32()));break;case 3:o.nestedType&&o.nestedType.length||(o.nestedType=[]),o.nestedType.push(p.google.protobuf.DescriptorProto.decode(e,e.uint32()));break;case 4:o.enumType&&o.enumType.length||(o.enumType=[]),o.enumType.push(p.google.protobuf.EnumDescriptorProto.decode(e,e.uint32()));break;case 5:o.extensionRange&&o.extensionRange.length||(o.extensionRange=[]),o.extensionRange.push(p.google.protobuf.DescriptorProto.ExtensionRange.decode(e,e.uint32()));break;case 8:o.oneofDecl&&o.oneofDecl.length||(o.oneofDecl=[]),o.oneofDecl.push(p.google.protobuf.OneofDescriptorProto.decode(e,e.uint32()));break;case 7:o.options=p.google.protobuf.MessageOptions.decode(e,e.uint32());break;case 9:o.reservedRange&&o.reservedRange.length||(o.reservedRange=[]),o.reservedRange.push(p.google.protobuf.DescriptorProto.ReservedRange.decode(e,e.uint32()));break;case 10:o.reservedName&&o.reservedName.length||(o.reservedName=[]),o.reservedName.push(e.string());break;default:e.skipType(7&r)}}return o},I.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},I.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name))return"name: string expected";if(null!=e.field&&e.hasOwnProperty("field")){if(!Array.isArray(e.field))return"field: array expected";for(var t=0;t<e.field.length;++t)if(n=p.google.protobuf.FieldDescriptorProto.verify(e.field[t]))return"field."+n}if(null!=e.extension&&e.hasOwnProperty("extension")){if(!Array.isArray(e.extension))return"extension: array expected";for(t=0;t<e.extension.length;++t)if(n=p.google.protobuf.FieldDescriptorProto.verify(e.extension[t]))return"extension."+n}if(null!=e.nestedType&&e.hasOwnProperty("nestedType")){if(!Array.isArray(e.nestedType))return"nestedType: array expected";for(t=0;t<e.nestedType.length;++t)if(n=p.google.protobuf.DescriptorProto.verify(e.nestedType[t]))return"nestedType."+n}if(null!=e.enumType&&e.hasOwnProperty("enumType")){if(!Array.isArray(e.enumType))return"enumType: array expected";for(t=0;t<e.enumType.length;++t)if(n=p.google.protobuf.EnumDescriptorProto.verify(e.enumType[t]))return"enumType."+n}if(null!=e.extensionRange&&e.hasOwnProperty("extensionRange")){if(!Array.isArray(e.extensionRange))return"extensionRange: array expected";for(t=0;t<e.extensionRange.length;++t)if(n=p.google.protobuf.DescriptorProto.ExtensionRange.verify(e.extensionRange[t]))return"extensionRange."+n}if(null!=e.oneofDecl&&e.hasOwnProperty("oneofDecl")){if(!Array.isArray(e.oneofDecl))return"oneofDecl: array expected";for(t=0;t<e.oneofDecl.length;++t)if(n=p.google.protobuf.OneofDescriptorProto.verify(e.oneofDecl[t]))return"oneofDecl."+n}if(null!=e.options&&e.hasOwnProperty("options")&&(n=p.google.protobuf.MessageOptions.verify(e.options)))return"options."+n;if(null!=e.reservedRange&&e.hasOwnProperty("reservedRange")){if(!Array.isArray(e.reservedRange))return"reservedRange: array expected";for(var n,t=0;t<e.reservedRange.length;++t)if(n=p.google.protobuf.DescriptorProto.ReservedRange.verify(e.reservedRange[t]))return"reservedRange."+n}if(null!=e.reservedName&&e.hasOwnProperty("reservedName")){if(!Array.isArray(e.reservedName))return"reservedName: array expected";for(t=0;t<e.reservedName.length;++t)if(!u.isString(e.reservedName[t]))return"reservedName: string[] expected"}return null},I.fromObject=function(e){if(e instanceof p.google.protobuf.DescriptorProto)return e;var t=new p.google.protobuf.DescriptorProto;if(null!=e.name&&(t.name=String(e.name)),e.field){if(!Array.isArray(e.field))throw TypeError(".google.protobuf.DescriptorProto.field: array expected");t.field=[];for(var n=0;n<e.field.length;++n){if("object"!=typeof e.field[n])throw TypeError(".google.protobuf.DescriptorProto.field: object expected");t.field[n]=p.google.protobuf.FieldDescriptorProto.fromObject(e.field[n])}}if(e.extension){if(!Array.isArray(e.extension))throw TypeError(".google.protobuf.DescriptorProto.extension: array expected");t.extension=[];for(n=0;n<e.extension.length;++n){if("object"!=typeof e.extension[n])throw TypeError(".google.protobuf.DescriptorProto.extension: object expected");t.extension[n]=p.google.protobuf.FieldDescriptorProto.fromObject(e.extension[n])}}if(e.nestedType){if(!Array.isArray(e.nestedType))throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected");t.nestedType=[];for(n=0;n<e.nestedType.length;++n){if("object"!=typeof e.nestedType[n])throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected");t.nestedType[n]=p.google.protobuf.DescriptorProto.fromObject(e.nestedType[n])}}if(e.enumType){if(!Array.isArray(e.enumType))throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected");t.enumType=[];for(n=0;n<e.enumType.length;++n){if("object"!=typeof e.enumType[n])throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected");t.enumType[n]=p.google.protobuf.EnumDescriptorProto.fromObject(e.enumType[n])}}if(e.extensionRange){if(!Array.isArray(e.extensionRange))throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected");t.extensionRange=[];for(n=0;n<e.extensionRange.length;++n){if("object"!=typeof e.extensionRange[n])throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected");t.extensionRange[n]=p.google.protobuf.DescriptorProto.ExtensionRange.fromObject(e.extensionRange[n])}}if(e.oneofDecl){if(!Array.isArray(e.oneofDecl))throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected");t.oneofDecl=[];for(n=0;n<e.oneofDecl.length;++n){if("object"!=typeof e.oneofDecl[n])throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected");t.oneofDecl[n]=p.google.protobuf.OneofDescriptorProto.fromObject(e.oneofDecl[n])}}if(null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.DescriptorProto.options: object expected");t.options=p.google.protobuf.MessageOptions.fromObject(e.options)}if(e.reservedRange){if(!Array.isArray(e.reservedRange))throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected");t.reservedRange=[];for(n=0;n<e.reservedRange.length;++n){if("object"!=typeof e.reservedRange[n])throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected");t.reservedRange[n]=p.google.protobuf.DescriptorProto.ReservedRange.fromObject(e.reservedRange[n])}}if(e.reservedName){if(!Array.isArray(e.reservedName))throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected");t.reservedName=[];for(n=0;n<e.reservedName.length;++n)t.reservedName[n]=String(e.reservedName[n])}return t},I.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.field=[],n.nestedType=[],n.enumType=[],n.extensionRange=[],n.extension=[],n.oneofDecl=[],n.reservedRange=[],n.reservedName=[]),t.defaults&&(n.name="",n.options=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),e.field&&e.field.length){n.field=[];for(var o=0;o<e.field.length;++o)n.field[o]=p.google.protobuf.FieldDescriptorProto.toObject(e.field[o],t)}if(e.nestedType&&e.nestedType.length){n.nestedType=[];for(o=0;o<e.nestedType.length;++o)n.nestedType[o]=p.google.protobuf.DescriptorProto.toObject(e.nestedType[o],t)}if(e.enumType&&e.enumType.length){n.enumType=[];for(o=0;o<e.enumType.length;++o)n.enumType[o]=p.google.protobuf.EnumDescriptorProto.toObject(e.enumType[o],t)}if(e.extensionRange&&e.extensionRange.length){n.extensionRange=[];for(o=0;o<e.extensionRange.length;++o)n.extensionRange[o]=p.google.protobuf.DescriptorProto.ExtensionRange.toObject(e.extensionRange[o],t)}if(e.extension&&e.extension.length){n.extension=[];for(o=0;o<e.extension.length;++o)n.extension[o]=p.google.protobuf.FieldDescriptorProto.toObject(e.extension[o],t)}if(null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.MessageOptions.toObject(e.options,t)),e.oneofDecl&&e.oneofDecl.length){n.oneofDecl=[];for(o=0;o<e.oneofDecl.length;++o)n.oneofDecl[o]=p.google.protobuf.OneofDescriptorProto.toObject(e.oneofDecl[o],t)}if(e.reservedRange&&e.reservedRange.length){n.reservedRange=[];for(o=0;o<e.reservedRange.length;++o)n.reservedRange[o]=p.google.protobuf.DescriptorProto.ReservedRange.toObject(e.reservedRange[o],t)}if(e.reservedName&&e.reservedName.length){n.reservedName=[];for(o=0;o<e.reservedName.length;++o)n.reservedName[o]=e.reservedName[o]}return n},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.DescriptorProto"},I.ExtensionRange=(ot.prototype.start=0,ot.prototype.end=0,ot.prototype.options=null,ot.create=function(e){return new ot(e)},ot.encode=function(e,t){return t=t||a.create(),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")&&p.google.protobuf.ExtensionRangeOptions.encode(e.options,t.uint32(26).fork()).ldelim(),t},ot.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ot.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.DescriptorProto.ExtensionRange;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.start=e.int32();break;case 2:o.end=e.int32();break;case 3:o.options=p.google.protobuf.ExtensionRangeOptions.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},ot.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ot.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.start&&e.hasOwnProperty("start")&&!u.isInteger(e.start))return"start: integer expected";if(null!=e.end&&e.hasOwnProperty("end")&&!u.isInteger(e.end))return"end: integer expected";if(null!=e.options&&e.hasOwnProperty("options")){e=p.google.protobuf.ExtensionRangeOptions.verify(e.options);if(e)return"options."+e}return null},ot.fromObject=function(e){if(e instanceof p.google.protobuf.DescriptorProto.ExtensionRange)return e;var t=new p.google.protobuf.DescriptorProto.ExtensionRange;if(null!=e.start&&(t.start=0|e.start),null!=e.end&&(t.end=0|e.end),null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected");t.options=p.google.protobuf.ExtensionRangeOptions.fromObject(e.options)}return t},ot.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.start=0,n.end=0,n.options=null),null!=e.start&&e.hasOwnProperty("start")&&(n.start=e.start),null!=e.end&&e.hasOwnProperty("end")&&(n.end=e.end),null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.ExtensionRangeOptions.toObject(e.options,t)),n},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.protobuf.DescriptorProto.ExtensionRange"},ot),I.ReservedRange=(rt.prototype.start=0,rt.prototype.end=0,rt.create=function(e){return new rt(e)},rt.encode=function(e,t){return t=t||a.create(),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},rt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},rt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.DescriptorProto.ReservedRange;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.start=e.int32();break;case 2:o.end=e.int32();break;default:e.skipType(7&r)}}return o},rt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},rt.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.start&&e.hasOwnProperty("start")&&!u.isInteger(e.start)?"start: integer expected":null!=e.end&&e.hasOwnProperty("end")&&!u.isInteger(e.end)?"end: integer expected":null},rt.fromObject=function(e){var t;return e instanceof p.google.protobuf.DescriptorProto.ReservedRange?e:(t=new p.google.protobuf.DescriptorProto.ReservedRange,null!=e.start&&(t.start=0|e.start),null!=e.end&&(t.end=0|e.end),t)},rt.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.start=0,n.end=0),null!=e.start&&e.hasOwnProperty("start")&&(n.start=e.start),null!=e.end&&e.hasOwnProperty("end")&&(n.end=e.end),n},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.protobuf.DescriptorProto.ReservedRange"},rt),I),e.ExtensionRangeOptions=(it.prototype.uninterpretedOption=u.emptyArray,it.create=function(e){return new it(e)},it.encode=function(e,t){if(t=t||a.create(),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();return t},it.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},it.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.ExtensionRangeOptions;e.pos<n;){var r=e.uint32();r>>>3==999?(o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()))):e.skipType(7&r)}return o},it.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},it.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t){var n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]);if(n)return"uninterpretedOption."+n}}return null},it.fromObject=function(e){if(e instanceof p.google.protobuf.ExtensionRangeOptions)return e;var t=new p.google.protobuf.ExtensionRangeOptions;if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.ExtensionRangeOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}return t},it.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[]),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}return 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.protobuf.ExtensionRangeOptions"},it),e.FieldDescriptorProto=(D.prototype.name="",D.prototype.number=0,D.prototype.label=1,D.prototype.type=1,D.prototype.typeName="",D.prototype.extendee="",D.prototype.defaultValue="",D.prototype.oneofIndex=0,D.prototype.jsonName="",D.prototype.options=null,D.prototype.proto3Optional=!1,D.create=function(e){return new D(e)},D.encode=function(e,t){return t=t||a.create(),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")&&p.google.protobuf.FieldOptions.encode(e.options,t.uint32(66).fork()).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},D.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},D.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.FieldDescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 3:o.number=e.int32();break;case 4:o.label=e.int32();break;case 5:o.type=e.int32();break;case 6:o.typeName=e.string();break;case 2:o.extendee=e.string();break;case 7:o.defaultValue=e.string();break;case 9:o.oneofIndex=e.int32();break;case 10:o.jsonName=e.string();break;case 8:o.options=p.google.protobuf.FieldOptions.decode(e,e.uint32());break;case 17:o.proto3Optional=e.bool();break;default:e.skipType(7&r)}}return o},D.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},D.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name))return"name: string expected";if(null!=e.number&&e.hasOwnProperty("number")&&!u.isInteger(e.number))return"number: integer expected";if(null!=e.label&&e.hasOwnProperty("label"))switch(e.label){default:return"label: enum value expected";case 1:case 2:case 3:}if(null!=e.type&&e.hasOwnProperty("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&&e.hasOwnProperty("typeName")&&!u.isString(e.typeName))return"typeName: string expected";if(null!=e.extendee&&e.hasOwnProperty("extendee")&&!u.isString(e.extendee))return"extendee: string expected";if(null!=e.defaultValue&&e.hasOwnProperty("defaultValue")&&!u.isString(e.defaultValue))return"defaultValue: string expected";if(null!=e.oneofIndex&&e.hasOwnProperty("oneofIndex")&&!u.isInteger(e.oneofIndex))return"oneofIndex: integer expected";if(null!=e.jsonName&&e.hasOwnProperty("jsonName")&&!u.isString(e.jsonName))return"jsonName: string expected";if(null!=e.options&&e.hasOwnProperty("options")){var t=p.google.protobuf.FieldOptions.verify(e.options);if(t)return"options."+t}return null!=e.proto3Optional&&e.hasOwnProperty("proto3Optional")&&"boolean"!=typeof e.proto3Optional?"proto3Optional: boolean expected":null},D.fromObject=function(e){if(e instanceof p.google.protobuf.FieldDescriptorProto)return e;var t=new p.google.protobuf.FieldDescriptorProto;switch(null!=e.name&&(t.name=String(e.name)),null!=e.number&&(t.number=0|e.number),e.label){default:"number"==typeof e.label&&(t.label=e.label);break;case"LABEL_OPTIONAL":case 1:t.label=1;break;case"LABEL_REQUIRED":case 2:t.label=2;break;case"LABEL_REPEATED":case 3:t.label=3}switch(e.type){default:"number"==typeof e.type&&(t.type=e.type);break;case"TYPE_DOUBLE":case 1:t.type=1;break;case"TYPE_FLOAT":case 2:t.type=2;break;case"TYPE_INT64":case 3:t.type=3;break;case"TYPE_UINT64":case 4:t.type=4;break;case"TYPE_INT32":case 5:t.type=5;break;case"TYPE_FIXED64":case 6:t.type=6;break;case"TYPE_FIXED32":case 7:t.type=7;break;case"TYPE_BOOL":case 8:t.type=8;break;case"TYPE_STRING":case 9:t.type=9;break;case"TYPE_GROUP":case 10:t.type=10;break;case"TYPE_MESSAGE":case 11:t.type=11;break;case"TYPE_BYTES":case 12:t.type=12;break;case"TYPE_UINT32":case 13:t.type=13;break;case"TYPE_ENUM":case 14:t.type=14;break;case"TYPE_SFIXED32":case 15:t.type=15;break;case"TYPE_SFIXED64":case 16:t.type=16;break;case"TYPE_SINT32":case 17:t.type=17;break;case"TYPE_SINT64":case 18:t.type=18}if(null!=e.typeName&&(t.typeName=String(e.typeName)),null!=e.extendee&&(t.extendee=String(e.extendee)),null!=e.defaultValue&&(t.defaultValue=String(e.defaultValue)),null!=e.oneofIndex&&(t.oneofIndex=0|e.oneofIndex),null!=e.jsonName&&(t.jsonName=String(e.jsonName)),null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.FieldDescriptorProto.options: object expected");t.options=p.google.protobuf.FieldOptions.fromObject(e.options)}return null!=e.proto3Optional&&(t.proto3Optional=Boolean(e.proto3Optional)),t},D.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name="",n.extendee="",n.number=0,n.label=t.enums===String?"LABEL_OPTIONAL":1,n.type=t.enums===String?"TYPE_DOUBLE":1,n.typeName="",n.defaultValue="",n.options=null,n.oneofIndex=0,n.jsonName="",n.proto3Optional=!1),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.extendee&&e.hasOwnProperty("extendee")&&(n.extendee=e.extendee),null!=e.number&&e.hasOwnProperty("number")&&(n.number=e.number),null!=e.label&&e.hasOwnProperty("label")&&(n.label=t.enums!==String||void 0===p.google.protobuf.FieldDescriptorProto.Label[e.label]?e.label:p.google.protobuf.FieldDescriptorProto.Label[e.label]),null!=e.type&&e.hasOwnProperty("type")&&(n.type=t.enums!==String||void 0===p.google.protobuf.FieldDescriptorProto.Type[e.type]?e.type:p.google.protobuf.FieldDescriptorProto.Type[e.type]),null!=e.typeName&&e.hasOwnProperty("typeName")&&(n.typeName=e.typeName),null!=e.defaultValue&&e.hasOwnProperty("defaultValue")&&(n.defaultValue=e.defaultValue),null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.FieldOptions.toObject(e.options,t)),null!=e.oneofIndex&&e.hasOwnProperty("oneofIndex")&&(n.oneofIndex=e.oneofIndex),null!=e.jsonName&&e.hasOwnProperty("jsonName")&&(n.jsonName=e.jsonName),null!=e.proto3Optional&&e.hasOwnProperty("proto3Optional")&&(n.proto3Optional=e.proto3Optional),n},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.protobuf.FieldDescriptorProto"},D.Type=(r={},(i=Object.create(r))[r[1]="TYPE_DOUBLE"]=1,i[r[2]="TYPE_FLOAT"]=2,i[r[3]="TYPE_INT64"]=3,i[r[4]="TYPE_UINT64"]=4,i[r[5]="TYPE_INT32"]=5,i[r[6]="TYPE_FIXED64"]=6,i[r[7]="TYPE_FIXED32"]=7,i[r[8]="TYPE_BOOL"]=8,i[r[9]="TYPE_STRING"]=9,i[r[10]="TYPE_GROUP"]=10,i[r[11]="TYPE_MESSAGE"]=11,i[r[12]="TYPE_BYTES"]=12,i[r[13]="TYPE_UINT32"]=13,i[r[14]="TYPE_ENUM"]=14,i[r[15]="TYPE_SFIXED32"]=15,i[r[16]="TYPE_SFIXED64"]=16,i[r[17]="TYPE_SINT32"]=17,i[r[18]="TYPE_SINT64"]=18,i),D.Label=(r={},(i=Object.create(r))[r[1]="LABEL_OPTIONAL"]=1,i[r[2]="LABEL_REQUIRED"]=2,i[r[3]="LABEL_REPEATED"]=3,i),D),e.OneofDescriptorProto=(at.prototype.name="",at.prototype.options=null,at.create=function(e){return new at(e)},at.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.options&&Object.hasOwnProperty.call(e,"options")&&p.google.protobuf.OneofOptions.encode(e.options,t.uint32(18).fork()).ldelim(),t},at.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},at.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.OneofDescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.options=p.google.protobuf.OneofOptions.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},at.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},at.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name))return"name: string expected";if(null!=e.options&&e.hasOwnProperty("options")){e=p.google.protobuf.OneofOptions.verify(e.options);if(e)return"options."+e}return null},at.fromObject=function(e){if(e instanceof p.google.protobuf.OneofDescriptorProto)return e;var t=new p.google.protobuf.OneofDescriptorProto;if(null!=e.name&&(t.name=String(e.name)),null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected");t.options=p.google.protobuf.OneofOptions.fromObject(e.options)}return t},at.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name="",n.options=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.OneofOptions.toObject(e.options,t)),n},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.protobuf.OneofDescriptorProto"},at),e.EnumDescriptorProto=(lt.prototype.name="",lt.prototype.value=u.emptyArray,lt.prototype.options=null,lt.prototype.reservedRange=u.emptyArray,lt.prototype.reservedName=u.emptyArray,lt.create=function(e){return new lt(e)},lt.encode=function(e,t){if(t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.value&&e.value.length)for(var n=0;n<e.value.length;++n)p.google.protobuf.EnumValueDescriptorProto.encode(e.value[n],t.uint32(18).fork()).ldelim();if(null!=e.options&&Object.hasOwnProperty.call(e,"options")&&p.google.protobuf.EnumOptions.encode(e.options,t.uint32(26).fork()).ldelim(),null!=e.reservedRange&&e.reservedRange.length)for(n=0;n<e.reservedRange.length;++n)p.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(e.reservedRange[n],t.uint32(34).fork()).ldelim();if(null!=e.reservedName&&e.reservedName.length)for(n=0;n<e.reservedName.length;++n)t.uint32(42).string(e.reservedName[n]);return t},lt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},lt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.EnumDescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.value&&o.value.length||(o.value=[]),o.value.push(p.google.protobuf.EnumValueDescriptorProto.decode(e,e.uint32()));break;case 3:o.options=p.google.protobuf.EnumOptions.decode(e,e.uint32());break;case 4:o.reservedRange&&o.reservedRange.length||(o.reservedRange=[]),o.reservedRange.push(p.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(e,e.uint32()));break;case 5:o.reservedName&&o.reservedName.length||(o.reservedName=[]),o.reservedName.push(e.string());break;default:e.skipType(7&r)}}return o},lt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},lt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name))return"name: string expected";if(null!=e.value&&e.hasOwnProperty("value")){if(!Array.isArray(e.value))return"value: array expected";for(var t=0;t<e.value.length;++t)if(n=p.google.protobuf.EnumValueDescriptorProto.verify(e.value[t]))return"value."+n}if(null!=e.options&&e.hasOwnProperty("options")&&(n=p.google.protobuf.EnumOptions.verify(e.options)))return"options."+n;if(null!=e.reservedRange&&e.hasOwnProperty("reservedRange")){if(!Array.isArray(e.reservedRange))return"reservedRange: array expected";for(var n,t=0;t<e.reservedRange.length;++t)if(n=p.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(e.reservedRange[t]))return"reservedRange."+n}if(null!=e.reservedName&&e.hasOwnProperty("reservedName")){if(!Array.isArray(e.reservedName))return"reservedName: array expected";for(t=0;t<e.reservedName.length;++t)if(!u.isString(e.reservedName[t]))return"reservedName: string[] expected"}return null},lt.fromObject=function(e){if(e instanceof p.google.protobuf.EnumDescriptorProto)return e;var t=new p.google.protobuf.EnumDescriptorProto;if(null!=e.name&&(t.name=String(e.name)),e.value){if(!Array.isArray(e.value))throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected");t.value=[];for(var n=0;n<e.value.length;++n){if("object"!=typeof e.value[n])throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected");t.value[n]=p.google.protobuf.EnumValueDescriptorProto.fromObject(e.value[n])}}if(null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected");t.options=p.google.protobuf.EnumOptions.fromObject(e.options)}if(e.reservedRange){if(!Array.isArray(e.reservedRange))throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected");t.reservedRange=[];for(n=0;n<e.reservedRange.length;++n){if("object"!=typeof e.reservedRange[n])throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected");t.reservedRange[n]=p.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(e.reservedRange[n])}}if(e.reservedName){if(!Array.isArray(e.reservedName))throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected");t.reservedName=[];for(n=0;n<e.reservedName.length;++n)t.reservedName[n]=String(e.reservedName[n])}return t},lt.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.value=[],n.reservedRange=[],n.reservedName=[]),t.defaults&&(n.name="",n.options=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),e.value&&e.value.length){n.value=[];for(var o=0;o<e.value.length;++o)n.value[o]=p.google.protobuf.EnumValueDescriptorProto.toObject(e.value[o],t)}if(null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.EnumOptions.toObject(e.options,t)),e.reservedRange&&e.reservedRange.length){n.reservedRange=[];for(o=0;o<e.reservedRange.length;++o)n.reservedRange[o]=p.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(e.reservedRange[o],t)}if(e.reservedName&&e.reservedName.length){n.reservedName=[];for(o=0;o<e.reservedName.length;++o)n.reservedName[o]=e.reservedName[o]}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.protobuf.EnumDescriptorProto"},lt.EnumReservedRange=(st.prototype.start=0,st.prototype.end=0,st.create=function(e){return new st(e)},st.encode=function(e,t){return t=t||a.create(),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},st.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},st.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.EnumDescriptorProto.EnumReservedRange;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.start=e.int32();break;case 2:o.end=e.int32();break;default:e.skipType(7&r)}}return o},st.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},st.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.start&&e.hasOwnProperty("start")&&!u.isInteger(e.start)?"start: integer expected":null!=e.end&&e.hasOwnProperty("end")&&!u.isInteger(e.end)?"end: integer expected":null},st.fromObject=function(e){var t;return e instanceof p.google.protobuf.EnumDescriptorProto.EnumReservedRange?e:(t=new p.google.protobuf.EnumDescriptorProto.EnumReservedRange,null!=e.start&&(t.start=0|e.start),null!=e.end&&(t.end=0|e.end),t)},st.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.start=0,n.end=0),null!=e.start&&e.hasOwnProperty("start")&&(n.start=e.start),null!=e.end&&e.hasOwnProperty("end")&&(n.end=e.end),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.protobuf.EnumDescriptorProto.EnumReservedRange"},st),lt),e.EnumValueDescriptorProto=(ct.prototype.name="",ct.prototype.number=0,ct.prototype.options=null,ct.create=function(e){return new ct(e)},ct.encode=function(e,t){return t=t||a.create(),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")&&p.google.protobuf.EnumValueOptions.encode(e.options,t.uint32(26).fork()).ldelim(),t},ct.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ct.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.EnumValueDescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.number=e.int32();break;case 3:o.options=p.google.protobuf.EnumValueOptions.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},ct.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ct.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name))return"name: string expected";if(null!=e.number&&e.hasOwnProperty("number")&&!u.isInteger(e.number))return"number: integer expected";if(null!=e.options&&e.hasOwnProperty("options")){e=p.google.protobuf.EnumValueOptions.verify(e.options);if(e)return"options."+e}return null},ct.fromObject=function(e){if(e instanceof p.google.protobuf.EnumValueDescriptorProto)return e;var t=new p.google.protobuf.EnumValueDescriptorProto;if(null!=e.name&&(t.name=String(e.name)),null!=e.number&&(t.number=0|e.number),null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected");t.options=p.google.protobuf.EnumValueOptions.fromObject(e.options)}return t},ct.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name="",n.number=0,n.options=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.number&&e.hasOwnProperty("number")&&(n.number=e.number),null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.EnumValueOptions.toObject(e.options,t)),n},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.protobuf.EnumValueDescriptorProto"},ct),e.ServiceDescriptorProto=(ut.prototype.name="",ut.prototype.method=u.emptyArray,ut.prototype.options=null,ut.create=function(e){return new ut(e)},ut.encode=function(e,t){if(t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.method&&e.method.length)for(var n=0;n<e.method.length;++n)p.google.protobuf.MethodDescriptorProto.encode(e.method[n],t.uint32(18).fork()).ldelim();return null!=e.options&&Object.hasOwnProperty.call(e,"options")&&p.google.protobuf.ServiceOptions.encode(e.options,t.uint32(26).fork()).ldelim(),t},ut.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ut.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.ServiceDescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.method&&o.method.length||(o.method=[]),o.method.push(p.google.protobuf.MethodDescriptorProto.decode(e,e.uint32()));break;case 3:o.options=p.google.protobuf.ServiceOptions.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},ut.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ut.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name))return"name: string expected";if(null!=e.method&&e.hasOwnProperty("method")){if(!Array.isArray(e.method))return"method: array expected";for(var t=0;t<e.method.length;++t)if(n=p.google.protobuf.MethodDescriptorProto.verify(e.method[t]))return"method."+n}var n;if(null!=e.options&&e.hasOwnProperty("options")&&(n=p.google.protobuf.ServiceOptions.verify(e.options)))return"options."+n;return null},ut.fromObject=function(e){if(e instanceof p.google.protobuf.ServiceDescriptorProto)return e;var t=new p.google.protobuf.ServiceDescriptorProto;if(null!=e.name&&(t.name=String(e.name)),e.method){if(!Array.isArray(e.method))throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected");t.method=[];for(var n=0;n<e.method.length;++n){if("object"!=typeof e.method[n])throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected");t.method[n]=p.google.protobuf.MethodDescriptorProto.fromObject(e.method[n])}}if(null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected");t.options=p.google.protobuf.ServiceOptions.fromObject(e.options)}return t},ut.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.method=[]),t.defaults&&(n.name="",n.options=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),e.method&&e.method.length){n.method=[];for(var o=0;o<e.method.length;++o)n.method[o]=p.google.protobuf.MethodDescriptorProto.toObject(e.method[o],t)}return null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.ServiceOptions.toObject(e.options,t)),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.protobuf.ServiceDescriptorProto"},ut),e.MethodDescriptorProto=(pt.prototype.name="",pt.prototype.inputType="",pt.prototype.outputType="",pt.prototype.options=null,pt.prototype.clientStreaming=!1,pt.prototype.serverStreaming=!1,pt.create=function(e){return new pt(e)},pt.encode=function(e,t){return t=t||a.create(),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")&&p.google.protobuf.MethodOptions.encode(e.options,t.uint32(34).fork()).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},pt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},pt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.MethodDescriptorProto;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.inputType=e.string();break;case 3:o.outputType=e.string();break;case 4:o.options=p.google.protobuf.MethodOptions.decode(e,e.uint32());break;case 5:o.clientStreaming=e.bool();break;case 6:o.serverStreaming=e.bool();break;default:e.skipType(7&r)}}return o},pt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},pt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name))return"name: string expected";if(null!=e.inputType&&e.hasOwnProperty("inputType")&&!u.isString(e.inputType))return"inputType: string expected";if(null!=e.outputType&&e.hasOwnProperty("outputType")&&!u.isString(e.outputType))return"outputType: string expected";if(null!=e.options&&e.hasOwnProperty("options")){var t=p.google.protobuf.MethodOptions.verify(e.options);if(t)return"options."+t}return null!=e.clientStreaming&&e.hasOwnProperty("clientStreaming")&&"boolean"!=typeof e.clientStreaming?"clientStreaming: boolean expected":null!=e.serverStreaming&&e.hasOwnProperty("serverStreaming")&&"boolean"!=typeof e.serverStreaming?"serverStreaming: boolean expected":null},pt.fromObject=function(e){if(e instanceof p.google.protobuf.MethodDescriptorProto)return e;var t=new p.google.protobuf.MethodDescriptorProto;if(null!=e.name&&(t.name=String(e.name)),null!=e.inputType&&(t.inputType=String(e.inputType)),null!=e.outputType&&(t.outputType=String(e.outputType)),null!=e.options){if("object"!=typeof e.options)throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected");t.options=p.google.protobuf.MethodOptions.fromObject(e.options)}return null!=e.clientStreaming&&(t.clientStreaming=Boolean(e.clientStreaming)),null!=e.serverStreaming&&(t.serverStreaming=Boolean(e.serverStreaming)),t},pt.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name="",n.inputType="",n.outputType="",n.options=null,n.clientStreaming=!1,n.serverStreaming=!1),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.inputType&&e.hasOwnProperty("inputType")&&(n.inputType=e.inputType),null!=e.outputType&&e.hasOwnProperty("outputType")&&(n.outputType=e.outputType),null!=e.options&&e.hasOwnProperty("options")&&(n.options=p.google.protobuf.MethodOptions.toObject(e.options,t)),null!=e.clientStreaming&&e.hasOwnProperty("clientStreaming")&&(n.clientStreaming=e.clientStreaming),null!=e.serverStreaming&&e.hasOwnProperty("serverStreaming")&&(n.serverStreaming=e.serverStreaming),n},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.protobuf.MethodDescriptorProto"},pt),e.FileOptions=(E.prototype.javaPackage="",E.prototype.javaOuterClassname="",E.prototype.javaMultipleFiles=!1,E.prototype.javaGenerateEqualsAndHash=!1,E.prototype.javaStringCheckUtf8=!1,E.prototype.optimizeFor=1,E.prototype.goPackage="",E.prototype.ccGenericServices=!1,E.prototype.javaGenericServices=!1,E.prototype.pyGenericServices=!1,E.prototype.phpGenericServices=!1,E.prototype.deprecated=!1,E.prototype.ccEnableArenas=!0,E.prototype.objcClassPrefix="",E.prototype.csharpNamespace="",E.prototype.swiftPrefix="",E.prototype.phpClassPrefix="",E.prototype.phpNamespace="",E.prototype.phpMetadataNamespace="",E.prototype.rubyPackage="",E.prototype.uninterpretedOption=u.emptyArray,E.prototype[".google.api.resourceDefinition"]=u.emptyArray,E.create=function(e){return new E(e)},E.encode=function(e,t){if(t=t||a.create(),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.phpGenericServices&&Object.hasOwnProperty.call(e,"phpGenericServices")&&t.uint32(336).bool(e.phpGenericServices),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.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();if(null!=e[".google.api.resourceDefinition"]&&e[".google.api.resourceDefinition"].length)for(n=0;n<e[".google.api.resourceDefinition"].length;++n)p.google.api.ResourceDescriptor.encode(e[".google.api.resourceDefinition"][n],t.uint32(8426).fork()).ldelim();return t},E.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},E.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.FileOptions;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.javaPackage=e.string();break;case 8:o.javaOuterClassname=e.string();break;case 10:o.javaMultipleFiles=e.bool();break;case 20:o.javaGenerateEqualsAndHash=e.bool();break;case 27:o.javaStringCheckUtf8=e.bool();break;case 9:o.optimizeFor=e.int32();break;case 11:o.goPackage=e.string();break;case 16:o.ccGenericServices=e.bool();break;case 17:o.javaGenericServices=e.bool();break;case 18:o.pyGenericServices=e.bool();break;case 42:o.phpGenericServices=e.bool();break;case 23:o.deprecated=e.bool();break;case 31:o.ccEnableArenas=e.bool();break;case 36:o.objcClassPrefix=e.string();break;case 37:o.csharpNamespace=e.string();break;case 39:o.swiftPrefix=e.string();break;case 40:o.phpClassPrefix=e.string();break;case 41:o.phpNamespace=e.string();break;case 44:o.phpMetadataNamespace=e.string();break;case 45:o.rubyPackage=e.string();break;case 999:o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()));break;case 1053:o[".google.api.resourceDefinition"]&&o[".google.api.resourceDefinition"].length||(o[".google.api.resourceDefinition"]=[]),o[".google.api.resourceDefinition"].push(p.google.api.ResourceDescriptor.decode(e,e.uint32()));break;default:e.skipType(7&r)}}return o},E.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},E.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.javaPackage&&e.hasOwnProperty("javaPackage")&&!u.isString(e.javaPackage))return"javaPackage: string expected";if(null!=e.javaOuterClassname&&e.hasOwnProperty("javaOuterClassname")&&!u.isString(e.javaOuterClassname))return"javaOuterClassname: string expected";if(null!=e.javaMultipleFiles&&e.hasOwnProperty("javaMultipleFiles")&&"boolean"!=typeof e.javaMultipleFiles)return"javaMultipleFiles: boolean expected";if(null!=e.javaGenerateEqualsAndHash&&e.hasOwnProperty("javaGenerateEqualsAndHash")&&"boolean"!=typeof e.javaGenerateEqualsAndHash)return"javaGenerateEqualsAndHash: boolean expected";if(null!=e.javaStringCheckUtf8&&e.hasOwnProperty("javaStringCheckUtf8")&&"boolean"!=typeof e.javaStringCheckUtf8)return"javaStringCheckUtf8: boolean expected";if(null!=e.optimizeFor&&e.hasOwnProperty("optimizeFor"))switch(e.optimizeFor){default:return"optimizeFor: enum value expected";case 1:case 2:case 3:}if(null!=e.goPackage&&e.hasOwnProperty("goPackage")&&!u.isString(e.goPackage))return"goPackage: string expected";if(null!=e.ccGenericServices&&e.hasOwnProperty("ccGenericServices")&&"boolean"!=typeof e.ccGenericServices)return"ccGenericServices: boolean expected";if(null!=e.javaGenericServices&&e.hasOwnProperty("javaGenericServices")&&"boolean"!=typeof e.javaGenericServices)return"javaGenericServices: boolean expected";if(null!=e.pyGenericServices&&e.hasOwnProperty("pyGenericServices")&&"boolean"!=typeof e.pyGenericServices)return"pyGenericServices: boolean expected";if(null!=e.phpGenericServices&&e.hasOwnProperty("phpGenericServices")&&"boolean"!=typeof e.phpGenericServices)return"phpGenericServices: boolean expected";if(null!=e.deprecated&&e.hasOwnProperty("deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.ccEnableArenas&&e.hasOwnProperty("ccEnableArenas")&&"boolean"!=typeof e.ccEnableArenas)return"ccEnableArenas: boolean expected";if(null!=e.objcClassPrefix&&e.hasOwnProperty("objcClassPrefix")&&!u.isString(e.objcClassPrefix))return"objcClassPrefix: string expected";if(null!=e.csharpNamespace&&e.hasOwnProperty("csharpNamespace")&&!u.isString(e.csharpNamespace))return"csharpNamespace: string expected";if(null!=e.swiftPrefix&&e.hasOwnProperty("swiftPrefix")&&!u.isString(e.swiftPrefix))return"swiftPrefix: string expected";if(null!=e.phpClassPrefix&&e.hasOwnProperty("phpClassPrefix")&&!u.isString(e.phpClassPrefix))return"phpClassPrefix: string expected";if(null!=e.phpNamespace&&e.hasOwnProperty("phpNamespace")&&!u.isString(e.phpNamespace))return"phpNamespace: string expected";if(null!=e.phpMetadataNamespace&&e.hasOwnProperty("phpMetadataNamespace")&&!u.isString(e.phpMetadataNamespace))return"phpMetadataNamespace: string expected";if(null!=e.rubyPackage&&e.hasOwnProperty("rubyPackage")&&!u.isString(e.rubyPackage))return"rubyPackage: string expected";if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t)if(n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]))return"uninterpretedOption."+n}if(null!=e[".google.api.resourceDefinition"]&&e.hasOwnProperty(".google.api.resourceDefinition")){if(!Array.isArray(e[".google.api.resourceDefinition"]))return".google.api.resourceDefinition: array expected";for(var n,t=0;t<e[".google.api.resourceDefinition"].length;++t)if(n=p.google.api.ResourceDescriptor.verify(e[".google.api.resourceDefinition"][t]))return".google.api.resourceDefinition."+n}return null},E.fromObject=function(e){if(e instanceof p.google.protobuf.FileOptions)return e;var t=new p.google.protobuf.FileOptions;switch(null!=e.javaPackage&&(t.javaPackage=String(e.javaPackage)),null!=e.javaOuterClassname&&(t.javaOuterClassname=String(e.javaOuterClassname)),null!=e.javaMultipleFiles&&(t.javaMultipleFiles=Boolean(e.javaMultipleFiles)),null!=e.javaGenerateEqualsAndHash&&(t.javaGenerateEqualsAndHash=Boolean(e.javaGenerateEqualsAndHash)),null!=e.javaStringCheckUtf8&&(t.javaStringCheckUtf8=Boolean(e.javaStringCheckUtf8)),e.optimizeFor){default:"number"==typeof e.optimizeFor&&(t.optimizeFor=e.optimizeFor);break;case"SPEED":case 1:t.optimizeFor=1;break;case"CODE_SIZE":case 2:t.optimizeFor=2;break;case"LITE_RUNTIME":case 3:t.optimizeFor=3}if(null!=e.goPackage&&(t.goPackage=String(e.goPackage)),null!=e.ccGenericServices&&(t.ccGenericServices=Boolean(e.ccGenericServices)),null!=e.javaGenericServices&&(t.javaGenericServices=Boolean(e.javaGenericServices)),null!=e.pyGenericServices&&(t.pyGenericServices=Boolean(e.pyGenericServices)),null!=e.phpGenericServices&&(t.phpGenericServices=Boolean(e.phpGenericServices)),null!=e.deprecated&&(t.deprecated=Boolean(e.deprecated)),null!=e.ccEnableArenas&&(t.ccEnableArenas=Boolean(e.ccEnableArenas)),null!=e.objcClassPrefix&&(t.objcClassPrefix=String(e.objcClassPrefix)),null!=e.csharpNamespace&&(t.csharpNamespace=String(e.csharpNamespace)),null!=e.swiftPrefix&&(t.swiftPrefix=String(e.swiftPrefix)),null!=e.phpClassPrefix&&(t.phpClassPrefix=String(e.phpClassPrefix)),null!=e.phpNamespace&&(t.phpNamespace=String(e.phpNamespace)),null!=e.phpMetadataNamespace&&(t.phpMetadataNamespace=String(e.phpMetadataNamespace)),null!=e.rubyPackage&&(t.rubyPackage=String(e.rubyPackage)),e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.FileOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}if(e[".google.api.resourceDefinition"]){if(!Array.isArray(e[".google.api.resourceDefinition"]))throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: array expected");t[".google.api.resourceDefinition"]=[];for(n=0;n<e[".google.api.resourceDefinition"].length;++n){if("object"!=typeof e[".google.api.resourceDefinition"][n])throw TypeError(".google.protobuf.FileOptions..google.api.resourceDefinition: object expected");t[".google.api.resourceDefinition"][n]=p.google.api.ResourceDescriptor.fromObject(e[".google.api.resourceDefinition"][n])}}return t},E.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[],n[".google.api.resourceDefinition"]=[]),t.defaults&&(n.javaPackage="",n.javaOuterClassname="",n.optimizeFor=t.enums===String?"SPEED":1,n.javaMultipleFiles=!1,n.goPackage="",n.ccGenericServices=!1,n.javaGenericServices=!1,n.pyGenericServices=!1,n.javaGenerateEqualsAndHash=!1,n.deprecated=!1,n.javaStringCheckUtf8=!1,n.ccEnableArenas=!0,n.objcClassPrefix="",n.csharpNamespace="",n.swiftPrefix="",n.phpClassPrefix="",n.phpNamespace="",n.phpGenericServices=!1,n.phpMetadataNamespace="",n.rubyPackage=""),null!=e.javaPackage&&e.hasOwnProperty("javaPackage")&&(n.javaPackage=e.javaPackage),null!=e.javaOuterClassname&&e.hasOwnProperty("javaOuterClassname")&&(n.javaOuterClassname=e.javaOuterClassname),null!=e.optimizeFor&&e.hasOwnProperty("optimizeFor")&&(n.optimizeFor=t.enums!==String||void 0===p.google.protobuf.FileOptions.OptimizeMode[e.optimizeFor]?e.optimizeFor:p.google.protobuf.FileOptions.OptimizeMode[e.optimizeFor]),null!=e.javaMultipleFiles&&e.hasOwnProperty("javaMultipleFiles")&&(n.javaMultipleFiles=e.javaMultipleFiles),null!=e.goPackage&&e.hasOwnProperty("goPackage")&&(n.goPackage=e.goPackage),null!=e.ccGenericServices&&e.hasOwnProperty("ccGenericServices")&&(n.ccGenericServices=e.ccGenericServices),null!=e.javaGenericServices&&e.hasOwnProperty("javaGenericServices")&&(n.javaGenericServices=e.javaGenericServices),null!=e.pyGenericServices&&e.hasOwnProperty("pyGenericServices")&&(n.pyGenericServices=e.pyGenericServices),null!=e.javaGenerateEqualsAndHash&&e.hasOwnProperty("javaGenerateEqualsAndHash")&&(n.javaGenerateEqualsAndHash=e.javaGenerateEqualsAndHash),null!=e.deprecated&&e.hasOwnProperty("deprecated")&&(n.deprecated=e.deprecated),null!=e.javaStringCheckUtf8&&e.hasOwnProperty("javaStringCheckUtf8")&&(n.javaStringCheckUtf8=e.javaStringCheckUtf8),null!=e.ccEnableArenas&&e.hasOwnProperty("ccEnableArenas")&&(n.ccEnableArenas=e.ccEnableArenas),null!=e.objcClassPrefix&&e.hasOwnProperty("objcClassPrefix")&&(n.objcClassPrefix=e.objcClassPrefix),null!=e.csharpNamespace&&e.hasOwnProperty("csharpNamespace")&&(n.csharpNamespace=e.csharpNamespace),null!=e.swiftPrefix&&e.hasOwnProperty("swiftPrefix")&&(n.swiftPrefix=e.swiftPrefix),null!=e.phpClassPrefix&&e.hasOwnProperty("phpClassPrefix")&&(n.phpClassPrefix=e.phpClassPrefix),null!=e.phpNamespace&&e.hasOwnProperty("phpNamespace")&&(n.phpNamespace=e.phpNamespace),null!=e.phpGenericServices&&e.hasOwnProperty("phpGenericServices")&&(n.phpGenericServices=e.phpGenericServices),null!=e.phpMetadataNamespace&&e.hasOwnProperty("phpMetadataNamespace")&&(n.phpMetadataNamespace=e.phpMetadataNamespace),null!=e.rubyPackage&&e.hasOwnProperty("rubyPackage")&&(n.rubyPackage=e.rubyPackage),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}if(e[".google.api.resourceDefinition"]&&e[".google.api.resourceDefinition"].length){n[".google.api.resourceDefinition"]=[];for(o=0;o<e[".google.api.resourceDefinition"].length;++o)n[".google.api.resourceDefinition"][o]=p.google.api.ResourceDescriptor.toObject(e[".google.api.resourceDefinition"][o],t)}return n},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.protobuf.FileOptions"},E.OptimizeMode=(r={},(i=Object.create(r))[r[1]="SPEED"]=1,i[r[2]="CODE_SIZE"]=2,i[r[3]="LITE_RUNTIME"]=3,i),E),e.MessageOptions=(C.prototype.messageSetWireFormat=!1,C.prototype.noStandardDescriptorAccessor=!1,C.prototype.deprecated=!1,C.prototype.mapEntry=!1,C.prototype.deprecatedLegacyJsonFieldConflicts=!1,C.prototype.uninterpretedOption=u.emptyArray,C.prototype[".google.api.resource"]=null,C.create=function(e){return new C(e)},C.encode=function(e,t){if(t=t||a.create(),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.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();return null!=e[".google.api.resource"]&&Object.hasOwnProperty.call(e,".google.api.resource")&&p.google.api.ResourceDescriptor.encode(e[".google.api.resource"],t.uint32(8426).fork()).ldelim(),t},C.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},C.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.MessageOptions;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.messageSetWireFormat=e.bool();break;case 2:o.noStandardDescriptorAccessor=e.bool();break;case 3:o.deprecated=e.bool();break;case 7:o.mapEntry=e.bool();break;case 11:o.deprecatedLegacyJsonFieldConflicts=e.bool();break;case 999:o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()));break;case 1053:o[".google.api.resource"]=p.google.api.ResourceDescriptor.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},C.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},C.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.messageSetWireFormat&&e.hasOwnProperty("messageSetWireFormat")&&"boolean"!=typeof e.messageSetWireFormat)return"messageSetWireFormat: boolean expected";if(null!=e.noStandardDescriptorAccessor&&e.hasOwnProperty("noStandardDescriptorAccessor")&&"boolean"!=typeof e.noStandardDescriptorAccessor)return"noStandardDescriptorAccessor: boolean expected";if(null!=e.deprecated&&e.hasOwnProperty("deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.mapEntry&&e.hasOwnProperty("mapEntry")&&"boolean"!=typeof e.mapEntry)return"mapEntry: boolean expected";if(null!=e.deprecatedLegacyJsonFieldConflicts&&e.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")&&"boolean"!=typeof e.deprecatedLegacyJsonFieldConflicts)return"deprecatedLegacyJsonFieldConflicts: boolean expected";if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t)if(n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]))return"uninterpretedOption."+n}var n;if(null!=e[".google.api.resource"]&&e.hasOwnProperty(".google.api.resource")&&(n=p.google.api.ResourceDescriptor.verify(e[".google.api.resource"])))return".google.api.resource."+n;return null},C.fromObject=function(e){if(e instanceof p.google.protobuf.MessageOptions)return e;var t=new p.google.protobuf.MessageOptions;if(null!=e.messageSetWireFormat&&(t.messageSetWireFormat=Boolean(e.messageSetWireFormat)),null!=e.noStandardDescriptorAccessor&&(t.noStandardDescriptorAccessor=Boolean(e.noStandardDescriptorAccessor)),null!=e.deprecated&&(t.deprecated=Boolean(e.deprecated)),null!=e.mapEntry&&(t.mapEntry=Boolean(e.mapEntry)),null!=e.deprecatedLegacyJsonFieldConflicts&&(t.deprecatedLegacyJsonFieldConflicts=Boolean(e.deprecatedLegacyJsonFieldConflicts)),e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.MessageOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}if(null!=e[".google.api.resource"]){if("object"!=typeof e[".google.api.resource"])throw TypeError(".google.protobuf.MessageOptions..google.api.resource: object expected");t[".google.api.resource"]=p.google.api.ResourceDescriptor.fromObject(e[".google.api.resource"])}return t},C.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[]),t.defaults&&(n.messageSetWireFormat=!1,n.noStandardDescriptorAccessor=!1,n.deprecated=!1,n.mapEntry=!1,n.deprecatedLegacyJsonFieldConflicts=!1,n[".google.api.resource"]=null),null!=e.messageSetWireFormat&&e.hasOwnProperty("messageSetWireFormat")&&(n.messageSetWireFormat=e.messageSetWireFormat),null!=e.noStandardDescriptorAccessor&&e.hasOwnProperty("noStandardDescriptorAccessor")&&(n.noStandardDescriptorAccessor=e.noStandardDescriptorAccessor),null!=e.deprecated&&e.hasOwnProperty("deprecated")&&(n.deprecated=e.deprecated),null!=e.mapEntry&&e.hasOwnProperty("mapEntry")&&(n.mapEntry=e.mapEntry),null!=e.deprecatedLegacyJsonFieldConflicts&&e.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")&&(n.deprecatedLegacyJsonFieldConflicts=e.deprecatedLegacyJsonFieldConflicts),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}return null!=e[".google.api.resource"]&&e.hasOwnProperty(".google.api.resource")&&(n[".google.api.resource"]=p.google.api.ResourceDescriptor.toObject(e[".google.api.resource"],t)),n},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.MessageOptions"},C),e.FieldOptions=(R.prototype.ctype=0,R.prototype.packed=!1,R.prototype.jstype=0,R.prototype.lazy=!1,R.prototype.unverifiedLazy=!1,R.prototype.deprecated=!1,R.prototype.weak=!1,R.prototype.debugRedact=!1,R.prototype.retention=0,R.prototype.target=0,R.prototype.uninterpretedOption=u.emptyArray,R.prototype[".google.api.resourceReference"]=null,R.prototype[".google.api.fieldBehavior"]=u.emptyArray,R.create=function(e){return new R(e)},R.encode=function(e,t){if(t=t||a.create(),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.target&&Object.hasOwnProperty.call(e,"target")&&t.uint32(144).int32(e.target),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();if(null!=e[".google.api.fieldBehavior"]&&e[".google.api.fieldBehavior"].length){t.uint32(8418).fork();for(n=0;n<e[".google.api.fieldBehavior"].length;++n)t.int32(e[".google.api.fieldBehavior"][n]);t.ldelim()}return null!=e[".google.api.resourceReference"]&&Object.hasOwnProperty.call(e,".google.api.resourceReference")&&p.google.api.ResourceReference.encode(e[".google.api.resourceReference"],t.uint32(8442).fork()).ldelim(),t},R.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},R.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.FieldOptions;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.ctype=e.int32();break;case 2:o.packed=e.bool();break;case 6:o.jstype=e.int32();break;case 5:o.lazy=e.bool();break;case 15:o.unverifiedLazy=e.bool();break;case 3:o.deprecated=e.bool();break;case 10:o.weak=e.bool();break;case 16:o.debugRedact=e.bool();break;case 17:o.retention=e.int32();break;case 18:o.target=e.int32();break;case 999:o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()));break;case 1055:o[".google.api.resourceReference"]=p.google.api.ResourceReference.decode(e,e.uint32());break;case 1052:if(o[".google.api.fieldBehavior"]&&o[".google.api.fieldBehavior"].length||(o[".google.api.fieldBehavior"]=[]),2==(7&r))for(var i=e.uint32()+e.pos;e.pos<i;)o[".google.api.fieldBehavior"].push(e.int32());else o[".google.api.fieldBehavior"].push(e.int32());break;default:e.skipType(7&r)}}return o},R.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},R.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.ctype&&e.hasOwnProperty("ctype"))switch(e.ctype){default:return"ctype: enum value expected";case 0:case 1:case 2:}if(null!=e.packed&&e.hasOwnProperty("packed")&&"boolean"!=typeof e.packed)return"packed: boolean expected";if(null!=e.jstype&&e.hasOwnProperty("jstype"))switch(e.jstype){default:return"jstype: enum value expected";case 0:case 1:case 2:}if(null!=e.lazy&&e.hasOwnProperty("lazy")&&"boolean"!=typeof e.lazy)return"lazy: boolean expected";if(null!=e.unverifiedLazy&&e.hasOwnProperty("unverifiedLazy")&&"boolean"!=typeof e.unverifiedLazy)return"unverifiedLazy: boolean expected";if(null!=e.deprecated&&e.hasOwnProperty("deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.weak&&e.hasOwnProperty("weak")&&"boolean"!=typeof e.weak)return"weak: boolean expected";if(null!=e.debugRedact&&e.hasOwnProperty("debugRedact")&&"boolean"!=typeof e.debugRedact)return"debugRedact: boolean expected";if(null!=e.retention&&e.hasOwnProperty("retention"))switch(e.retention){default:return"retention: enum value expected";case 0:case 1:case 2:}if(null!=e.target&&e.hasOwnProperty("target"))switch(e.target){default:return"target: 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.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t)if(n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]))return"uninterpretedOption."+n}var n;if(null!=e[".google.api.resourceReference"]&&e.hasOwnProperty(".google.api.resourceReference")&&(n=p.google.api.ResourceReference.verify(e[".google.api.resourceReference"])))return".google.api.resourceReference."+n;if(null!=e[".google.api.fieldBehavior"]&&e.hasOwnProperty(".google.api.fieldBehavior")){if(!Array.isArray(e[".google.api.fieldBehavior"]))return".google.api.fieldBehavior: array expected";for(t=0;t<e[".google.api.fieldBehavior"].length;++t)switch(e[".google.api.fieldBehavior"][t]){default:return".google.api.fieldBehavior: enum value[] expected";case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:}}return null},R.fromObject=function(e){if(e instanceof p.google.protobuf.FieldOptions)return e;var t=new p.google.protobuf.FieldOptions;switch(e.ctype){default:"number"==typeof e.ctype&&(t.ctype=e.ctype);break;case"STRING":case 0:t.ctype=0;break;case"CORD":case 1:t.ctype=1;break;case"STRING_PIECE":case 2:t.ctype=2}switch(null!=e.packed&&(t.packed=Boolean(e.packed)),e.jstype){default:"number"==typeof e.jstype&&(t.jstype=e.jstype);break;case"JS_NORMAL":case 0:t.jstype=0;break;case"JS_STRING":case 1:t.jstype=1;break;case"JS_NUMBER":case 2:t.jstype=2}switch(null!=e.lazy&&(t.lazy=Boolean(e.lazy)),null!=e.unverifiedLazy&&(t.unverifiedLazy=Boolean(e.unverifiedLazy)),null!=e.deprecated&&(t.deprecated=Boolean(e.deprecated)),null!=e.weak&&(t.weak=Boolean(e.weak)),null!=e.debugRedact&&(t.debugRedact=Boolean(e.debugRedact)),e.retention){default:"number"==typeof e.retention&&(t.retention=e.retention);break;case"RETENTION_UNKNOWN":case 0:t.retention=0;break;case"RETENTION_RUNTIME":case 1:t.retention=1;break;case"RETENTION_SOURCE":case 2:t.retention=2}switch(e.target){default:"number"==typeof e.target&&(t.target=e.target);break;case"TARGET_TYPE_UNKNOWN":case 0:t.target=0;break;case"TARGET_TYPE_FILE":case 1:t.target=1;break;case"TARGET_TYPE_EXTENSION_RANGE":case 2:t.target=2;break;case"TARGET_TYPE_MESSAGE":case 3:t.target=3;break;case"TARGET_TYPE_FIELD":case 4:t.target=4;break;case"TARGET_TYPE_ONEOF":case 5:t.target=5;break;case"TARGET_TYPE_ENUM":case 6:t.target=6;break;case"TARGET_TYPE_ENUM_ENTRY":case 7:t.target=7;break;case"TARGET_TYPE_SERVICE":case 8:t.target=8;break;case"TARGET_TYPE_METHOD":case 9:t.target=9}if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.FieldOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}if(null!=e[".google.api.resourceReference"]){if("object"!=typeof e[".google.api.resourceReference"])throw TypeError(".google.protobuf.FieldOptions..google.api.resourceReference: object expected");t[".google.api.resourceReference"]=p.google.api.ResourceReference.fromObject(e[".google.api.resourceReference"])}if(e[".google.api.fieldBehavior"]){if(!Array.isArray(e[".google.api.fieldBehavior"]))throw TypeError(".google.protobuf.FieldOptions..google.api.fieldBehavior: array expected");t[".google.api.fieldBehavior"]=[];for(n=0;n<e[".google.api.fieldBehavior"].length;++n)switch(e[".google.api.fieldBehavior"][n]){default:if("number"==typeof e[".google.api.fieldBehavior"][n]){t[".google.api.fieldBehavior"][n]=e[".google.api.fieldBehavior"][n];break}case"FIELD_BEHAVIOR_UNSPECIFIED":case 0:t[".google.api.fieldBehavior"][n]=0;break;case"OPTIONAL":case 1:t[".google.api.fieldBehavior"][n]=1;break;case"REQUIRED":case 2:t[".google.api.fieldBehavior"][n]=2;break;case"OUTPUT_ONLY":case 3:t[".google.api.fieldBehavior"][n]=3;break;case"INPUT_ONLY":case 4:t[".google.api.fieldBehavior"][n]=4;break;case"IMMUTABLE":case 5:t[".google.api.fieldBehavior"][n]=5;break;case"UNORDERED_LIST":case 6:t[".google.api.fieldBehavior"][n]=6;break;case"NON_EMPTY_DEFAULT":case 7:t[".google.api.fieldBehavior"][n]=7}}return t},R.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[],n[".google.api.fieldBehavior"]=[]),t.defaults&&(n.ctype=t.enums===String?"STRING":0,n.packed=!1,n.deprecated=!1,n.lazy=!1,n.jstype=t.enums===String?"JS_NORMAL":0,n.weak=!1,n.unverifiedLazy=!1,n.debugRedact=!1,n.retention=t.enums===String?"RETENTION_UNKNOWN":0,n.target=t.enums===String?"TARGET_TYPE_UNKNOWN":0,n[".google.api.resourceReference"]=null),null!=e.ctype&&e.hasOwnProperty("ctype")&&(n.ctype=t.enums!==String||void 0===p.google.protobuf.FieldOptions.CType[e.ctype]?e.ctype:p.google.protobuf.FieldOptions.CType[e.ctype]),null!=e.packed&&e.hasOwnProperty("packed")&&(n.packed=e.packed),null!=e.deprecated&&e.hasOwnProperty("deprecated")&&(n.deprecated=e.deprecated),null!=e.lazy&&e.hasOwnProperty("lazy")&&(n.lazy=e.lazy),null!=e.jstype&&e.hasOwnProperty("jstype")&&(n.jstype=t.enums!==String||void 0===p.google.protobuf.FieldOptions.JSType[e.jstype]?e.jstype:p.google.protobuf.FieldOptions.JSType[e.jstype]),null!=e.weak&&e.hasOwnProperty("weak")&&(n.weak=e.weak),null!=e.unverifiedLazy&&e.hasOwnProperty("unverifiedLazy")&&(n.unverifiedLazy=e.unverifiedLazy),null!=e.debugRedact&&e.hasOwnProperty("debugRedact")&&(n.debugRedact=e.debugRedact),null!=e.retention&&e.hasOwnProperty("retention")&&(n.retention=t.enums!==String||void 0===p.google.protobuf.FieldOptions.OptionRetention[e.retention]?e.retention:p.google.protobuf.FieldOptions.OptionRetention[e.retention]),null!=e.target&&e.hasOwnProperty("target")&&(n.target=t.enums!==String||void 0===p.google.protobuf.FieldOptions.OptionTargetType[e.target]?e.target:p.google.protobuf.FieldOptions.OptionTargetType[e.target]),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}if(e[".google.api.fieldBehavior"]&&e[".google.api.fieldBehavior"].length){n[".google.api.fieldBehavior"]=[];for(o=0;o<e[".google.api.fieldBehavior"].length;++o)n[".google.api.fieldBehavior"][o]=t.enums!==String||void 0===p.google.api.FieldBehavior[e[".google.api.fieldBehavior"][o]]?e[".google.api.fieldBehavior"][o]:p.google.api.FieldBehavior[e[".google.api.fieldBehavior"][o]]}return null!=e[".google.api.resourceReference"]&&e.hasOwnProperty(".google.api.resourceReference")&&(n[".google.api.resourceReference"]=p.google.api.ResourceReference.toObject(e[".google.api.resourceReference"],t)),n},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.FieldOptions"},R.CType=(r={},(i=Object.create(r))[r[0]="STRING"]=0,i[r[1]="CORD"]=1,i[r[2]="STRING_PIECE"]=2,i),R.JSType=(r={},(i=Object.create(r))[r[0]="JS_NORMAL"]=0,i[r[1]="JS_STRING"]=1,i[r[2]="JS_NUMBER"]=2,i),R.OptionRetention=(r={},(i=Object.create(r))[r[0]="RETENTION_UNKNOWN"]=0,i[r[1]="RETENTION_RUNTIME"]=1,i[r[2]="RETENTION_SOURCE"]=2,i),R.OptionTargetType=(r={},(i=Object.create(r))[r[0]="TARGET_TYPE_UNKNOWN"]=0,i[r[1]="TARGET_TYPE_FILE"]=1,i[r[2]="TARGET_TYPE_EXTENSION_RANGE"]=2,i[r[3]="TARGET_TYPE_MESSAGE"]=3,i[r[4]="TARGET_TYPE_FIELD"]=4,i[r[5]="TARGET_TYPE_ONEOF"]=5,i[r[6]="TARGET_TYPE_ENUM"]=6,i[r[7]="TARGET_TYPE_ENUM_ENTRY"]=7,i[r[8]="TARGET_TYPE_SERVICE"]=8,i[r[9]="TARGET_TYPE_METHOD"]=9,i),R),e.OneofOptions=(gt.prototype.uninterpretedOption=u.emptyArray,gt.create=function(e){return new gt(e)},gt.encode=function(e,t){if(t=t||a.create(),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();return t},gt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},gt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.OneofOptions;e.pos<n;){var r=e.uint32();r>>>3==999?(o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()))):e.skipType(7&r)}return o},gt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},gt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t){var n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]);if(n)return"uninterpretedOption."+n}}return null},gt.fromObject=function(e){if(e instanceof p.google.protobuf.OneofOptions)return e;var t=new p.google.protobuf.OneofOptions;if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.OneofOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}return t},gt.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[]),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}return n},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.protobuf.OneofOptions"},gt),e.EnumOptions=(dt.prototype.allowAlias=!1,dt.prototype.deprecated=!1,dt.prototype.deprecatedLegacyJsonFieldConflicts=!1,dt.prototype.uninterpretedOption=u.emptyArray,dt.create=function(e){return new dt(e)},dt.encode=function(e,t){if(t=t||a.create(),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.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();return t},dt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},dt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.EnumOptions;e.pos<n;){var r=e.uint32();switch(r>>>3){case 2:o.allowAlias=e.bool();break;case 3:o.deprecated=e.bool();break;case 6:o.deprecatedLegacyJsonFieldConflicts=e.bool();break;case 999:o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()));break;default:e.skipType(7&r)}}return o},dt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},dt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.allowAlias&&e.hasOwnProperty("allowAlias")&&"boolean"!=typeof e.allowAlias)return"allowAlias: boolean expected";if(null!=e.deprecated&&e.hasOwnProperty("deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.deprecatedLegacyJsonFieldConflicts&&e.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")&&"boolean"!=typeof e.deprecatedLegacyJsonFieldConflicts)return"deprecatedLegacyJsonFieldConflicts: boolean expected";if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t){var n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]);if(n)return"uninterpretedOption."+n}}return null},dt.fromObject=function(e){if(e instanceof p.google.protobuf.EnumOptions)return e;var t=new p.google.protobuf.EnumOptions;if(null!=e.allowAlias&&(t.allowAlias=Boolean(e.allowAlias)),null!=e.deprecated&&(t.deprecated=Boolean(e.deprecated)),null!=e.deprecatedLegacyJsonFieldConflicts&&(t.deprecatedLegacyJsonFieldConflicts=Boolean(e.deprecatedLegacyJsonFieldConflicts)),e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.EnumOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}return t},dt.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[]),t.defaults&&(n.allowAlias=!1,n.deprecated=!1,n.deprecatedLegacyJsonFieldConflicts=!1),null!=e.allowAlias&&e.hasOwnProperty("allowAlias")&&(n.allowAlias=e.allowAlias),null!=e.deprecated&&e.hasOwnProperty("deprecated")&&(n.deprecated=e.deprecated),null!=e.deprecatedLegacyJsonFieldConflicts&&e.hasOwnProperty("deprecatedLegacyJsonFieldConflicts")&&(n.deprecatedLegacyJsonFieldConflicts=e.deprecatedLegacyJsonFieldConflicts),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}return n},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.protobuf.EnumOptions"},dt),e.EnumValueOptions=(ft.prototype.deprecated=!1,ft.prototype.uninterpretedOption=u.emptyArray,ft.create=function(e){return new ft(e)},ft.encode=function(e,t){if(t=t||a.create(),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&t.uint32(8).bool(e.deprecated),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();return t},ft.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ft.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.EnumValueOptions;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.deprecated=e.bool();break;case 999:o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()));break;default:e.skipType(7&r)}}return o},ft.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ft.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.deprecated&&e.hasOwnProperty("deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t){var n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]);if(n)return"uninterpretedOption."+n}}return null},ft.fromObject=function(e){if(e instanceof p.google.protobuf.EnumValueOptions)return e;var t=new p.google.protobuf.EnumValueOptions;if(null!=e.deprecated&&(t.deprecated=Boolean(e.deprecated)),e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.EnumValueOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}return t},ft.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[]),t.defaults&&(n.deprecated=!1),null!=e.deprecated&&e.hasOwnProperty("deprecated")&&(n.deprecated=e.deprecated),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}return n},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.protobuf.EnumValueOptions"},ft),e.ServiceOptions=(yt.prototype.deprecated=!1,yt.prototype.uninterpretedOption=u.emptyArray,yt.prototype[".google.api.defaultHost"]="",yt.prototype[".google.api.oauthScopes"]="",yt.create=function(e){return new yt(e)},yt.encode=function(e,t){if(t=t||a.create(),null!=e.deprecated&&Object.hasOwnProperty.call(e,"deprecated")&&t.uint32(264).bool(e.deprecated),null!=e.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).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"]),t},yt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},yt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.ServiceOptions;e.pos<n;){var r=e.uint32();switch(r>>>3){case 33:o.deprecated=e.bool();break;case 999:o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()));break;case 1049:o[".google.api.defaultHost"]=e.string();break;case 1050:o[".google.api.oauthScopes"]=e.string();break;default:e.skipType(7&r)}}return o},yt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},yt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.deprecated&&e.hasOwnProperty("deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t){var n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]);if(n)return"uninterpretedOption."+n}}return null!=e[".google.api.defaultHost"]&&e.hasOwnProperty(".google.api.defaultHost")&&!u.isString(e[".google.api.defaultHost"])?".google.api.defaultHost: string expected":null!=e[".google.api.oauthScopes"]&&e.hasOwnProperty(".google.api.oauthScopes")&&!u.isString(e[".google.api.oauthScopes"])?".google.api.oauthScopes: string expected":null},yt.fromObject=function(e){if(e instanceof p.google.protobuf.ServiceOptions)return e;var t=new p.google.protobuf.ServiceOptions;if(null!=e.deprecated&&(t.deprecated=Boolean(e.deprecated)),e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.ServiceOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}return null!=e[".google.api.defaultHost"]&&(t[".google.api.defaultHost"]=String(e[".google.api.defaultHost"])),null!=e[".google.api.oauthScopes"]&&(t[".google.api.oauthScopes"]=String(e[".google.api.oauthScopes"])),t},yt.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[]),t.defaults&&(n.deprecated=!1,n[".google.api.defaultHost"]="",n[".google.api.oauthScopes"]=""),null!=e.deprecated&&e.hasOwnProperty("deprecated")&&(n.deprecated=e.deprecated),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}return null!=e[".google.api.defaultHost"]&&e.hasOwnProperty(".google.api.defaultHost")&&(n[".google.api.defaultHost"]=e[".google.api.defaultHost"]),null!=e[".google.api.oauthScopes"]&&e.hasOwnProperty(".google.api.oauthScopes")&&(n[".google.api.oauthScopes"]=e[".google.api.oauthScopes"]),n},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.protobuf.ServiceOptions"},yt),e.MethodOptions=(N.prototype.deprecated=!1,N.prototype.idempotencyLevel=0,N.prototype.uninterpretedOption=u.emptyArray,N.prototype[".google.api.http"]=null,N.prototype[".google.api.methodSignature"]=u.emptyArray,N.prototype[".google.longrunning.operationInfo"]=null,N.create=function(e){return new N(e)},N.encode=function(e,t){if(t=t||a.create(),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.uninterpretedOption&&e.uninterpretedOption.length)for(var n=0;n<e.uninterpretedOption.length;++n)p.google.protobuf.UninterpretedOption.encode(e.uninterpretedOption[n],t.uint32(7994).fork()).ldelim();if(null!=e[".google.longrunning.operationInfo"]&&Object.hasOwnProperty.call(e,".google.longrunning.operationInfo")&&p.google.longrunning.OperationInfo.encode(e[".google.longrunning.operationInfo"],t.uint32(8394).fork()).ldelim(),null!=e[".google.api.methodSignature"]&&e[".google.api.methodSignature"].length)for(n=0;n<e[".google.api.methodSignature"].length;++n)t.uint32(8410).string(e[".google.api.methodSignature"][n]);return null!=e[".google.api.http"]&&Object.hasOwnProperty.call(e,".google.api.http")&&p.google.api.HttpRule.encode(e[".google.api.http"],t.uint32(578365826).fork()).ldelim(),t},N.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},N.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.MethodOptions;e.pos<n;){var r=e.uint32();switch(r>>>3){case 33:o.deprecated=e.bool();break;case 34:o.idempotencyLevel=e.int32();break;case 999:o.uninterpretedOption&&o.uninterpretedOption.length||(o.uninterpretedOption=[]),o.uninterpretedOption.push(p.google.protobuf.UninterpretedOption.decode(e,e.uint32()));break;case 72295728:o[".google.api.http"]=p.google.api.HttpRule.decode(e,e.uint32());break;case 1051:o[".google.api.methodSignature"]&&o[".google.api.methodSignature"].length||(o[".google.api.methodSignature"]=[]),o[".google.api.methodSignature"].push(e.string());break;case 1049:o[".google.longrunning.operationInfo"]=p.google.longrunning.OperationInfo.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},N.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},N.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.deprecated&&e.hasOwnProperty("deprecated")&&"boolean"!=typeof e.deprecated)return"deprecated: boolean expected";if(null!=e.idempotencyLevel&&e.hasOwnProperty("idempotencyLevel"))switch(e.idempotencyLevel){default:return"idempotencyLevel: enum value expected";case 0:case 1:case 2:}if(null!=e.uninterpretedOption&&e.hasOwnProperty("uninterpretedOption")){if(!Array.isArray(e.uninterpretedOption))return"uninterpretedOption: array expected";for(var t=0;t<e.uninterpretedOption.length;++t)if(n=p.google.protobuf.UninterpretedOption.verify(e.uninterpretedOption[t]))return"uninterpretedOption."+n}var n;if(null!=e[".google.api.http"]&&e.hasOwnProperty(".google.api.http")&&(n=p.google.api.HttpRule.verify(e[".google.api.http"])))return".google.api.http."+n;if(null!=e[".google.api.methodSignature"]&&e.hasOwnProperty(".google.api.methodSignature")){if(!Array.isArray(e[".google.api.methodSignature"]))return".google.api.methodSignature: array expected";for(t=0;t<e[".google.api.methodSignature"].length;++t)if(!u.isString(e[".google.api.methodSignature"][t]))return".google.api.methodSignature: string[] expected"}if(null!=e[".google.longrunning.operationInfo"]&&e.hasOwnProperty(".google.longrunning.operationInfo")&&(n=p.google.longrunning.OperationInfo.verify(e[".google.longrunning.operationInfo"])))return".google.longrunning.operationInfo."+n;return null},N.fromObject=function(e){if(e instanceof p.google.protobuf.MethodOptions)return e;var t=new p.google.protobuf.MethodOptions;switch(null!=e.deprecated&&(t.deprecated=Boolean(e.deprecated)),e.idempotencyLevel){default:"number"==typeof e.idempotencyLevel&&(t.idempotencyLevel=e.idempotencyLevel);break;case"IDEMPOTENCY_UNKNOWN":case 0:t.idempotencyLevel=0;break;case"NO_SIDE_EFFECTS":case 1:t.idempotencyLevel=1;break;case"IDEMPOTENT":case 2:t.idempotencyLevel=2}if(e.uninterpretedOption){if(!Array.isArray(e.uninterpretedOption))throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected");t.uninterpretedOption=[];for(var n=0;n<e.uninterpretedOption.length;++n){if("object"!=typeof e.uninterpretedOption[n])throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected");t.uninterpretedOption[n]=p.google.protobuf.UninterpretedOption.fromObject(e.uninterpretedOption[n])}}if(null!=e[".google.api.http"]){if("object"!=typeof e[".google.api.http"])throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected");t[".google.api.http"]=p.google.api.HttpRule.fromObject(e[".google.api.http"])}if(e[".google.api.methodSignature"]){if(!Array.isArray(e[".google.api.methodSignature"]))throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected");t[".google.api.methodSignature"]=[];for(n=0;n<e[".google.api.methodSignature"].length;++n)t[".google.api.methodSignature"][n]=String(e[".google.api.methodSignature"][n])}if(null!=e[".google.longrunning.operationInfo"]){if("object"!=typeof e[".google.longrunning.operationInfo"])throw TypeError(".google.protobuf.MethodOptions..google.longrunning.operationInfo: object expected");t[".google.longrunning.operationInfo"]=p.google.longrunning.OperationInfo.fromObject(e[".google.longrunning.operationInfo"])}return t},N.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.uninterpretedOption=[],n[".google.api.methodSignature"]=[]),t.defaults&&(n.deprecated=!1,n.idempotencyLevel=t.enums===String?"IDEMPOTENCY_UNKNOWN":0,n[".google.longrunning.operationInfo"]=null,n[".google.api.http"]=null),null!=e.deprecated&&e.hasOwnProperty("deprecated")&&(n.deprecated=e.deprecated),null!=e.idempotencyLevel&&e.hasOwnProperty("idempotencyLevel")&&(n.idempotencyLevel=t.enums!==String||void 0===p.google.protobuf.MethodOptions.IdempotencyLevel[e.idempotencyLevel]?e.idempotencyLevel:p.google.protobuf.MethodOptions.IdempotencyLevel[e.idempotencyLevel]),e.uninterpretedOption&&e.uninterpretedOption.length){n.uninterpretedOption=[];for(var o=0;o<e.uninterpretedOption.length;++o)n.uninterpretedOption[o]=p.google.protobuf.UninterpretedOption.toObject(e.uninterpretedOption[o],t)}if(null!=e[".google.longrunning.operationInfo"]&&e.hasOwnProperty(".google.longrunning.operationInfo")&&(n[".google.longrunning.operationInfo"]=p.google.longrunning.OperationInfo.toObject(e[".google.longrunning.operationInfo"],t)),e[".google.api.methodSignature"]&&e[".google.api.methodSignature"].length){n[".google.api.methodSignature"]=[];for(o=0;o<e[".google.api.methodSignature"].length;++o)n[".google.api.methodSignature"][o]=e[".google.api.methodSignature"][o]}return null!=e[".google.api.http"]&&e.hasOwnProperty(".google.api.http")&&(n[".google.api.http"]=p.google.api.HttpRule.toObject(e[".google.api.http"],t)),n},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.MethodOptions"},N.IdempotencyLevel=(r={},(i=Object.create(r))[r[0]="IDEMPOTENCY_UNKNOWN"]=0,i[r[1]="NO_SIDE_EFFECTS"]=1,i[r[2]="IDEMPOTENT"]=2,i),N),e.UninterpretedOption=(A.prototype.name=u.emptyArray,A.prototype.identifierValue="",A.prototype.positiveIntValue=u.Long?u.Long.fromBits(0,0,!0):0,A.prototype.negativeIntValue=u.Long?u.Long.fromBits(0,0,!1):0,A.prototype.doubleValue=0,A.prototype.stringValue=u.newBuffer([]),A.prototype.aggregateValue="",A.create=function(e){return new A(e)},A.encode=function(e,t){if(t=t||a.create(),null!=e.name&&e.name.length)for(var n=0;n<e.name.length;++n)p.google.protobuf.UninterpretedOption.NamePart.encode(e.name[n],t.uint32(18).fork()).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},A.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},A.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.UninterpretedOption;e.pos<n;){var r=e.uint32();switch(r>>>3){case 2:o.name&&o.name.length||(o.name=[]),o.name.push(p.google.protobuf.UninterpretedOption.NamePart.decode(e,e.uint32()));break;case 3:o.identifierValue=e.string();break;case 4:o.positiveIntValue=e.uint64();break;case 5:o.negativeIntValue=e.int64();break;case 6:o.doubleValue=e.double();break;case 7:o.stringValue=e.bytes();break;case 8:o.aggregateValue=e.string();break;default:e.skipType(7&r)}}return o},A.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},A.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")){if(!Array.isArray(e.name))return"name: array expected";for(var t=0;t<e.name.length;++t){var n=p.google.protobuf.UninterpretedOption.NamePart.verify(e.name[t]);if(n)return"name."+n}}return null!=e.identifierValue&&e.hasOwnProperty("identifierValue")&&!u.isString(e.identifierValue)?"identifierValue: string expected":null!=e.positiveIntValue&&e.hasOwnProperty("positiveIntValue")&&!(u.isInteger(e.positiveIntValue)||e.positiveIntValue&&u.isInteger(e.positiveIntValue.low)&&u.isInteger(e.positiveIntValue.high))?"positiveIntValue: integer|Long expected":null!=e.negativeIntValue&&e.hasOwnProperty("negativeIntValue")&&!(u.isInteger(e.negativeIntValue)||e.negativeIntValue&&u.isInteger(e.negativeIntValue.low)&&u.isInteger(e.negativeIntValue.high))?"negativeIntValue: integer|Long expected":null!=e.doubleValue&&e.hasOwnProperty("doubleValue")&&"number"!=typeof e.doubleValue?"doubleValue: number expected":null!=e.stringValue&&e.hasOwnProperty("stringValue")&&!(e.stringValue&&"number"==typeof e.stringValue.length||u.isString(e.stringValue))?"stringValue: buffer expected":null!=e.aggregateValue&&e.hasOwnProperty("aggregateValue")&&!u.isString(e.aggregateValue)?"aggregateValue: string expected":null},A.fromObject=function(e){if(e instanceof p.google.protobuf.UninterpretedOption)return e;var t=new p.google.protobuf.UninterpretedOption;if(e.name){if(!Array.isArray(e.name))throw TypeError(".google.protobuf.UninterpretedOption.name: array expected");t.name=[];for(var n=0;n<e.name.length;++n){if("object"!=typeof e.name[n])throw TypeError(".google.protobuf.UninterpretedOption.name: object expected");t.name[n]=p.google.protobuf.UninterpretedOption.NamePart.fromObject(e.name[n])}}return null!=e.identifierValue&&(t.identifierValue=String(e.identifierValue)),null!=e.positiveIntValue&&(u.Long?(t.positiveIntValue=u.Long.fromValue(e.positiveIntValue)).unsigned=!0:"string"==typeof e.positiveIntValue?t.positiveIntValue=parseInt(e.positiveIntValue,10):"number"==typeof e.positiveIntValue?t.positiveIntValue=e.positiveIntValue:"object"==typeof e.positiveIntValue&&(t.positiveIntValue=new u.LongBits(e.positiveIntValue.low>>>0,e.positiveIntValue.high>>>0).toNumber(!0))),null!=e.negativeIntValue&&(u.Long?(t.negativeIntValue=u.Long.fromValue(e.negativeIntValue)).unsigned=!1:"string"==typeof e.negativeIntValue?t.negativeIntValue=parseInt(e.negativeIntValue,10):"number"==typeof e.negativeIntValue?t.negativeIntValue=e.negativeIntValue:"object"==typeof e.negativeIntValue&&(t.negativeIntValue=new u.LongBits(e.negativeIntValue.low>>>0,e.negativeIntValue.high>>>0).toNumber())),null!=e.doubleValue&&(t.doubleValue=Number(e.doubleValue)),null!=e.stringValue&&("string"==typeof e.stringValue?u.base64.decode(e.stringValue,t.stringValue=u.newBuffer(u.base64.length(e.stringValue)),0):0<=e.stringValue.length&&(t.stringValue=e.stringValue)),null!=e.aggregateValue&&(t.aggregateValue=String(e.aggregateValue)),t},A.toObject=function(e,t){var n,o={};if(((t=t||{}).arrays||t.defaults)&&(o.name=[]),t.defaults&&(o.identifierValue="",u.Long?(n=new u.Long(0,0,!0),o.positiveIntValue=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.positiveIntValue=t.longs===String?"0":0,u.Long?(n=new u.Long(0,0,!1),o.negativeIntValue=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.negativeIntValue=t.longs===String?"0":0,o.doubleValue=0,t.bytes===String?o.stringValue="":(o.stringValue=[],t.bytes!==Array&&(o.stringValue=u.newBuffer(o.stringValue))),o.aggregateValue=""),e.name&&e.name.length){o.name=[];for(var r=0;r<e.name.length;++r)o.name[r]=p.google.protobuf.UninterpretedOption.NamePart.toObject(e.name[r],t)}return null!=e.identifierValue&&e.hasOwnProperty("identifierValue")&&(o.identifierValue=e.identifierValue),null!=e.positiveIntValue&&e.hasOwnProperty("positiveIntValue")&&("number"==typeof e.positiveIntValue?o.positiveIntValue=t.longs===String?String(e.positiveIntValue):e.positiveIntValue:o.positiveIntValue=t.longs===String?u.Long.prototype.toString.call(e.positiveIntValue):t.longs===Number?new u.LongBits(e.positiveIntValue.low>>>0,e.positiveIntValue.high>>>0).toNumber(!0):e.positiveIntValue),null!=e.negativeIntValue&&e.hasOwnProperty("negativeIntValue")&&("number"==typeof e.negativeIntValue?o.negativeIntValue=t.longs===String?String(e.negativeIntValue):e.negativeIntValue:o.negativeIntValue=t.longs===String?u.Long.prototype.toString.call(e.negativeIntValue):t.longs===Number?new u.LongBits(e.negativeIntValue.low>>>0,e.negativeIntValue.high>>>0).toNumber():e.negativeIntValue),null!=e.doubleValue&&e.hasOwnProperty("doubleValue")&&(o.doubleValue=t.json&&!isFinite(e.doubleValue)?String(e.doubleValue):e.doubleValue),null!=e.stringValue&&e.hasOwnProperty("stringValue")&&(o.stringValue=t.bytes===String?u.base64.encode(e.stringValue,0,e.stringValue.length):t.bytes===Array?Array.prototype.slice.call(e.stringValue):e.stringValue),null!=e.aggregateValue&&e.hasOwnProperty("aggregateValue")&&(o.aggregateValue=e.aggregateValue),o},A.prototype.toJSON=function(){return this.constructor.toObject(this,o.util.toJSONOptions)},A.getTypeUrl=function(e){return(e=void 0===e?"type.googleapis.com":e)+"/google.protobuf.UninterpretedOption"},A.NamePart=(mt.prototype.namePart="",mt.prototype.isExtension=!1,mt.create=function(e){return new mt(e)},mt.encode=function(e,t){return(t=t||a.create()).uint32(10).string(e.namePart),t.uint32(16).bool(e.isExtension),t},mt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},mt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.UninterpretedOption.NamePart;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.namePart=e.string();break;case 2:o.isExtension=e.bool();break;default:e.skipType(7&r)}}if(!o.hasOwnProperty("namePart"))throw u.ProtocolError("missing required 'namePart'",{instance:o});if(o.hasOwnProperty("isExtension"))return o;throw u.ProtocolError("missing required 'isExtension'",{instance:o})},mt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},mt.verify=function(e){return"object"!=typeof e||null===e?"object expected":u.isString(e.namePart)?"boolean"!=typeof e.isExtension?"isExtension: boolean expected":null:"namePart: string expected"},mt.fromObject=function(e){var t;return e instanceof p.google.protobuf.UninterpretedOption.NamePart?e:(t=new p.google.protobuf.UninterpretedOption.NamePart,null!=e.namePart&&(t.namePart=String(e.namePart)),null!=e.isExtension&&(t.isExtension=Boolean(e.isExtension)),t)},mt.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.namePart="",n.isExtension=!1),null!=e.namePart&&e.hasOwnProperty("namePart")&&(n.namePart=e.namePart),null!=e.isExtension&&e.hasOwnProperty("isExtension")&&(n.isExtension=e.isExtension),n},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.protobuf.UninterpretedOption.NamePart"},mt),A),e.SourceCodeInfo=(bt.prototype.location=u.emptyArray,bt.create=function(e){return new bt(e)},bt.encode=function(e,t){if(t=t||a.create(),null!=e.location&&e.location.length)for(var n=0;n<e.location.length;++n)p.google.protobuf.SourceCodeInfo.Location.encode(e.location[n],t.uint32(10).fork()).ldelim();return t},bt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},bt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.SourceCodeInfo;e.pos<n;){var r=e.uint32();r>>>3==1?(o.location&&o.location.length||(o.location=[]),o.location.push(p.google.protobuf.SourceCodeInfo.Location.decode(e,e.uint32()))):e.skipType(7&r)}return o},bt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},bt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.location&&e.hasOwnProperty("location")){if(!Array.isArray(e.location))return"location: array expected";for(var t=0;t<e.location.length;++t){var n=p.google.protobuf.SourceCodeInfo.Location.verify(e.location[t]);if(n)return"location."+n}}return null},bt.fromObject=function(e){if(e instanceof p.google.protobuf.SourceCodeInfo)return e;var t=new p.google.protobuf.SourceCodeInfo;if(e.location){if(!Array.isArray(e.location))throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected");t.location=[];for(var n=0;n<e.location.length;++n){if("object"!=typeof e.location[n])throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected");t.location[n]=p.google.protobuf.SourceCodeInfo.Location.fromObject(e.location[n])}}return t},bt.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.location=[]),e.location&&e.location.length){n.location=[];for(var o=0;o<e.location.length;++o)n.location[o]=p.google.protobuf.SourceCodeInfo.Location.toObject(e.location[o],t)}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.protobuf.SourceCodeInfo"},bt.Location=(ht.prototype.path=u.emptyArray,ht.prototype.span=u.emptyArray,ht.prototype.leadingComments="",ht.prototype.trailingComments="",ht.prototype.leadingDetachedComments=u.emptyArray,ht.create=function(e){return new ht(e)},ht.encode=function(e,t){if(t=t||a.create(),null!=e.path&&e.path.length){t.uint32(10).fork();for(var n=0;n<e.path.length;++n)t.int32(e.path[n]);t.ldelim()}if(null!=e.span&&e.span.length){t.uint32(18).fork();for(n=0;n<e.span.length;++n)t.int32(e.span[n]);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(n=0;n<e.leadingDetachedComments.length;++n)t.uint32(50).string(e.leadingDetachedComments[n]);return t},ht.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},ht.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.SourceCodeInfo.Location;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:if(o.path&&o.path.length||(o.path=[]),2==(7&r))for(var i=e.uint32()+e.pos;e.pos<i;)o.path.push(e.int32());else o.path.push(e.int32());break;case 2:if(o.span&&o.span.length||(o.span=[]),2==(7&r))for(i=e.uint32()+e.pos;e.pos<i;)o.span.push(e.int32());else o.span.push(e.int32());break;case 3:o.leadingComments=e.string();break;case 4:o.trailingComments=e.string();break;case 6:o.leadingDetachedComments&&o.leadingDetachedComments.length||(o.leadingDetachedComments=[]),o.leadingDetachedComments.push(e.string());break;default:e.skipType(7&r)}}return o},ht.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},ht.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(var t=0;t<e.path.length;++t)if(!u.isInteger(e.path[t]))return"path: integer[] expected"}if(null!=e.span&&e.hasOwnProperty("span")){if(!Array.isArray(e.span))return"span: array expected";for(t=0;t<e.span.length;++t)if(!u.isInteger(e.span[t]))return"span: integer[] expected"}if(null!=e.leadingComments&&e.hasOwnProperty("leadingComments")&&!u.isString(e.leadingComments))return"leadingComments: string expected";if(null!=e.trailingComments&&e.hasOwnProperty("trailingComments")&&!u.isString(e.trailingComments))return"trailingComments: string expected";if(null!=e.leadingDetachedComments&&e.hasOwnProperty("leadingDetachedComments")){if(!Array.isArray(e.leadingDetachedComments))return"leadingDetachedComments: array expected";for(t=0;t<e.leadingDetachedComments.length;++t)if(!u.isString(e.leadingDetachedComments[t]))return"leadingDetachedComments: string[] expected"}return null},ht.fromObject=function(e){if(e instanceof p.google.protobuf.SourceCodeInfo.Location)return e;var t=new p.google.protobuf.SourceCodeInfo.Location;if(e.path){if(!Array.isArray(e.path))throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected");t.path=[];for(var n=0;n<e.path.length;++n)t.path[n]=0|e.path[n]}if(e.span){if(!Array.isArray(e.span))throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected");t.span=[];for(n=0;n<e.span.length;++n)t.span[n]=0|e.span[n]}if(null!=e.leadingComments&&(t.leadingComments=String(e.leadingComments)),null!=e.trailingComments&&(t.trailingComments=String(e.trailingComments)),e.leadingDetachedComments){if(!Array.isArray(e.leadingDetachedComments))throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected");t.leadingDetachedComments=[];for(n=0;n<e.leadingDetachedComments.length;++n)t.leadingDetachedComments[n]=String(e.leadingDetachedComments[n])}return t},ht.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.path=[],n.span=[],n.leadingDetachedComments=[]),t.defaults&&(n.leadingComments="",n.trailingComments=""),e.path&&e.path.length){n.path=[];for(var o=0;o<e.path.length;++o)n.path[o]=e.path[o]}if(e.span&&e.span.length){n.span=[];for(o=0;o<e.span.length;++o)n.span[o]=e.span[o]}if(null!=e.leadingComments&&e.hasOwnProperty("leadingComments")&&(n.leadingComments=e.leadingComments),null!=e.trailingComments&&e.hasOwnProperty("trailingComments")&&(n.trailingComments=e.trailingComments),e.leadingDetachedComments&&e.leadingDetachedComments.length){n.leadingDetachedComments=[];for(o=0;o<e.leadingDetachedComments.length;++o)n.leadingDetachedComments[o]=e.leadingDetachedComments[o]}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.protobuf.SourceCodeInfo.Location"},ht),bt),e.GeneratedCodeInfo=(vt.prototype.annotation=u.emptyArray,vt.create=function(e){return new vt(e)},vt.encode=function(e,t){if(t=t||a.create(),null!=e.annotation&&e.annotation.length)for(var n=0;n<e.annotation.length;++n)p.google.protobuf.GeneratedCodeInfo.Annotation.encode(e.annotation[n],t.uint32(10).fork()).ldelim();return t},vt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},vt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.GeneratedCodeInfo;e.pos<n;){var r=e.uint32();r>>>3==1?(o.annotation&&o.annotation.length||(o.annotation=[]),o.annotation.push(p.google.protobuf.GeneratedCodeInfo.Annotation.decode(e,e.uint32()))):e.skipType(7&r)}return o},vt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},vt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.annotation&&e.hasOwnProperty("annotation")){if(!Array.isArray(e.annotation))return"annotation: array expected";for(var t=0;t<e.annotation.length;++t){var n=p.google.protobuf.GeneratedCodeInfo.Annotation.verify(e.annotation[t]);if(n)return"annotation."+n}}return null},vt.fromObject=function(e){if(e instanceof p.google.protobuf.GeneratedCodeInfo)return e;var t=new p.google.protobuf.GeneratedCodeInfo;if(e.annotation){if(!Array.isArray(e.annotation))throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected");t.annotation=[];for(var n=0;n<e.annotation.length;++n){if("object"!=typeof e.annotation[n])throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected");t.annotation[n]=p.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(e.annotation[n])}}return t},vt.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.annotation=[]),e.annotation&&e.annotation.length){n.annotation=[];for(var o=0;o<e.annotation.length;++o)n.annotation[o]=p.google.protobuf.GeneratedCodeInfo.Annotation.toObject(e.annotation[o],t)}return 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.protobuf.GeneratedCodeInfo"},vt.Annotation=(Ot.prototype.path=u.emptyArray,Ot.prototype.sourceFile="",Ot.prototype.begin=0,Ot.prototype.end=0,Ot.prototype.semantic=0,Ot.create=function(e){return new Ot(e)},Ot.encode=function(e,t){if(t=t||a.create(),null!=e.path&&e.path.length){t.uint32(10).fork();for(var n=0;n<e.path.length;++n)t.int32(e.path[n]);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},Ot.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ot.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.GeneratedCodeInfo.Annotation;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:if(o.path&&o.path.length||(o.path=[]),2==(7&r))for(var i=e.uint32()+e.pos;e.pos<i;)o.path.push(e.int32());else o.path.push(e.int32());break;case 2:o.sourceFile=e.string();break;case 3:o.begin=e.int32();break;case 4:o.end=e.int32();break;case 5:o.semantic=e.int32();break;default:e.skipType(7&r)}}return o},Ot.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Ot.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.path&&e.hasOwnProperty("path")){if(!Array.isArray(e.path))return"path: array expected";for(var t=0;t<e.path.length;++t)if(!u.isInteger(e.path[t]))return"path: integer[] expected"}if(null!=e.sourceFile&&e.hasOwnProperty("sourceFile")&&!u.isString(e.sourceFile))return"sourceFile: string expected";if(null!=e.begin&&e.hasOwnProperty("begin")&&!u.isInteger(e.begin))return"begin: integer expected";if(null!=e.end&&e.hasOwnProperty("end")&&!u.isInteger(e.end))return"end: integer expected";if(null!=e.semantic&&e.hasOwnProperty("semantic"))switch(e.semantic){default:return"semantic: enum value expected";case 0:case 1:case 2:}return null},Ot.fromObject=function(e){if(e instanceof p.google.protobuf.GeneratedCodeInfo.Annotation)return e;var t=new p.google.protobuf.GeneratedCodeInfo.Annotation;if(e.path){if(!Array.isArray(e.path))throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected");t.path=[];for(var n=0;n<e.path.length;++n)t.path[n]=0|e.path[n]}switch(null!=e.sourceFile&&(t.sourceFile=String(e.sourceFile)),null!=e.begin&&(t.begin=0|e.begin),null!=e.end&&(t.end=0|e.end),e.semantic){default:"number"==typeof e.semantic&&(t.semantic=e.semantic);break;case"NONE":case 0:t.semantic=0;break;case"SET":case 1:t.semantic=1;break;case"ALIAS":case 2:t.semantic=2}return t},Ot.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.path=[]),t.defaults&&(n.sourceFile="",n.begin=0,n.end=0,n.semantic=t.enums===String?"NONE":0),e.path&&e.path.length){n.path=[];for(var o=0;o<e.path.length;++o)n.path[o]=e.path[o]}return null!=e.sourceFile&&e.hasOwnProperty("sourceFile")&&(n.sourceFile=e.sourceFile),null!=e.begin&&e.hasOwnProperty("begin")&&(n.begin=e.begin),null!=e.end&&e.hasOwnProperty("end")&&(n.end=e.end),null!=e.semantic&&e.hasOwnProperty("semantic")&&(n.semantic=t.enums!==String||void 0===p.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[e.semantic]?e.semantic:p.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[e.semantic]),n},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.protobuf.GeneratedCodeInfo.Annotation"},Ot.Semantic=(r={},(i=Object.create(r))[r[0]="NONE"]=0,i[r[1]="SET"]=1,i[r[2]="ALIAS"]=2,i),Ot),vt),e.Duration=(St.prototype.seconds=u.Long?u.Long.fromBits(0,0,!1):0,St.prototype.nanos=0,St.create=function(e){return new St(e)},St.encode=function(e,t){return t=t||a.create(),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},St.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},St.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.Duration;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.seconds=e.int64();break;case 2:o.nanos=e.int32();break;default:e.skipType(7&r)}}return o},St.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},St.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.seconds&&e.hasOwnProperty("seconds")&&!(u.isInteger(e.seconds)||e.seconds&&u.isInteger(e.seconds.low)&&u.isInteger(e.seconds.high))?"seconds: integer|Long expected":null!=e.nanos&&e.hasOwnProperty("nanos")&&!u.isInteger(e.nanos)?"nanos: integer expected":null},St.fromObject=function(e){var t;return e instanceof p.google.protobuf.Duration?e:(t=new p.google.protobuf.Duration,null!=e.seconds&&(u.Long?(t.seconds=u.Long.fromValue(e.seconds)).unsigned=!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 u.LongBits(e.seconds.low>>>0,e.seconds.high>>>0).toNumber())),null!=e.nanos&&(t.nanos=0|e.nanos),t)},St.toObject=function(e,t){var n,o={};return(t=t||{}).defaults&&(u.Long?(n=new u.Long(0,0,!1),o.seconds=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.seconds=t.longs===String?"0":0,o.nanos=0),null!=e.seconds&&e.hasOwnProperty("seconds")&&("number"==typeof e.seconds?o.seconds=t.longs===String?String(e.seconds):e.seconds:o.seconds=t.longs===String?u.Long.prototype.toString.call(e.seconds):t.longs===Number?new u.LongBits(e.seconds.low>>>0,e.seconds.high>>>0).toNumber():e.seconds),null!=e.nanos&&e.hasOwnProperty("nanos")&&(o.nanos=e.nanos),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.protobuf.Duration"},St),e.Struct=(wt.prototype.fields=u.emptyObject,wt.create=function(e){return new wt(e)},wt.encode=function(e,t){if(t=t||a.create(),null!=e.fields&&Object.hasOwnProperty.call(e,"fields"))for(var n=Object.keys(e.fields),o=0;o<n.length;++o)t.uint32(10).fork().uint32(10).string(n[o]),p.google.protobuf.Value.encode(e.fields[n[o]],t.uint32(18).fork()).ldelim().ldelim();return t},wt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},wt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.Struct;e.pos<n;){var r=e.uint32();if(r>>>3==1){o.fields===u.emptyObject&&(o.fields={});for(var i=e.uint32()+e.pos,a="",l=null;e.pos<i;){var s=e.uint32();switch(s>>>3){case 1:a=e.string();break;case 2:l=p.google.protobuf.Value.decode(e,e.uint32());break;default:e.skipType(7&s)}}o.fields[a]=l}else e.skipType(7&r)}return o},wt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},wt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.fields&&e.hasOwnProperty("fields")){if(!u.isObject(e.fields))return"fields: object expected";for(var t=Object.keys(e.fields),n=0;n<t.length;++n){var o=p.google.protobuf.Value.verify(e.fields[t[n]]);if(o)return"fields."+o}}return null},wt.fromObject=function(e){if(e instanceof p.google.protobuf.Struct)return e;var t=new p.google.protobuf.Struct;if(e.fields){if("object"!=typeof e.fields)throw TypeError(".google.protobuf.Struct.fields: object expected");t.fields={};for(var n=Object.keys(e.fields),o=0;o<n.length;++o){if("object"!=typeof e.fields[n[o]])throw TypeError(".google.protobuf.Struct.fields: object expected");t.fields[n[o]]=p.google.protobuf.Value.fromObject(e.fields[n[o]])}}return t},wt.toObject=function(e,t){var n,o={};if(((t=t||{}).objects||t.defaults)&&(o.fields={}),e.fields&&(n=Object.keys(e.fields)).length){o.fields={};for(var r=0;r<n.length;++r)o.fields[n[r]]=p.google.protobuf.Value.toObject(e.fields[n[r]],t)}return 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.protobuf.Struct"},wt),e.Value=(U.prototype.nullValue=null,U.prototype.numberValue=null,U.prototype.stringValue=null,U.prototype.boolValue=null,U.prototype.structValue=null,U.prototype.listValue=null,Object.defineProperty(U.prototype,"kind",{get:u.oneOfGetter(r=["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]),set:u.oneOfSetter(r)}),U.create=function(e){return new U(e)},U.encode=function(e,t){return t=t||a.create(),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")&&p.google.protobuf.Struct.encode(e.structValue,t.uint32(42).fork()).ldelim(),null!=e.listValue&&Object.hasOwnProperty.call(e,"listValue")&&p.google.protobuf.ListValue.encode(e.listValue,t.uint32(50).fork()).ldelim(),t},U.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},U.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.Value;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.nullValue=e.int32();break;case 2:o.numberValue=e.double();break;case 3:o.stringValue=e.string();break;case 4:o.boolValue=e.bool();break;case 5:o.structValue=p.google.protobuf.Struct.decode(e,e.uint32());break;case 6:o.listValue=p.google.protobuf.ListValue.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},U.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},U.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t,n={};if(null!=e.nullValue&&e.hasOwnProperty("nullValue")&&(n.kind=1,0!==e.nullValue))return"nullValue: enum value expected";if(null!=e.numberValue&&e.hasOwnProperty("numberValue")){if(1===n.kind)return"kind: multiple values";if(n.kind=1,"number"!=typeof e.numberValue)return"numberValue: number expected"}if(null!=e.stringValue&&e.hasOwnProperty("stringValue")){if(1===n.kind)return"kind: multiple values";if(n.kind=1,!u.isString(e.stringValue))return"stringValue: string expected"}if(null!=e.boolValue&&e.hasOwnProperty("boolValue")){if(1===n.kind)return"kind: multiple values";if(n.kind=1,"boolean"!=typeof e.boolValue)return"boolValue: boolean expected"}if(null!=e.structValue&&e.hasOwnProperty("structValue")){if(1===n.kind)return"kind: multiple values";if(n.kind=1,t=p.google.protobuf.Struct.verify(e.structValue))return"structValue."+t}if(null!=e.listValue&&e.hasOwnProperty("listValue")){if(1===n.kind)return"kind: multiple values";if(n.kind=1,t=p.google.protobuf.ListValue.verify(e.listValue))return"listValue."+t}return null},U.fromObject=function(e){if(e instanceof p.google.protobuf.Value)return e;var t=new p.google.protobuf.Value;switch(e.nullValue){default:"number"==typeof e.nullValue&&(t.nullValue=e.nullValue);break;case"NULL_VALUE":case 0:t.nullValue=0}if(null!=e.numberValue&&(t.numberValue=Number(e.numberValue)),null!=e.stringValue&&(t.stringValue=String(e.stringValue)),null!=e.boolValue&&(t.boolValue=Boolean(e.boolValue)),null!=e.structValue){if("object"!=typeof e.structValue)throw TypeError(".google.protobuf.Value.structValue: object expected");t.structValue=p.google.protobuf.Struct.fromObject(e.structValue)}if(null!=e.listValue){if("object"!=typeof e.listValue)throw TypeError(".google.protobuf.Value.listValue: object expected");t.listValue=p.google.protobuf.ListValue.fromObject(e.listValue)}return t},U.toObject=function(e,t){t=t||{};var n={};return null!=e.nullValue&&e.hasOwnProperty("nullValue")&&(n.nullValue=t.enums!==String||void 0===p.google.protobuf.NullValue[e.nullValue]?e.nullValue:p.google.protobuf.NullValue[e.nullValue],t.oneofs)&&(n.kind="nullValue"),null!=e.numberValue&&e.hasOwnProperty("numberValue")&&(n.numberValue=t.json&&!isFinite(e.numberValue)?String(e.numberValue):e.numberValue,t.oneofs)&&(n.kind="numberValue"),null!=e.stringValue&&e.hasOwnProperty("stringValue")&&(n.stringValue=e.stringValue,t.oneofs)&&(n.kind="stringValue"),null!=e.boolValue&&e.hasOwnProperty("boolValue")&&(n.boolValue=e.boolValue,t.oneofs)&&(n.kind="boolValue"),null!=e.structValue&&e.hasOwnProperty("structValue")&&(n.structValue=p.google.protobuf.Struct.toObject(e.structValue,t),t.oneofs)&&(n.kind="structValue"),null!=e.listValue&&e.hasOwnProperty("listValue")&&(n.listValue=p.google.protobuf.ListValue.toObject(e.listValue,t),t.oneofs)&&(n.kind="listValue"),n},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.protobuf.Value"},U),e.NullValue=(i={},(r=Object.create(i))[i[0]="NULL_VALUE"]=0,r),e.ListValue=(jt.prototype.values=u.emptyArray,jt.create=function(e){return new jt(e)},jt.encode=function(e,t){if(t=t||a.create(),null!=e.values&&e.values.length)for(var n=0;n<e.values.length;++n)p.google.protobuf.Value.encode(e.values[n],t.uint32(10).fork()).ldelim();return t},jt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},jt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.ListValue;e.pos<n;){var r=e.uint32();r>>>3==1?(o.values&&o.values.length||(o.values=[]),o.values.push(p.google.protobuf.Value.decode(e,e.uint32()))):e.skipType(7&r)}return o},jt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},jt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.values&&e.hasOwnProperty("values")){if(!Array.isArray(e.values))return"values: array expected";for(var t=0;t<e.values.length;++t){var n=p.google.protobuf.Value.verify(e.values[t]);if(n)return"values."+n}}return null},jt.fromObject=function(e){if(e instanceof p.google.protobuf.ListValue)return e;var t=new p.google.protobuf.ListValue;if(e.values){if(!Array.isArray(e.values))throw TypeError(".google.protobuf.ListValue.values: array expected");t.values=[];for(var n=0;n<e.values.length;++n){if("object"!=typeof e.values[n])throw TypeError(".google.protobuf.ListValue.values: object expected");t.values[n]=p.google.protobuf.Value.fromObject(e.values[n])}}return t},jt.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.values=[]),e.values&&e.values.length){n.values=[];for(var o=0;o<e.values.length;++o)n.values[o]=p.google.protobuf.Value.toObject(e.values[o],t)}return n},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.protobuf.ListValue"},jt),e.Timestamp=(Pt.prototype.seconds=u.Long?u.Long.fromBits(0,0,!1):0,Pt.prototype.nanos=0,Pt.create=function(e){return new Pt(e)},Pt.encode=function(e,t){return t=t||a.create(),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},Pt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Pt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.Timestamp;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.seconds=e.int64();break;case 2:o.nanos=e.int32();break;default:e.skipType(7&r)}}return o},Pt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Pt.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.seconds&&e.hasOwnProperty("seconds")&&!(u.isInteger(e.seconds)||e.seconds&&u.isInteger(e.seconds.low)&&u.isInteger(e.seconds.high))?"seconds: integer|Long expected":null!=e.nanos&&e.hasOwnProperty("nanos")&&!u.isInteger(e.nanos)?"nanos: integer expected":null},Pt.fromObject=function(e){var t;return e instanceof p.google.protobuf.Timestamp?e:(t=new p.google.protobuf.Timestamp,null!=e.seconds&&(u.Long?(t.seconds=u.Long.fromValue(e.seconds)).unsigned=!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 u.LongBits(e.seconds.low>>>0,e.seconds.high>>>0).toNumber())),null!=e.nanos&&(t.nanos=0|e.nanos),t)},Pt.toObject=function(e,t){var n,o={};return(t=t||{}).defaults&&(u.Long?(n=new u.Long(0,0,!1),o.seconds=t.longs===String?n.toString():t.longs===Number?n.toNumber():n):o.seconds=t.longs===String?"0":0,o.nanos=0),null!=e.seconds&&e.hasOwnProperty("seconds")&&("number"==typeof e.seconds?o.seconds=t.longs===String?String(e.seconds):e.seconds:o.seconds=t.longs===String?u.Long.prototype.toString.call(e.seconds):t.longs===Number?new u.LongBits(e.seconds.low>>>0,e.seconds.high>>>0).toNumber():e.seconds),null!=e.nanos&&e.hasOwnProperty("nanos")&&(o.nanos=e.nanos),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.protobuf.Timestamp"},Pt),e.Any=(Tt.prototype.type_url="",Tt.prototype.value=u.newBuffer([]),Tt.create=function(e){return new Tt(e)},Tt.encode=function(e,t){return t=t||a.create(),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},Tt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Tt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.protobuf.Any;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.type_url=e.string();break;case 2:o.value=e.bytes();break;default:e.skipType(7&r)}}return o},Tt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Tt.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.type_url&&e.hasOwnProperty("type_url")&&!u.isString(e.type_url)?"type_url: string expected":null!=e.value&&e.hasOwnProperty("value")&&!(e.value&&"number"==typeof e.value.length||u.isString(e.value))?"value: buffer expected":null},Tt.fromObject=function(e){var t;return e instanceof p.google.protobuf.Any?e:(t=new p.google.protobuf.Any,null!=e.type_url&&(t.type_url=String(e.type_url)),null!=e.value&&("string"==typeof e.value?u.base64.decode(e.value,t.value=u.newBuffer(u.base64.length(e.value)),0):0<=e.value.length&&(t.value=e.value)),t)},Tt.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.type_url="",t.bytes===String?n.value="":(n.value=[],t.bytes!==Array&&(n.value=u.newBuffer(n.value)))),null!=e.type_url&&e.hasOwnProperty("type_url")&&(n.type_url=e.type_url),null!=e.value&&e.hasOwnProperty("value")&&(n.value=t.bytes===String?u.base64.encode(e.value,0,e.value.length):t.bytes===Array?Array.prototype.slice.call(e.value):e.value),n},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.protobuf.Any"},Tt),e.Empty=(xt.create=function(e){return new xt(e)},xt.encode=function(e,t){return t=t||a.create()},xt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},xt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,t=new p.google.protobuf.Empty;e.pos<n;){var o=e.uint32();e.skipType(7&o)}return t},xt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},xt.verify=function(e){return"object"!=typeof e||null===e?"object expected":null},xt.fromObject=function(e){return e instanceof p.google.protobuf.Empty?e:new p.google.protobuf.Empty},xt.toObject=function(){return{}},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.protobuf.Empty"},xt),e),L.rpc=((t={}).Status=(kt.prototype.code=0,kt.prototype.message="",kt.prototype.details=u.emptyArray,kt.create=function(e){return new kt(e)},kt.encode=function(e,t){if(t=t||a.create(),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 n=0;n<e.details.length;++n)p.google.protobuf.Any.encode(e.details[n],t.uint32(26).fork()).ldelim();return t},kt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},kt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.rpc.Status;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.code=e.int32();break;case 2:o.message=e.string();break;case 3:o.details&&o.details.length||(o.details=[]),o.details.push(p.google.protobuf.Any.decode(e,e.uint32()));break;default:e.skipType(7&r)}}return o},kt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},kt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.code&&e.hasOwnProperty("code")&&!u.isInteger(e.code))return"code: integer expected";if(null!=e.message&&e.hasOwnProperty("message")&&!u.isString(e.message))return"message: string expected";if(null!=e.details&&e.hasOwnProperty("details")){if(!Array.isArray(e.details))return"details: array expected";for(var t=0;t<e.details.length;++t){var n=p.google.protobuf.Any.verify(e.details[t]);if(n)return"details."+n}}return null},kt.fromObject=function(e){if(e instanceof p.google.rpc.Status)return e;var t=new p.google.rpc.Status;if(null!=e.code&&(t.code=0|e.code),null!=e.message&&(t.message=String(e.message)),e.details){if(!Array.isArray(e.details))throw TypeError(".google.rpc.Status.details: array expected");t.details=[];for(var n=0;n<e.details.length;++n){if("object"!=typeof e.details[n])throw TypeError(".google.rpc.Status.details: object expected");t.details[n]=p.google.protobuf.Any.fromObject(e.details[n])}}return t},kt.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.details=[]),t.defaults&&(n.code=0,n.message=""),null!=e.code&&e.hasOwnProperty("code")&&(n.code=e.code),null!=e.message&&e.hasOwnProperty("message")&&(n.message=e.message),e.details&&e.details.length){n.details=[];for(var o=0;o<e.details.length;++o)n.details[o]=p.google.protobuf.Any.toObject(e.details[o],t)}return n},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.rpc.Status"},kt),t),L.type=((n={}).Date=(It.prototype.year=0,It.prototype.month=0,It.prototype.day=0,It.create=function(e){return new It(e)},It.encode=function(e,t){return t=t||a.create(),null!=e.year&&Object.hasOwnProperty.call(e,"year")&&t.uint32(8).int32(e.year),null!=e.month&&Object.hasOwnProperty.call(e,"month")&&t.uint32(16).int32(e.month),null!=e.day&&Object.hasOwnProperty.call(e,"day")&&t.uint32(24).int32(e.day),t},It.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},It.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.type.Date;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.year=e.int32();break;case 2:o.month=e.int32();break;case 3:o.day=e.int32();break;default:e.skipType(7&r)}}return o},It.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},It.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.year&&e.hasOwnProperty("year")&&!u.isInteger(e.year)?"year: integer expected":null!=e.month&&e.hasOwnProperty("month")&&!u.isInteger(e.month)?"month: integer expected":null!=e.day&&e.hasOwnProperty("day")&&!u.isInteger(e.day)?"day: integer expected":null},It.fromObject=function(e){var t;return e instanceof p.google.type.Date?e:(t=new p.google.type.Date,null!=e.year&&(t.year=0|e.year),null!=e.month&&(t.month=0|e.month),null!=e.day&&(t.day=0|e.day),t)},It.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.year=0,n.month=0,n.day=0),null!=e.year&&e.hasOwnProperty("year")&&(n.year=e.year),null!=e.month&&e.hasOwnProperty("month")&&(n.month=e.month),null!=e.day&&e.hasOwnProperty("day")&&(n.day=e.day),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.type.Date"},It),n),L.longrunning=((i={}).Operations=(((Dt.prototype=Object.create(o.rpc.Service.prototype)).constructor=Dt).create=function(e,t,n){return new this(e,t,n)},Object.defineProperty(Dt.prototype.listOperations=function e(t,n){return this.rpcCall(e,p.google.longrunning.ListOperationsRequest,p.google.longrunning.ListOperationsResponse,t,n)},"name",{value:"ListOperations"}),Object.defineProperty(Dt.prototype.getOperation=function e(t,n){return this.rpcCall(e,p.google.longrunning.GetOperationRequest,p.google.longrunning.Operation,t,n)},"name",{value:"GetOperation"}),Object.defineProperty(Dt.prototype.deleteOperation=function e(t,n){return this.rpcCall(e,p.google.longrunning.DeleteOperationRequest,p.google.protobuf.Empty,t,n)},"name",{value:"DeleteOperation"}),Object.defineProperty(Dt.prototype.cancelOperation=function e(t,n){return this.rpcCall(e,p.google.longrunning.CancelOperationRequest,p.google.protobuf.Empty,t,n)},"name",{value:"CancelOperation"}),Object.defineProperty(Dt.prototype.waitOperation=function e(t,n){return this.rpcCall(e,p.google.longrunning.WaitOperationRequest,p.google.longrunning.Operation,t,n)},"name",{value:"WaitOperation"}),Dt),i.Operation=(Et.prototype.name="",Et.prototype.metadata=null,Et.prototype.done=!1,Et.prototype.error=null,Et.prototype.response=null,Object.defineProperty(Et.prototype,"result",{get:u.oneOfGetter(r=["error","response"]),set:u.oneOfSetter(r)}),Et.create=function(e){return new Et(e)},Et.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.metadata&&Object.hasOwnProperty.call(e,"metadata")&&p.google.protobuf.Any.encode(e.metadata,t.uint32(18).fork()).ldelim(),null!=e.done&&Object.hasOwnProperty.call(e,"done")&&t.uint32(24).bool(e.done),null!=e.error&&Object.hasOwnProperty.call(e,"error")&&p.google.rpc.Status.encode(e.error,t.uint32(34).fork()).ldelim(),null!=e.response&&Object.hasOwnProperty.call(e,"response")&&p.google.protobuf.Any.encode(e.response,t.uint32(42).fork()).ldelim(),t},Et.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Et.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.Operation;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.metadata=p.google.protobuf.Any.decode(e,e.uint32());break;case 3:o.done=e.bool();break;case 4:o.error=p.google.rpc.Status.decode(e,e.uint32());break;case 5:o.response=p.google.protobuf.Any.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},Et.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Et.verify=function(e){if("object"!=typeof e||null===e)return"object expected";var t,n={};if(null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name))return"name: string expected";if(null!=e.metadata&&e.hasOwnProperty("metadata")&&(t=p.google.protobuf.Any.verify(e.metadata)))return"metadata."+t;if(null!=e.done&&e.hasOwnProperty("done")&&"boolean"!=typeof e.done)return"done: boolean expected";if(null!=e.error&&e.hasOwnProperty("error")&&(n.result=1,t=p.google.rpc.Status.verify(e.error)))return"error."+t;if(null!=e.response&&e.hasOwnProperty("response")){if(1===n.result)return"result: multiple values";if(n.result=1,t=p.google.protobuf.Any.verify(e.response))return"response."+t}return null},Et.fromObject=function(e){if(e instanceof p.google.longrunning.Operation)return e;var t=new p.google.longrunning.Operation;if(null!=e.name&&(t.name=String(e.name)),null!=e.metadata){if("object"!=typeof e.metadata)throw TypeError(".google.longrunning.Operation.metadata: object expected");t.metadata=p.google.protobuf.Any.fromObject(e.metadata)}if(null!=e.done&&(t.done=Boolean(e.done)),null!=e.error){if("object"!=typeof e.error)throw TypeError(".google.longrunning.Operation.error: object expected");t.error=p.google.rpc.Status.fromObject(e.error)}if(null!=e.response){if("object"!=typeof e.response)throw TypeError(".google.longrunning.Operation.response: object expected");t.response=p.google.protobuf.Any.fromObject(e.response)}return t},Et.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name="",n.metadata=null,n.done=!1),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.metadata&&e.hasOwnProperty("metadata")&&(n.metadata=p.google.protobuf.Any.toObject(e.metadata,t)),null!=e.done&&e.hasOwnProperty("done")&&(n.done=e.done),null!=e.error&&e.hasOwnProperty("error")&&(n.error=p.google.rpc.Status.toObject(e.error,t),t.oneofs)&&(n.result="error"),null!=e.response&&e.hasOwnProperty("response")&&(n.response=p.google.protobuf.Any.toObject(e.response,t),t.oneofs)&&(n.result="response"),n},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.longrunning.Operation"},Et),i.GetOperationRequest=(Ct.prototype.name="",Ct.create=function(e){return new Ct(e)},Ct.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},Ct.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ct.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.GetOperationRequest;e.pos<n;){var r=e.uint32();r>>>3==1?o.name=e.string():e.skipType(7&r)}return o},Ct.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Ct.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name)?"name: string expected":null},Ct.fromObject=function(e){var t;return e instanceof p.google.longrunning.GetOperationRequest?e:(t=new p.google.longrunning.GetOperationRequest,null!=e.name&&(t.name=String(e.name)),t)},Ct.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},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.longrunning.GetOperationRequest"},Ct),i.ListOperationsRequest=(Rt.prototype.name="",Rt.prototype.filter="",Rt.prototype.pageSize=0,Rt.prototype.pageToken="",Rt.create=function(e){return new Rt(e)},Rt.encode=function(e,t){return t=t||a.create(),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},Rt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Rt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.ListOperationsRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 4:o.name=e.string();break;case 1:o.filter=e.string();break;case 2:o.pageSize=e.int32();break;case 3:o.pageToken=e.string();break;default:e.skipType(7&r)}}return o},Rt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Rt.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name)?"name: string expected":null!=e.filter&&e.hasOwnProperty("filter")&&!u.isString(e.filter)?"filter: string expected":null!=e.pageSize&&e.hasOwnProperty("pageSize")&&!u.isInteger(e.pageSize)?"pageSize: integer expected":null!=e.pageToken&&e.hasOwnProperty("pageToken")&&!u.isString(e.pageToken)?"pageToken: string expected":null},Rt.fromObject=function(e){var t;return e instanceof p.google.longrunning.ListOperationsRequest?e:(t=new p.google.longrunning.ListOperationsRequest,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)},Rt.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.filter="",n.pageSize=0,n.pageToken="",n.name=""),null!=e.filter&&e.hasOwnProperty("filter")&&(n.filter=e.filter),null!=e.pageSize&&e.hasOwnProperty("pageSize")&&(n.pageSize=e.pageSize),null!=e.pageToken&&e.hasOwnProperty("pageToken")&&(n.pageToken=e.pageToken),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},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.longrunning.ListOperationsRequest"},Rt),i.ListOperationsResponse=(Nt.prototype.operations=u.emptyArray,Nt.prototype.nextPageToken="",Nt.create=function(e){return new Nt(e)},Nt.encode=function(e,t){if(t=t||a.create(),null!=e.operations&&e.operations.length)for(var n=0;n<e.operations.length;++n)p.google.longrunning.Operation.encode(e.operations[n],t.uint32(10).fork()).ldelim();return null!=e.nextPageToken&&Object.hasOwnProperty.call(e,"nextPageToken")&&t.uint32(18).string(e.nextPageToken),t},Nt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Nt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.ListOperationsResponse;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.operations&&o.operations.length||(o.operations=[]),o.operations.push(p.google.longrunning.Operation.decode(e,e.uint32()));break;case 2:o.nextPageToken=e.string();break;default:e.skipType(7&r)}}return o},Nt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Nt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.operations&&e.hasOwnProperty("operations")){if(!Array.isArray(e.operations))return"operations: array expected";for(var t=0;t<e.operations.length;++t){var n=p.google.longrunning.Operation.verify(e.operations[t]);if(n)return"operations."+n}}return null!=e.nextPageToken&&e.hasOwnProperty("nextPageToken")&&!u.isString(e.nextPageToken)?"nextPageToken: string expected":null},Nt.fromObject=function(e){if(e instanceof p.google.longrunning.ListOperationsResponse)return e;var t=new p.google.longrunning.ListOperationsResponse;if(e.operations){if(!Array.isArray(e.operations))throw TypeError(".google.longrunning.ListOperationsResponse.operations: array expected");t.operations=[];for(var n=0;n<e.operations.length;++n){if("object"!=typeof e.operations[n])throw TypeError(".google.longrunning.ListOperationsResponse.operations: object expected");t.operations[n]=p.google.longrunning.Operation.fromObject(e.operations[n])}}return null!=e.nextPageToken&&(t.nextPageToken=String(e.nextPageToken)),t},Nt.toObject=function(e,t){var n={};if(((t=t||{}).arrays||t.defaults)&&(n.operations=[]),t.defaults&&(n.nextPageToken=""),e.operations&&e.operations.length){n.operations=[];for(var o=0;o<e.operations.length;++o)n.operations[o]=p.google.longrunning.Operation.toObject(e.operations[o],t)}return null!=e.nextPageToken&&e.hasOwnProperty("nextPageToken")&&(n.nextPageToken=e.nextPageToken),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.longrunning.ListOperationsResponse"},Nt),i.CancelOperationRequest=(At.prototype.name="",At.create=function(e){return new At(e)},At.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},At.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},At.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.CancelOperationRequest;e.pos<n;){var r=e.uint32();r>>>3==1?o.name=e.string():e.skipType(7&r)}return o},At.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},At.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name)?"name: string expected":null},At.fromObject=function(e){var t;return e instanceof p.google.longrunning.CancelOperationRequest?e:(t=new p.google.longrunning.CancelOperationRequest,null!=e.name&&(t.name=String(e.name)),t)},At.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),n},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.longrunning.CancelOperationRequest"},At),i.DeleteOperationRequest=(Ut.prototype.name="",Ut.create=function(e){return new Ut(e)},Ut.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),t},Ut.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Ut.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.DeleteOperationRequest;e.pos<n;){var r=e.uint32();r>>>3==1?o.name=e.string():e.skipType(7&r)}return o},Ut.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Ut.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name)?"name: string expected":null},Ut.fromObject=function(e){var t;return e instanceof p.google.longrunning.DeleteOperationRequest?e:(t=new p.google.longrunning.DeleteOperationRequest,null!=e.name&&(t.name=String(e.name)),t)},Ut.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name=""),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),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.longrunning.DeleteOperationRequest"},Ut),i.WaitOperationRequest=(Lt.prototype.name="",Lt.prototype.timeout=null,Lt.create=function(e){return new Lt(e)},Lt.encode=function(e,t){return t=t||a.create(),null!=e.name&&Object.hasOwnProperty.call(e,"name")&&t.uint32(10).string(e.name),null!=e.timeout&&Object.hasOwnProperty.call(e,"timeout")&&p.google.protobuf.Duration.encode(e.timeout,t.uint32(18).fork()).ldelim(),t},Lt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},Lt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.WaitOperationRequest;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.name=e.string();break;case 2:o.timeout=p.google.protobuf.Duration.decode(e,e.uint32());break;default:e.skipType(7&r)}}return o},Lt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},Lt.verify=function(e){if("object"!=typeof e||null===e)return"object expected";if(null!=e.name&&e.hasOwnProperty("name")&&!u.isString(e.name))return"name: string expected";if(null!=e.timeout&&e.hasOwnProperty("timeout")){e=p.google.protobuf.Duration.verify(e.timeout);if(e)return"timeout."+e}return null},Lt.fromObject=function(e){if(e instanceof p.google.longrunning.WaitOperationRequest)return e;var t=new p.google.longrunning.WaitOperationRequest;if(null!=e.name&&(t.name=String(e.name)),null!=e.timeout){if("object"!=typeof e.timeout)throw TypeError(".google.longrunning.WaitOperationRequest.timeout: object expected");t.timeout=p.google.protobuf.Duration.fromObject(e.timeout)}return t},Lt.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.name="",n.timeout=null),null!=e.name&&e.hasOwnProperty("name")&&(n.name=e.name),null!=e.timeout&&e.hasOwnProperty("timeout")&&(n.timeout=p.google.protobuf.Duration.toObject(e.timeout,t)),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.longrunning.WaitOperationRequest"},Lt),i.OperationInfo=(qt.prototype.responseType="",qt.prototype.metadataType="",qt.create=function(e){return new qt(e)},qt.encode=function(e,t){return t=t||a.create(),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},qt.encodeDelimited=function(e,t){return this.encode(e,t).ldelim()},qt.decode=function(e,t){e instanceof c||(e=c.create(e));for(var n=void 0===t?e.len:e.pos+t,o=new p.google.longrunning.OperationInfo;e.pos<n;){var r=e.uint32();switch(r>>>3){case 1:o.responseType=e.string();break;case 2:o.metadataType=e.string();break;default:e.skipType(7&r)}}return o},qt.decodeDelimited=function(e){return e instanceof c||(e=new c(e)),this.decode(e,e.uint32())},qt.verify=function(e){return"object"!=typeof e||null===e?"object expected":null!=e.responseType&&e.hasOwnProperty("responseType")&&!u.isString(e.responseType)?"responseType: string expected":null!=e.metadataType&&e.hasOwnProperty("metadataType")&&!u.isString(e.metadataType)?"metadataType: string expected":null},qt.fromObject=function(e){var t;return e instanceof p.google.longrunning.OperationInfo?e:(t=new p.google.longrunning.OperationInfo,null!=e.responseType&&(t.responseType=String(e.responseType)),null!=e.metadataType&&(t.metadataType=String(e.metadataType)),t)},qt.toObject=function(e,t){var n={};return(t=t||{}).defaults&&(n.responseType="",n.metadataType=""),null!=e.responseType&&e.hasOwnProperty("responseType")&&(n.responseType=e.responseType),null!=e.metadataType&&e.hasOwnProperty("metadataType")&&(n.metadataType=e.metadataType),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.longrunning.OperationInfo"},qt),i),L),p});
|