index.js 109 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669
  1. /*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
  2. "use strict";
  3. var $protobuf = require("protobufjs/minimal");
  4. // Common aliases
  5. var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
  6. // Exported root namespace
  7. var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
  8. $root.CouncilCandidacyNoteMetadata = (function() {
  9. /**
  10. * Properties of a CouncilCandidacyNoteMetadata.
  11. * @exports ICouncilCandidacyNoteMetadata
  12. * @interface ICouncilCandidacyNoteMetadata
  13. * @property {string|null} [header] CouncilCandidacyNoteMetadata header
  14. * @property {Array.<string>|null} [bulletPoints] CouncilCandidacyNoteMetadata bulletPoints
  15. * @property {string|null} [bannerImageUri] CouncilCandidacyNoteMetadata bannerImageUri
  16. * @property {string|null} [description] CouncilCandidacyNoteMetadata description
  17. */
  18. /**
  19. * Constructs a new CouncilCandidacyNoteMetadata.
  20. * @exports CouncilCandidacyNoteMetadata
  21. * @classdesc Represents a CouncilCandidacyNoteMetadata.
  22. * @implements ICouncilCandidacyNoteMetadata
  23. * @constructor
  24. * @param {ICouncilCandidacyNoteMetadata=} [properties] Properties to set
  25. */
  26. function CouncilCandidacyNoteMetadata(properties) {
  27. this.bulletPoints = [];
  28. if (properties)
  29. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  30. if (properties[keys[i]] != null)
  31. this[keys[i]] = properties[keys[i]];
  32. }
  33. /**
  34. * CouncilCandidacyNoteMetadata header.
  35. * @member {string} header
  36. * @memberof CouncilCandidacyNoteMetadata
  37. * @instance
  38. */
  39. CouncilCandidacyNoteMetadata.prototype.header = "";
  40. /**
  41. * CouncilCandidacyNoteMetadata bulletPoints.
  42. * @member {Array.<string>} bulletPoints
  43. * @memberof CouncilCandidacyNoteMetadata
  44. * @instance
  45. */
  46. CouncilCandidacyNoteMetadata.prototype.bulletPoints = $util.emptyArray;
  47. /**
  48. * CouncilCandidacyNoteMetadata bannerImageUri.
  49. * @member {string} bannerImageUri
  50. * @memberof CouncilCandidacyNoteMetadata
  51. * @instance
  52. */
  53. CouncilCandidacyNoteMetadata.prototype.bannerImageUri = "";
  54. /**
  55. * CouncilCandidacyNoteMetadata description.
  56. * @member {string} description
  57. * @memberof CouncilCandidacyNoteMetadata
  58. * @instance
  59. */
  60. CouncilCandidacyNoteMetadata.prototype.description = "";
  61. /**
  62. * Creates a new CouncilCandidacyNoteMetadata instance using the specified properties.
  63. * @function create
  64. * @memberof CouncilCandidacyNoteMetadata
  65. * @static
  66. * @param {ICouncilCandidacyNoteMetadata=} [properties] Properties to set
  67. * @returns {CouncilCandidacyNoteMetadata} CouncilCandidacyNoteMetadata instance
  68. */
  69. CouncilCandidacyNoteMetadata.create = function create(properties) {
  70. return new CouncilCandidacyNoteMetadata(properties);
  71. };
  72. /**
  73. * Encodes the specified CouncilCandidacyNoteMetadata message. Does not implicitly {@link CouncilCandidacyNoteMetadata.verify|verify} messages.
  74. * @function encode
  75. * @memberof CouncilCandidacyNoteMetadata
  76. * @static
  77. * @param {ICouncilCandidacyNoteMetadata} message CouncilCandidacyNoteMetadata message or plain object to encode
  78. * @param {$protobuf.Writer} [writer] Writer to encode to
  79. * @returns {$protobuf.Writer} Writer
  80. */
  81. CouncilCandidacyNoteMetadata.encode = function encode(message, writer) {
  82. if (!writer)
  83. writer = $Writer.create();
  84. if (message.header != null && Object.hasOwnProperty.call(message, "header"))
  85. writer.uint32(/* id 1, wireType 2 =*/10).string(message.header);
  86. if (message.bulletPoints != null && message.bulletPoints.length)
  87. for (var i = 0; i < message.bulletPoints.length; ++i)
  88. writer.uint32(/* id 2, wireType 2 =*/18).string(message.bulletPoints[i]);
  89. if (message.bannerImageUri != null && Object.hasOwnProperty.call(message, "bannerImageUri"))
  90. writer.uint32(/* id 3, wireType 2 =*/26).string(message.bannerImageUri);
  91. if (message.description != null && Object.hasOwnProperty.call(message, "description"))
  92. writer.uint32(/* id 4, wireType 2 =*/34).string(message.description);
  93. return writer;
  94. };
  95. /**
  96. * Encodes the specified CouncilCandidacyNoteMetadata message, length delimited. Does not implicitly {@link CouncilCandidacyNoteMetadata.verify|verify} messages.
  97. * @function encodeDelimited
  98. * @memberof CouncilCandidacyNoteMetadata
  99. * @static
  100. * @param {ICouncilCandidacyNoteMetadata} message CouncilCandidacyNoteMetadata message or plain object to encode
  101. * @param {$protobuf.Writer} [writer] Writer to encode to
  102. * @returns {$protobuf.Writer} Writer
  103. */
  104. CouncilCandidacyNoteMetadata.encodeDelimited = function encodeDelimited(message, writer) {
  105. return this.encode(message, writer).ldelim();
  106. };
  107. /**
  108. * Decodes a CouncilCandidacyNoteMetadata message from the specified reader or buffer.
  109. * @function decode
  110. * @memberof CouncilCandidacyNoteMetadata
  111. * @static
  112. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  113. * @param {number} [length] Message length if known beforehand
  114. * @returns {CouncilCandidacyNoteMetadata} CouncilCandidacyNoteMetadata
  115. * @throws {Error} If the payload is not a reader or valid buffer
  116. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  117. */
  118. CouncilCandidacyNoteMetadata.decode = function decode(reader, length) {
  119. if (!(reader instanceof $Reader))
  120. reader = $Reader.create(reader);
  121. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CouncilCandidacyNoteMetadata();
  122. while (reader.pos < end) {
  123. var tag = reader.uint32();
  124. switch (tag >>> 3) {
  125. case 1:
  126. message.header = reader.string();
  127. break;
  128. case 2:
  129. if (!(message.bulletPoints && message.bulletPoints.length))
  130. message.bulletPoints = [];
  131. message.bulletPoints.push(reader.string());
  132. break;
  133. case 3:
  134. message.bannerImageUri = reader.string();
  135. break;
  136. case 4:
  137. message.description = reader.string();
  138. break;
  139. default:
  140. reader.skipType(tag & 7);
  141. break;
  142. }
  143. }
  144. return message;
  145. };
  146. /**
  147. * Decodes a CouncilCandidacyNoteMetadata message from the specified reader or buffer, length delimited.
  148. * @function decodeDelimited
  149. * @memberof CouncilCandidacyNoteMetadata
  150. * @static
  151. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  152. * @returns {CouncilCandidacyNoteMetadata} CouncilCandidacyNoteMetadata
  153. * @throws {Error} If the payload is not a reader or valid buffer
  154. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  155. */
  156. CouncilCandidacyNoteMetadata.decodeDelimited = function decodeDelimited(reader) {
  157. if (!(reader instanceof $Reader))
  158. reader = new $Reader(reader);
  159. return this.decode(reader, reader.uint32());
  160. };
  161. /**
  162. * Verifies a CouncilCandidacyNoteMetadata message.
  163. * @function verify
  164. * @memberof CouncilCandidacyNoteMetadata
  165. * @static
  166. * @param {Object.<string,*>} message Plain object to verify
  167. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  168. */
  169. CouncilCandidacyNoteMetadata.verify = function verify(message) {
  170. if (typeof message !== "object" || message === null)
  171. return "object expected";
  172. if (message.header != null && message.hasOwnProperty("header"))
  173. if (!$util.isString(message.header))
  174. return "header: string expected";
  175. if (message.bulletPoints != null && message.hasOwnProperty("bulletPoints")) {
  176. if (!Array.isArray(message.bulletPoints))
  177. return "bulletPoints: array expected";
  178. for (var i = 0; i < message.bulletPoints.length; ++i)
  179. if (!$util.isString(message.bulletPoints[i]))
  180. return "bulletPoints: string[] expected";
  181. }
  182. if (message.bannerImageUri != null && message.hasOwnProperty("bannerImageUri"))
  183. if (!$util.isString(message.bannerImageUri))
  184. return "bannerImageUri: string expected";
  185. if (message.description != null && message.hasOwnProperty("description"))
  186. if (!$util.isString(message.description))
  187. return "description: string expected";
  188. return null;
  189. };
  190. /**
  191. * Creates a CouncilCandidacyNoteMetadata message from a plain object. Also converts values to their respective internal types.
  192. * @function fromObject
  193. * @memberof CouncilCandidacyNoteMetadata
  194. * @static
  195. * @param {Object.<string,*>} object Plain object
  196. * @returns {CouncilCandidacyNoteMetadata} CouncilCandidacyNoteMetadata
  197. */
  198. CouncilCandidacyNoteMetadata.fromObject = function fromObject(object) {
  199. if (object instanceof $root.CouncilCandidacyNoteMetadata)
  200. return object;
  201. var message = new $root.CouncilCandidacyNoteMetadata();
  202. if (object.header != null)
  203. message.header = String(object.header);
  204. if (object.bulletPoints) {
  205. if (!Array.isArray(object.bulletPoints))
  206. throw TypeError(".CouncilCandidacyNoteMetadata.bulletPoints: array expected");
  207. message.bulletPoints = [];
  208. for (var i = 0; i < object.bulletPoints.length; ++i)
  209. message.bulletPoints[i] = String(object.bulletPoints[i]);
  210. }
  211. if (object.bannerImageUri != null)
  212. message.bannerImageUri = String(object.bannerImageUri);
  213. if (object.description != null)
  214. message.description = String(object.description);
  215. return message;
  216. };
  217. /**
  218. * Creates a plain object from a CouncilCandidacyNoteMetadata message. Also converts values to other types if specified.
  219. * @function toObject
  220. * @memberof CouncilCandidacyNoteMetadata
  221. * @static
  222. * @param {CouncilCandidacyNoteMetadata} message CouncilCandidacyNoteMetadata
  223. * @param {$protobuf.IConversionOptions} [options] Conversion options
  224. * @returns {Object.<string,*>} Plain object
  225. */
  226. CouncilCandidacyNoteMetadata.toObject = function toObject(message, options) {
  227. if (!options)
  228. options = {};
  229. var object = {};
  230. if (options.arrays || options.defaults)
  231. object.bulletPoints = [];
  232. if (options.defaults) {
  233. object.header = "";
  234. object.bannerImageUri = "";
  235. object.description = "";
  236. }
  237. if (message.header != null && message.hasOwnProperty("header"))
  238. object.header = message.header;
  239. if (message.bulletPoints && message.bulletPoints.length) {
  240. object.bulletPoints = [];
  241. for (var j = 0; j < message.bulletPoints.length; ++j)
  242. object.bulletPoints[j] = message.bulletPoints[j];
  243. }
  244. if (message.bannerImageUri != null && message.hasOwnProperty("bannerImageUri"))
  245. object.bannerImageUri = message.bannerImageUri;
  246. if (message.description != null && message.hasOwnProperty("description"))
  247. object.description = message.description;
  248. return object;
  249. };
  250. /**
  251. * Converts this CouncilCandidacyNoteMetadata to JSON.
  252. * @function toJSON
  253. * @memberof CouncilCandidacyNoteMetadata
  254. * @instance
  255. * @returns {Object.<string,*>} JSON object
  256. */
  257. CouncilCandidacyNoteMetadata.prototype.toJSON = function toJSON() {
  258. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  259. };
  260. return CouncilCandidacyNoteMetadata;
  261. })();
  262. $root.MembershipMetadata = (function() {
  263. /**
  264. * Properties of a MembershipMetadata.
  265. * @exports IMembershipMetadata
  266. * @interface IMembershipMetadata
  267. * @property {string|null} [name] MembershipMetadata name
  268. * @property {number|null} [avatar] MembershipMetadata avatar
  269. * @property {string|null} [about] MembershipMetadata about
  270. */
  271. /**
  272. * Constructs a new MembershipMetadata.
  273. * @exports MembershipMetadata
  274. * @classdesc Represents a MembershipMetadata.
  275. * @implements IMembershipMetadata
  276. * @constructor
  277. * @param {IMembershipMetadata=} [properties] Properties to set
  278. */
  279. function MembershipMetadata(properties) {
  280. if (properties)
  281. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  282. if (properties[keys[i]] != null)
  283. this[keys[i]] = properties[keys[i]];
  284. }
  285. /**
  286. * MembershipMetadata name.
  287. * @member {string} name
  288. * @memberof MembershipMetadata
  289. * @instance
  290. */
  291. MembershipMetadata.prototype.name = "";
  292. /**
  293. * MembershipMetadata avatar.
  294. * @member {number} avatar
  295. * @memberof MembershipMetadata
  296. * @instance
  297. */
  298. MembershipMetadata.prototype.avatar = 0;
  299. /**
  300. * MembershipMetadata about.
  301. * @member {string} about
  302. * @memberof MembershipMetadata
  303. * @instance
  304. */
  305. MembershipMetadata.prototype.about = "";
  306. /**
  307. * Creates a new MembershipMetadata instance using the specified properties.
  308. * @function create
  309. * @memberof MembershipMetadata
  310. * @static
  311. * @param {IMembershipMetadata=} [properties] Properties to set
  312. * @returns {MembershipMetadata} MembershipMetadata instance
  313. */
  314. MembershipMetadata.create = function create(properties) {
  315. return new MembershipMetadata(properties);
  316. };
  317. /**
  318. * Encodes the specified MembershipMetadata message. Does not implicitly {@link MembershipMetadata.verify|verify} messages.
  319. * @function encode
  320. * @memberof MembershipMetadata
  321. * @static
  322. * @param {IMembershipMetadata} message MembershipMetadata message or plain object to encode
  323. * @param {$protobuf.Writer} [writer] Writer to encode to
  324. * @returns {$protobuf.Writer} Writer
  325. */
  326. MembershipMetadata.encode = function encode(message, writer) {
  327. if (!writer)
  328. writer = $Writer.create();
  329. if (message.name != null && Object.hasOwnProperty.call(message, "name"))
  330. writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
  331. if (message.avatar != null && Object.hasOwnProperty.call(message, "avatar"))
  332. writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.avatar);
  333. if (message.about != null && Object.hasOwnProperty.call(message, "about"))
  334. writer.uint32(/* id 3, wireType 2 =*/26).string(message.about);
  335. return writer;
  336. };
  337. /**
  338. * Encodes the specified MembershipMetadata message, length delimited. Does not implicitly {@link MembershipMetadata.verify|verify} messages.
  339. * @function encodeDelimited
  340. * @memberof MembershipMetadata
  341. * @static
  342. * @param {IMembershipMetadata} message MembershipMetadata message or plain object to encode
  343. * @param {$protobuf.Writer} [writer] Writer to encode to
  344. * @returns {$protobuf.Writer} Writer
  345. */
  346. MembershipMetadata.encodeDelimited = function encodeDelimited(message, writer) {
  347. return this.encode(message, writer).ldelim();
  348. };
  349. /**
  350. * Decodes a MembershipMetadata message from the specified reader or buffer.
  351. * @function decode
  352. * @memberof MembershipMetadata
  353. * @static
  354. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  355. * @param {number} [length] Message length if known beforehand
  356. * @returns {MembershipMetadata} MembershipMetadata
  357. * @throws {Error} If the payload is not a reader or valid buffer
  358. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  359. */
  360. MembershipMetadata.decode = function decode(reader, length) {
  361. if (!(reader instanceof $Reader))
  362. reader = $Reader.create(reader);
  363. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.MembershipMetadata();
  364. while (reader.pos < end) {
  365. var tag = reader.uint32();
  366. switch (tag >>> 3) {
  367. case 1:
  368. message.name = reader.string();
  369. break;
  370. case 2:
  371. message.avatar = reader.uint32();
  372. break;
  373. case 3:
  374. message.about = reader.string();
  375. break;
  376. default:
  377. reader.skipType(tag & 7);
  378. break;
  379. }
  380. }
  381. return message;
  382. };
  383. /**
  384. * Decodes a MembershipMetadata message from the specified reader or buffer, length delimited.
  385. * @function decodeDelimited
  386. * @memberof MembershipMetadata
  387. * @static
  388. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  389. * @returns {MembershipMetadata} MembershipMetadata
  390. * @throws {Error} If the payload is not a reader or valid buffer
  391. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  392. */
  393. MembershipMetadata.decodeDelimited = function decodeDelimited(reader) {
  394. if (!(reader instanceof $Reader))
  395. reader = new $Reader(reader);
  396. return this.decode(reader, reader.uint32());
  397. };
  398. /**
  399. * Verifies a MembershipMetadata message.
  400. * @function verify
  401. * @memberof MembershipMetadata
  402. * @static
  403. * @param {Object.<string,*>} message Plain object to verify
  404. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  405. */
  406. MembershipMetadata.verify = function verify(message) {
  407. if (typeof message !== "object" || message === null)
  408. return "object expected";
  409. if (message.name != null && message.hasOwnProperty("name"))
  410. if (!$util.isString(message.name))
  411. return "name: string expected";
  412. if (message.avatar != null && message.hasOwnProperty("avatar"))
  413. if (!$util.isInteger(message.avatar))
  414. return "avatar: integer expected";
  415. if (message.about != null && message.hasOwnProperty("about"))
  416. if (!$util.isString(message.about))
  417. return "about: string expected";
  418. return null;
  419. };
  420. /**
  421. * Creates a MembershipMetadata message from a plain object. Also converts values to their respective internal types.
  422. * @function fromObject
  423. * @memberof MembershipMetadata
  424. * @static
  425. * @param {Object.<string,*>} object Plain object
  426. * @returns {MembershipMetadata} MembershipMetadata
  427. */
  428. MembershipMetadata.fromObject = function fromObject(object) {
  429. if (object instanceof $root.MembershipMetadata)
  430. return object;
  431. var message = new $root.MembershipMetadata();
  432. if (object.name != null)
  433. message.name = String(object.name);
  434. if (object.avatar != null)
  435. message.avatar = object.avatar >>> 0;
  436. if (object.about != null)
  437. message.about = String(object.about);
  438. return message;
  439. };
  440. /**
  441. * Creates a plain object from a MembershipMetadata message. Also converts values to other types if specified.
  442. * @function toObject
  443. * @memberof MembershipMetadata
  444. * @static
  445. * @param {MembershipMetadata} message MembershipMetadata
  446. * @param {$protobuf.IConversionOptions} [options] Conversion options
  447. * @returns {Object.<string,*>} Plain object
  448. */
  449. MembershipMetadata.toObject = function toObject(message, options) {
  450. if (!options)
  451. options = {};
  452. var object = {};
  453. if (options.defaults) {
  454. object.name = "";
  455. object.avatar = 0;
  456. object.about = "";
  457. }
  458. if (message.name != null && message.hasOwnProperty("name"))
  459. object.name = message.name;
  460. if (message.avatar != null && message.hasOwnProperty("avatar"))
  461. object.avatar = message.avatar;
  462. if (message.about != null && message.hasOwnProperty("about"))
  463. object.about = message.about;
  464. return object;
  465. };
  466. /**
  467. * Converts this MembershipMetadata to JSON.
  468. * @function toJSON
  469. * @memberof MembershipMetadata
  470. * @instance
  471. * @returns {Object.<string,*>} JSON object
  472. */
  473. MembershipMetadata.prototype.toJSON = function toJSON() {
  474. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  475. };
  476. return MembershipMetadata;
  477. })();
  478. $root.OpeningMetadata = (function() {
  479. /**
  480. * Properties of an OpeningMetadata.
  481. * @exports IOpeningMetadata
  482. * @interface IOpeningMetadata
  483. * @property {string} shortDescription OpeningMetadata shortDescription
  484. * @property {string} description OpeningMetadata description
  485. * @property {number|null} [hiringLimit] OpeningMetadata hiringLimit
  486. * @property {number|null} [expectedEndingTimestamp] OpeningMetadata expectedEndingTimestamp
  487. * @property {string} applicationDetails OpeningMetadata applicationDetails
  488. * @property {Array.<OpeningMetadata.IApplicationFormQuestion>|null} [applicationFormQuestions] OpeningMetadata applicationFormQuestions
  489. */
  490. /**
  491. * Constructs a new OpeningMetadata.
  492. * @exports OpeningMetadata
  493. * @classdesc Represents an OpeningMetadata.
  494. * @implements IOpeningMetadata
  495. * @constructor
  496. * @param {IOpeningMetadata=} [properties] Properties to set
  497. */
  498. function OpeningMetadata(properties) {
  499. this.applicationFormQuestions = [];
  500. if (properties)
  501. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  502. if (properties[keys[i]] != null)
  503. this[keys[i]] = properties[keys[i]];
  504. }
  505. /**
  506. * OpeningMetadata shortDescription.
  507. * @member {string} shortDescription
  508. * @memberof OpeningMetadata
  509. * @instance
  510. */
  511. OpeningMetadata.prototype.shortDescription = "";
  512. /**
  513. * OpeningMetadata description.
  514. * @member {string} description
  515. * @memberof OpeningMetadata
  516. * @instance
  517. */
  518. OpeningMetadata.prototype.description = "";
  519. /**
  520. * OpeningMetadata hiringLimit.
  521. * @member {number} hiringLimit
  522. * @memberof OpeningMetadata
  523. * @instance
  524. */
  525. OpeningMetadata.prototype.hiringLimit = 0;
  526. /**
  527. * OpeningMetadata expectedEndingTimestamp.
  528. * @member {number} expectedEndingTimestamp
  529. * @memberof OpeningMetadata
  530. * @instance
  531. */
  532. OpeningMetadata.prototype.expectedEndingTimestamp = 0;
  533. /**
  534. * OpeningMetadata applicationDetails.
  535. * @member {string} applicationDetails
  536. * @memberof OpeningMetadata
  537. * @instance
  538. */
  539. OpeningMetadata.prototype.applicationDetails = "";
  540. /**
  541. * OpeningMetadata applicationFormQuestions.
  542. * @member {Array.<OpeningMetadata.IApplicationFormQuestion>} applicationFormQuestions
  543. * @memberof OpeningMetadata
  544. * @instance
  545. */
  546. OpeningMetadata.prototype.applicationFormQuestions = $util.emptyArray;
  547. /**
  548. * Creates a new OpeningMetadata instance using the specified properties.
  549. * @function create
  550. * @memberof OpeningMetadata
  551. * @static
  552. * @param {IOpeningMetadata=} [properties] Properties to set
  553. * @returns {OpeningMetadata} OpeningMetadata instance
  554. */
  555. OpeningMetadata.create = function create(properties) {
  556. return new OpeningMetadata(properties);
  557. };
  558. /**
  559. * Encodes the specified OpeningMetadata message. Does not implicitly {@link OpeningMetadata.verify|verify} messages.
  560. * @function encode
  561. * @memberof OpeningMetadata
  562. * @static
  563. * @param {IOpeningMetadata} message OpeningMetadata message or plain object to encode
  564. * @param {$protobuf.Writer} [writer] Writer to encode to
  565. * @returns {$protobuf.Writer} Writer
  566. */
  567. OpeningMetadata.encode = function encode(message, writer) {
  568. if (!writer)
  569. writer = $Writer.create();
  570. writer.uint32(/* id 1, wireType 2 =*/10).string(message.shortDescription);
  571. writer.uint32(/* id 2, wireType 2 =*/18).string(message.description);
  572. if (message.hiringLimit != null && Object.hasOwnProperty.call(message, "hiringLimit"))
  573. writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.hiringLimit);
  574. if (message.expectedEndingTimestamp != null && Object.hasOwnProperty.call(message, "expectedEndingTimestamp"))
  575. writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.expectedEndingTimestamp);
  576. writer.uint32(/* id 5, wireType 2 =*/42).string(message.applicationDetails);
  577. if (message.applicationFormQuestions != null && message.applicationFormQuestions.length)
  578. for (var i = 0; i < message.applicationFormQuestions.length; ++i)
  579. $root.OpeningMetadata.ApplicationFormQuestion.encode(message.applicationFormQuestions[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
  580. return writer;
  581. };
  582. /**
  583. * Encodes the specified OpeningMetadata message, length delimited. Does not implicitly {@link OpeningMetadata.verify|verify} messages.
  584. * @function encodeDelimited
  585. * @memberof OpeningMetadata
  586. * @static
  587. * @param {IOpeningMetadata} message OpeningMetadata message or plain object to encode
  588. * @param {$protobuf.Writer} [writer] Writer to encode to
  589. * @returns {$protobuf.Writer} Writer
  590. */
  591. OpeningMetadata.encodeDelimited = function encodeDelimited(message, writer) {
  592. return this.encode(message, writer).ldelim();
  593. };
  594. /**
  595. * Decodes an OpeningMetadata message from the specified reader or buffer.
  596. * @function decode
  597. * @memberof OpeningMetadata
  598. * @static
  599. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  600. * @param {number} [length] Message length if known beforehand
  601. * @returns {OpeningMetadata} OpeningMetadata
  602. * @throws {Error} If the payload is not a reader or valid buffer
  603. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  604. */
  605. OpeningMetadata.decode = function decode(reader, length) {
  606. if (!(reader instanceof $Reader))
  607. reader = $Reader.create(reader);
  608. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.OpeningMetadata();
  609. while (reader.pos < end) {
  610. var tag = reader.uint32();
  611. switch (tag >>> 3) {
  612. case 1:
  613. message.shortDescription = reader.string();
  614. break;
  615. case 2:
  616. message.description = reader.string();
  617. break;
  618. case 3:
  619. message.hiringLimit = reader.uint32();
  620. break;
  621. case 4:
  622. message.expectedEndingTimestamp = reader.uint32();
  623. break;
  624. case 5:
  625. message.applicationDetails = reader.string();
  626. break;
  627. case 6:
  628. if (!(message.applicationFormQuestions && message.applicationFormQuestions.length))
  629. message.applicationFormQuestions = [];
  630. message.applicationFormQuestions.push($root.OpeningMetadata.ApplicationFormQuestion.decode(reader, reader.uint32()));
  631. break;
  632. default:
  633. reader.skipType(tag & 7);
  634. break;
  635. }
  636. }
  637. if (!message.hasOwnProperty("shortDescription"))
  638. throw $util.ProtocolError("missing required 'shortDescription'", { instance: message });
  639. if (!message.hasOwnProperty("description"))
  640. throw $util.ProtocolError("missing required 'description'", { instance: message });
  641. if (!message.hasOwnProperty("applicationDetails"))
  642. throw $util.ProtocolError("missing required 'applicationDetails'", { instance: message });
  643. return message;
  644. };
  645. /**
  646. * Decodes an OpeningMetadata message from the specified reader or buffer, length delimited.
  647. * @function decodeDelimited
  648. * @memberof OpeningMetadata
  649. * @static
  650. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  651. * @returns {OpeningMetadata} OpeningMetadata
  652. * @throws {Error} If the payload is not a reader or valid buffer
  653. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  654. */
  655. OpeningMetadata.decodeDelimited = function decodeDelimited(reader) {
  656. if (!(reader instanceof $Reader))
  657. reader = new $Reader(reader);
  658. return this.decode(reader, reader.uint32());
  659. };
  660. /**
  661. * Verifies an OpeningMetadata message.
  662. * @function verify
  663. * @memberof OpeningMetadata
  664. * @static
  665. * @param {Object.<string,*>} message Plain object to verify
  666. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  667. */
  668. OpeningMetadata.verify = function verify(message) {
  669. if (typeof message !== "object" || message === null)
  670. return "object expected";
  671. if (!$util.isString(message.shortDescription))
  672. return "shortDescription: string expected";
  673. if (!$util.isString(message.description))
  674. return "description: string expected";
  675. if (message.hiringLimit != null && message.hasOwnProperty("hiringLimit"))
  676. if (!$util.isInteger(message.hiringLimit))
  677. return "hiringLimit: integer expected";
  678. if (message.expectedEndingTimestamp != null && message.hasOwnProperty("expectedEndingTimestamp"))
  679. if (!$util.isInteger(message.expectedEndingTimestamp))
  680. return "expectedEndingTimestamp: integer expected";
  681. if (!$util.isString(message.applicationDetails))
  682. return "applicationDetails: string expected";
  683. if (message.applicationFormQuestions != null && message.hasOwnProperty("applicationFormQuestions")) {
  684. if (!Array.isArray(message.applicationFormQuestions))
  685. return "applicationFormQuestions: array expected";
  686. for (var i = 0; i < message.applicationFormQuestions.length; ++i) {
  687. var error = $root.OpeningMetadata.ApplicationFormQuestion.verify(message.applicationFormQuestions[i]);
  688. if (error)
  689. return "applicationFormQuestions." + error;
  690. }
  691. }
  692. return null;
  693. };
  694. /**
  695. * Creates an OpeningMetadata message from a plain object. Also converts values to their respective internal types.
  696. * @function fromObject
  697. * @memberof OpeningMetadata
  698. * @static
  699. * @param {Object.<string,*>} object Plain object
  700. * @returns {OpeningMetadata} OpeningMetadata
  701. */
  702. OpeningMetadata.fromObject = function fromObject(object) {
  703. if (object instanceof $root.OpeningMetadata)
  704. return object;
  705. var message = new $root.OpeningMetadata();
  706. if (object.shortDescription != null)
  707. message.shortDescription = String(object.shortDescription);
  708. if (object.description != null)
  709. message.description = String(object.description);
  710. if (object.hiringLimit != null)
  711. message.hiringLimit = object.hiringLimit >>> 0;
  712. if (object.expectedEndingTimestamp != null)
  713. message.expectedEndingTimestamp = object.expectedEndingTimestamp >>> 0;
  714. if (object.applicationDetails != null)
  715. message.applicationDetails = String(object.applicationDetails);
  716. if (object.applicationFormQuestions) {
  717. if (!Array.isArray(object.applicationFormQuestions))
  718. throw TypeError(".OpeningMetadata.applicationFormQuestions: array expected");
  719. message.applicationFormQuestions = [];
  720. for (var i = 0; i < object.applicationFormQuestions.length; ++i) {
  721. if (typeof object.applicationFormQuestions[i] !== "object")
  722. throw TypeError(".OpeningMetadata.applicationFormQuestions: object expected");
  723. message.applicationFormQuestions[i] = $root.OpeningMetadata.ApplicationFormQuestion.fromObject(object.applicationFormQuestions[i]);
  724. }
  725. }
  726. return message;
  727. };
  728. /**
  729. * Creates a plain object from an OpeningMetadata message. Also converts values to other types if specified.
  730. * @function toObject
  731. * @memberof OpeningMetadata
  732. * @static
  733. * @param {OpeningMetadata} message OpeningMetadata
  734. * @param {$protobuf.IConversionOptions} [options] Conversion options
  735. * @returns {Object.<string,*>} Plain object
  736. */
  737. OpeningMetadata.toObject = function toObject(message, options) {
  738. if (!options)
  739. options = {};
  740. var object = {};
  741. if (options.arrays || options.defaults)
  742. object.applicationFormQuestions = [];
  743. if (options.defaults) {
  744. object.shortDescription = "";
  745. object.description = "";
  746. object.hiringLimit = 0;
  747. object.expectedEndingTimestamp = 0;
  748. object.applicationDetails = "";
  749. }
  750. if (message.shortDescription != null && message.hasOwnProperty("shortDescription"))
  751. object.shortDescription = message.shortDescription;
  752. if (message.description != null && message.hasOwnProperty("description"))
  753. object.description = message.description;
  754. if (message.hiringLimit != null && message.hasOwnProperty("hiringLimit"))
  755. object.hiringLimit = message.hiringLimit;
  756. if (message.expectedEndingTimestamp != null && message.hasOwnProperty("expectedEndingTimestamp"))
  757. object.expectedEndingTimestamp = message.expectedEndingTimestamp;
  758. if (message.applicationDetails != null && message.hasOwnProperty("applicationDetails"))
  759. object.applicationDetails = message.applicationDetails;
  760. if (message.applicationFormQuestions && message.applicationFormQuestions.length) {
  761. object.applicationFormQuestions = [];
  762. for (var j = 0; j < message.applicationFormQuestions.length; ++j)
  763. object.applicationFormQuestions[j] = $root.OpeningMetadata.ApplicationFormQuestion.toObject(message.applicationFormQuestions[j], options);
  764. }
  765. return object;
  766. };
  767. /**
  768. * Converts this OpeningMetadata to JSON.
  769. * @function toJSON
  770. * @memberof OpeningMetadata
  771. * @instance
  772. * @returns {Object.<string,*>} JSON object
  773. */
  774. OpeningMetadata.prototype.toJSON = function toJSON() {
  775. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  776. };
  777. OpeningMetadata.ApplicationFormQuestion = (function() {
  778. /**
  779. * Properties of an ApplicationFormQuestion.
  780. * @memberof OpeningMetadata
  781. * @interface IApplicationFormQuestion
  782. * @property {string} question ApplicationFormQuestion question
  783. * @property {OpeningMetadata.ApplicationFormQuestion.InputType} type ApplicationFormQuestion type
  784. */
  785. /**
  786. * Constructs a new ApplicationFormQuestion.
  787. * @memberof OpeningMetadata
  788. * @classdesc Represents an ApplicationFormQuestion.
  789. * @implements IApplicationFormQuestion
  790. * @constructor
  791. * @param {OpeningMetadata.IApplicationFormQuestion=} [properties] Properties to set
  792. */
  793. function ApplicationFormQuestion(properties) {
  794. if (properties)
  795. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  796. if (properties[keys[i]] != null)
  797. this[keys[i]] = properties[keys[i]];
  798. }
  799. /**
  800. * ApplicationFormQuestion question.
  801. * @member {string} question
  802. * @memberof OpeningMetadata.ApplicationFormQuestion
  803. * @instance
  804. */
  805. ApplicationFormQuestion.prototype.question = "";
  806. /**
  807. * ApplicationFormQuestion type.
  808. * @member {OpeningMetadata.ApplicationFormQuestion.InputType} type
  809. * @memberof OpeningMetadata.ApplicationFormQuestion
  810. * @instance
  811. */
  812. ApplicationFormQuestion.prototype.type = 1;
  813. /**
  814. * Creates a new ApplicationFormQuestion instance using the specified properties.
  815. * @function create
  816. * @memberof OpeningMetadata.ApplicationFormQuestion
  817. * @static
  818. * @param {OpeningMetadata.IApplicationFormQuestion=} [properties] Properties to set
  819. * @returns {OpeningMetadata.ApplicationFormQuestion} ApplicationFormQuestion instance
  820. */
  821. ApplicationFormQuestion.create = function create(properties) {
  822. return new ApplicationFormQuestion(properties);
  823. };
  824. /**
  825. * Encodes the specified ApplicationFormQuestion message. Does not implicitly {@link OpeningMetadata.ApplicationFormQuestion.verify|verify} messages.
  826. * @function encode
  827. * @memberof OpeningMetadata.ApplicationFormQuestion
  828. * @static
  829. * @param {OpeningMetadata.IApplicationFormQuestion} message ApplicationFormQuestion message or plain object to encode
  830. * @param {$protobuf.Writer} [writer] Writer to encode to
  831. * @returns {$protobuf.Writer} Writer
  832. */
  833. ApplicationFormQuestion.encode = function encode(message, writer) {
  834. if (!writer)
  835. writer = $Writer.create();
  836. writer.uint32(/* id 1, wireType 2 =*/10).string(message.question);
  837. writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type);
  838. return writer;
  839. };
  840. /**
  841. * Encodes the specified ApplicationFormQuestion message, length delimited. Does not implicitly {@link OpeningMetadata.ApplicationFormQuestion.verify|verify} messages.
  842. * @function encodeDelimited
  843. * @memberof OpeningMetadata.ApplicationFormQuestion
  844. * @static
  845. * @param {OpeningMetadata.IApplicationFormQuestion} message ApplicationFormQuestion message or plain object to encode
  846. * @param {$protobuf.Writer} [writer] Writer to encode to
  847. * @returns {$protobuf.Writer} Writer
  848. */
  849. ApplicationFormQuestion.encodeDelimited = function encodeDelimited(message, writer) {
  850. return this.encode(message, writer).ldelim();
  851. };
  852. /**
  853. * Decodes an ApplicationFormQuestion message from the specified reader or buffer.
  854. * @function decode
  855. * @memberof OpeningMetadata.ApplicationFormQuestion
  856. * @static
  857. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  858. * @param {number} [length] Message length if known beforehand
  859. * @returns {OpeningMetadata.ApplicationFormQuestion} ApplicationFormQuestion
  860. * @throws {Error} If the payload is not a reader or valid buffer
  861. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  862. */
  863. ApplicationFormQuestion.decode = function decode(reader, length) {
  864. if (!(reader instanceof $Reader))
  865. reader = $Reader.create(reader);
  866. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.OpeningMetadata.ApplicationFormQuestion();
  867. while (reader.pos < end) {
  868. var tag = reader.uint32();
  869. switch (tag >>> 3) {
  870. case 1:
  871. message.question = reader.string();
  872. break;
  873. case 2:
  874. message.type = reader.int32();
  875. break;
  876. default:
  877. reader.skipType(tag & 7);
  878. break;
  879. }
  880. }
  881. if (!message.hasOwnProperty("question"))
  882. throw $util.ProtocolError("missing required 'question'", { instance: message });
  883. if (!message.hasOwnProperty("type"))
  884. throw $util.ProtocolError("missing required 'type'", { instance: message });
  885. return message;
  886. };
  887. /**
  888. * Decodes an ApplicationFormQuestion message from the specified reader or buffer, length delimited.
  889. * @function decodeDelimited
  890. * @memberof OpeningMetadata.ApplicationFormQuestion
  891. * @static
  892. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  893. * @returns {OpeningMetadata.ApplicationFormQuestion} ApplicationFormQuestion
  894. * @throws {Error} If the payload is not a reader or valid buffer
  895. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  896. */
  897. ApplicationFormQuestion.decodeDelimited = function decodeDelimited(reader) {
  898. if (!(reader instanceof $Reader))
  899. reader = new $Reader(reader);
  900. return this.decode(reader, reader.uint32());
  901. };
  902. /**
  903. * Verifies an ApplicationFormQuestion message.
  904. * @function verify
  905. * @memberof OpeningMetadata.ApplicationFormQuestion
  906. * @static
  907. * @param {Object.<string,*>} message Plain object to verify
  908. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  909. */
  910. ApplicationFormQuestion.verify = function verify(message) {
  911. if (typeof message !== "object" || message === null)
  912. return "object expected";
  913. if (!$util.isString(message.question))
  914. return "question: string expected";
  915. switch (message.type) {
  916. default:
  917. return "type: enum value expected";
  918. case 1:
  919. case 2:
  920. break;
  921. }
  922. return null;
  923. };
  924. /**
  925. * Creates an ApplicationFormQuestion message from a plain object. Also converts values to their respective internal types.
  926. * @function fromObject
  927. * @memberof OpeningMetadata.ApplicationFormQuestion
  928. * @static
  929. * @param {Object.<string,*>} object Plain object
  930. * @returns {OpeningMetadata.ApplicationFormQuestion} ApplicationFormQuestion
  931. */
  932. ApplicationFormQuestion.fromObject = function fromObject(object) {
  933. if (object instanceof $root.OpeningMetadata.ApplicationFormQuestion)
  934. return object;
  935. var message = new $root.OpeningMetadata.ApplicationFormQuestion();
  936. if (object.question != null)
  937. message.question = String(object.question);
  938. switch (object.type) {
  939. case "TEXT":
  940. case 1:
  941. message.type = 1;
  942. break;
  943. case "TEXTAREA":
  944. case 2:
  945. message.type = 2;
  946. break;
  947. }
  948. return message;
  949. };
  950. /**
  951. * Creates a plain object from an ApplicationFormQuestion message. Also converts values to other types if specified.
  952. * @function toObject
  953. * @memberof OpeningMetadata.ApplicationFormQuestion
  954. * @static
  955. * @param {OpeningMetadata.ApplicationFormQuestion} message ApplicationFormQuestion
  956. * @param {$protobuf.IConversionOptions} [options] Conversion options
  957. * @returns {Object.<string,*>} Plain object
  958. */
  959. ApplicationFormQuestion.toObject = function toObject(message, options) {
  960. if (!options)
  961. options = {};
  962. var object = {};
  963. if (options.defaults) {
  964. object.question = "";
  965. object.type = options.enums === String ? "TEXT" : 1;
  966. }
  967. if (message.question != null && message.hasOwnProperty("question"))
  968. object.question = message.question;
  969. if (message.type != null && message.hasOwnProperty("type"))
  970. object.type = options.enums === String ? $root.OpeningMetadata.ApplicationFormQuestion.InputType[message.type] : message.type;
  971. return object;
  972. };
  973. /**
  974. * Converts this ApplicationFormQuestion to JSON.
  975. * @function toJSON
  976. * @memberof OpeningMetadata.ApplicationFormQuestion
  977. * @instance
  978. * @returns {Object.<string,*>} JSON object
  979. */
  980. ApplicationFormQuestion.prototype.toJSON = function toJSON() {
  981. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  982. };
  983. /**
  984. * InputType enum.
  985. * @name OpeningMetadata.ApplicationFormQuestion.InputType
  986. * @enum {number}
  987. * @property {number} TEXT=1 TEXT value
  988. * @property {number} TEXTAREA=2 TEXTAREA value
  989. */
  990. ApplicationFormQuestion.InputType = (function() {
  991. var valuesById = {}, values = Object.create(valuesById);
  992. values[valuesById[1] = "TEXT"] = 1;
  993. values[valuesById[2] = "TEXTAREA"] = 2;
  994. return values;
  995. })();
  996. return ApplicationFormQuestion;
  997. })();
  998. return OpeningMetadata;
  999. })();
  1000. $root.UpcomingOpeningMetadata = (function() {
  1001. /**
  1002. * Properties of an UpcomingOpeningMetadata.
  1003. * @exports IUpcomingOpeningMetadata
  1004. * @interface IUpcomingOpeningMetadata
  1005. * @property {number} expectedStart UpcomingOpeningMetadata expectedStart
  1006. * @property {Long} rewardPerBlock UpcomingOpeningMetadata rewardPerBlock
  1007. * @property {Long} minApplicationStake UpcomingOpeningMetadata minApplicationStake
  1008. * @property {IOpeningMetadata} metadata UpcomingOpeningMetadata metadata
  1009. */
  1010. /**
  1011. * Constructs a new UpcomingOpeningMetadata.
  1012. * @exports UpcomingOpeningMetadata
  1013. * @classdesc Represents an UpcomingOpeningMetadata.
  1014. * @implements IUpcomingOpeningMetadata
  1015. * @constructor
  1016. * @param {IUpcomingOpeningMetadata=} [properties] Properties to set
  1017. */
  1018. function UpcomingOpeningMetadata(properties) {
  1019. if (properties)
  1020. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  1021. if (properties[keys[i]] != null)
  1022. this[keys[i]] = properties[keys[i]];
  1023. }
  1024. /**
  1025. * UpcomingOpeningMetadata expectedStart.
  1026. * @member {number} expectedStart
  1027. * @memberof UpcomingOpeningMetadata
  1028. * @instance
  1029. */
  1030. UpcomingOpeningMetadata.prototype.expectedStart = 0;
  1031. /**
  1032. * UpcomingOpeningMetadata rewardPerBlock.
  1033. * @member {Long} rewardPerBlock
  1034. * @memberof UpcomingOpeningMetadata
  1035. * @instance
  1036. */
  1037. UpcomingOpeningMetadata.prototype.rewardPerBlock = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
  1038. /**
  1039. * UpcomingOpeningMetadata minApplicationStake.
  1040. * @member {Long} minApplicationStake
  1041. * @memberof UpcomingOpeningMetadata
  1042. * @instance
  1043. */
  1044. UpcomingOpeningMetadata.prototype.minApplicationStake = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
  1045. /**
  1046. * UpcomingOpeningMetadata metadata.
  1047. * @member {IOpeningMetadata} metadata
  1048. * @memberof UpcomingOpeningMetadata
  1049. * @instance
  1050. */
  1051. UpcomingOpeningMetadata.prototype.metadata = null;
  1052. /**
  1053. * Creates a new UpcomingOpeningMetadata instance using the specified properties.
  1054. * @function create
  1055. * @memberof UpcomingOpeningMetadata
  1056. * @static
  1057. * @param {IUpcomingOpeningMetadata=} [properties] Properties to set
  1058. * @returns {UpcomingOpeningMetadata} UpcomingOpeningMetadata instance
  1059. */
  1060. UpcomingOpeningMetadata.create = function create(properties) {
  1061. return new UpcomingOpeningMetadata(properties);
  1062. };
  1063. /**
  1064. * Encodes the specified UpcomingOpeningMetadata message. Does not implicitly {@link UpcomingOpeningMetadata.verify|verify} messages.
  1065. * @function encode
  1066. * @memberof UpcomingOpeningMetadata
  1067. * @static
  1068. * @param {IUpcomingOpeningMetadata} message UpcomingOpeningMetadata message or plain object to encode
  1069. * @param {$protobuf.Writer} [writer] Writer to encode to
  1070. * @returns {$protobuf.Writer} Writer
  1071. */
  1072. UpcomingOpeningMetadata.encode = function encode(message, writer) {
  1073. if (!writer)
  1074. writer = $Writer.create();
  1075. writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.expectedStart);
  1076. writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.rewardPerBlock);
  1077. writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.minApplicationStake);
  1078. $root.OpeningMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
  1079. return writer;
  1080. };
  1081. /**
  1082. * Encodes the specified UpcomingOpeningMetadata message, length delimited. Does not implicitly {@link UpcomingOpeningMetadata.verify|verify} messages.
  1083. * @function encodeDelimited
  1084. * @memberof UpcomingOpeningMetadata
  1085. * @static
  1086. * @param {IUpcomingOpeningMetadata} message UpcomingOpeningMetadata message or plain object to encode
  1087. * @param {$protobuf.Writer} [writer] Writer to encode to
  1088. * @returns {$protobuf.Writer} Writer
  1089. */
  1090. UpcomingOpeningMetadata.encodeDelimited = function encodeDelimited(message, writer) {
  1091. return this.encode(message, writer).ldelim();
  1092. };
  1093. /**
  1094. * Decodes an UpcomingOpeningMetadata message from the specified reader or buffer.
  1095. * @function decode
  1096. * @memberof UpcomingOpeningMetadata
  1097. * @static
  1098. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1099. * @param {number} [length] Message length if known beforehand
  1100. * @returns {UpcomingOpeningMetadata} UpcomingOpeningMetadata
  1101. * @throws {Error} If the payload is not a reader or valid buffer
  1102. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1103. */
  1104. UpcomingOpeningMetadata.decode = function decode(reader, length) {
  1105. if (!(reader instanceof $Reader))
  1106. reader = $Reader.create(reader);
  1107. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UpcomingOpeningMetadata();
  1108. while (reader.pos < end) {
  1109. var tag = reader.uint32();
  1110. switch (tag >>> 3) {
  1111. case 1:
  1112. message.expectedStart = reader.uint32();
  1113. break;
  1114. case 2:
  1115. message.rewardPerBlock = reader.uint64();
  1116. break;
  1117. case 3:
  1118. message.minApplicationStake = reader.uint64();
  1119. break;
  1120. case 4:
  1121. message.metadata = $root.OpeningMetadata.decode(reader, reader.uint32());
  1122. break;
  1123. default:
  1124. reader.skipType(tag & 7);
  1125. break;
  1126. }
  1127. }
  1128. if (!message.hasOwnProperty("expectedStart"))
  1129. throw $util.ProtocolError("missing required 'expectedStart'", { instance: message });
  1130. if (!message.hasOwnProperty("rewardPerBlock"))
  1131. throw $util.ProtocolError("missing required 'rewardPerBlock'", { instance: message });
  1132. if (!message.hasOwnProperty("minApplicationStake"))
  1133. throw $util.ProtocolError("missing required 'minApplicationStake'", { instance: message });
  1134. if (!message.hasOwnProperty("metadata"))
  1135. throw $util.ProtocolError("missing required 'metadata'", { instance: message });
  1136. return message;
  1137. };
  1138. /**
  1139. * Decodes an UpcomingOpeningMetadata message from the specified reader or buffer, length delimited.
  1140. * @function decodeDelimited
  1141. * @memberof UpcomingOpeningMetadata
  1142. * @static
  1143. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1144. * @returns {UpcomingOpeningMetadata} UpcomingOpeningMetadata
  1145. * @throws {Error} If the payload is not a reader or valid buffer
  1146. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1147. */
  1148. UpcomingOpeningMetadata.decodeDelimited = function decodeDelimited(reader) {
  1149. if (!(reader instanceof $Reader))
  1150. reader = new $Reader(reader);
  1151. return this.decode(reader, reader.uint32());
  1152. };
  1153. /**
  1154. * Verifies an UpcomingOpeningMetadata message.
  1155. * @function verify
  1156. * @memberof UpcomingOpeningMetadata
  1157. * @static
  1158. * @param {Object.<string,*>} message Plain object to verify
  1159. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  1160. */
  1161. UpcomingOpeningMetadata.verify = function verify(message) {
  1162. if (typeof message !== "object" || message === null)
  1163. return "object expected";
  1164. if (!$util.isInteger(message.expectedStart))
  1165. return "expectedStart: integer expected";
  1166. if (!$util.isInteger(message.rewardPerBlock) && !(message.rewardPerBlock && $util.isInteger(message.rewardPerBlock.low) && $util.isInteger(message.rewardPerBlock.high)))
  1167. return "rewardPerBlock: integer|Long expected";
  1168. if (!$util.isInteger(message.minApplicationStake) && !(message.minApplicationStake && $util.isInteger(message.minApplicationStake.low) && $util.isInteger(message.minApplicationStake.high)))
  1169. return "minApplicationStake: integer|Long expected";
  1170. {
  1171. var error = $root.OpeningMetadata.verify(message.metadata);
  1172. if (error)
  1173. return "metadata." + error;
  1174. }
  1175. return null;
  1176. };
  1177. /**
  1178. * Creates an UpcomingOpeningMetadata message from a plain object. Also converts values to their respective internal types.
  1179. * @function fromObject
  1180. * @memberof UpcomingOpeningMetadata
  1181. * @static
  1182. * @param {Object.<string,*>} object Plain object
  1183. * @returns {UpcomingOpeningMetadata} UpcomingOpeningMetadata
  1184. */
  1185. UpcomingOpeningMetadata.fromObject = function fromObject(object) {
  1186. if (object instanceof $root.UpcomingOpeningMetadata)
  1187. return object;
  1188. var message = new $root.UpcomingOpeningMetadata();
  1189. if (object.expectedStart != null)
  1190. message.expectedStart = object.expectedStart >>> 0;
  1191. if (object.rewardPerBlock != null)
  1192. if ($util.Long)
  1193. (message.rewardPerBlock = $util.Long.fromValue(object.rewardPerBlock)).unsigned = true;
  1194. else if (typeof object.rewardPerBlock === "string")
  1195. message.rewardPerBlock = parseInt(object.rewardPerBlock, 10);
  1196. else if (typeof object.rewardPerBlock === "number")
  1197. message.rewardPerBlock = object.rewardPerBlock;
  1198. else if (typeof object.rewardPerBlock === "object")
  1199. message.rewardPerBlock = new $util.LongBits(object.rewardPerBlock.low >>> 0, object.rewardPerBlock.high >>> 0).toNumber(true);
  1200. if (object.minApplicationStake != null)
  1201. if ($util.Long)
  1202. (message.minApplicationStake = $util.Long.fromValue(object.minApplicationStake)).unsigned = true;
  1203. else if (typeof object.minApplicationStake === "string")
  1204. message.minApplicationStake = parseInt(object.minApplicationStake, 10);
  1205. else if (typeof object.minApplicationStake === "number")
  1206. message.minApplicationStake = object.minApplicationStake;
  1207. else if (typeof object.minApplicationStake === "object")
  1208. message.minApplicationStake = new $util.LongBits(object.minApplicationStake.low >>> 0, object.minApplicationStake.high >>> 0).toNumber(true);
  1209. if (object.metadata != null) {
  1210. if (typeof object.metadata !== "object")
  1211. throw TypeError(".UpcomingOpeningMetadata.metadata: object expected");
  1212. message.metadata = $root.OpeningMetadata.fromObject(object.metadata);
  1213. }
  1214. return message;
  1215. };
  1216. /**
  1217. * Creates a plain object from an UpcomingOpeningMetadata message. Also converts values to other types if specified.
  1218. * @function toObject
  1219. * @memberof UpcomingOpeningMetadata
  1220. * @static
  1221. * @param {UpcomingOpeningMetadata} message UpcomingOpeningMetadata
  1222. * @param {$protobuf.IConversionOptions} [options] Conversion options
  1223. * @returns {Object.<string,*>} Plain object
  1224. */
  1225. UpcomingOpeningMetadata.toObject = function toObject(message, options) {
  1226. if (!options)
  1227. options = {};
  1228. var object = {};
  1229. if (options.defaults) {
  1230. object.expectedStart = 0;
  1231. if ($util.Long) {
  1232. var long = new $util.Long(0, 0, true);
  1233. object.rewardPerBlock = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
  1234. } else
  1235. object.rewardPerBlock = options.longs === String ? "0" : 0;
  1236. if ($util.Long) {
  1237. var long = new $util.Long(0, 0, true);
  1238. object.minApplicationStake = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
  1239. } else
  1240. object.minApplicationStake = options.longs === String ? "0" : 0;
  1241. object.metadata = null;
  1242. }
  1243. if (message.expectedStart != null && message.hasOwnProperty("expectedStart"))
  1244. object.expectedStart = message.expectedStart;
  1245. if (message.rewardPerBlock != null && message.hasOwnProperty("rewardPerBlock"))
  1246. if (typeof message.rewardPerBlock === "number")
  1247. object.rewardPerBlock = options.longs === String ? String(message.rewardPerBlock) : message.rewardPerBlock;
  1248. else
  1249. object.rewardPerBlock = options.longs === String ? $util.Long.prototype.toString.call(message.rewardPerBlock) : options.longs === Number ? new $util.LongBits(message.rewardPerBlock.low >>> 0, message.rewardPerBlock.high >>> 0).toNumber(true) : message.rewardPerBlock;
  1250. if (message.minApplicationStake != null && message.hasOwnProperty("minApplicationStake"))
  1251. if (typeof message.minApplicationStake === "number")
  1252. object.minApplicationStake = options.longs === String ? String(message.minApplicationStake) : message.minApplicationStake;
  1253. else
  1254. object.minApplicationStake = options.longs === String ? $util.Long.prototype.toString.call(message.minApplicationStake) : options.longs === Number ? new $util.LongBits(message.minApplicationStake.low >>> 0, message.minApplicationStake.high >>> 0).toNumber(true) : message.minApplicationStake;
  1255. if (message.metadata != null && message.hasOwnProperty("metadata"))
  1256. object.metadata = $root.OpeningMetadata.toObject(message.metadata, options);
  1257. return object;
  1258. };
  1259. /**
  1260. * Converts this UpcomingOpeningMetadata to JSON.
  1261. * @function toJSON
  1262. * @memberof UpcomingOpeningMetadata
  1263. * @instance
  1264. * @returns {Object.<string,*>} JSON object
  1265. */
  1266. UpcomingOpeningMetadata.prototype.toJSON = function toJSON() {
  1267. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  1268. };
  1269. return UpcomingOpeningMetadata;
  1270. })();
  1271. $root.ApplicationMetadata = (function() {
  1272. /**
  1273. * Properties of an ApplicationMetadata.
  1274. * @exports IApplicationMetadata
  1275. * @interface IApplicationMetadata
  1276. * @property {Array.<string>|null} [answers] ApplicationMetadata answers
  1277. */
  1278. /**
  1279. * Constructs a new ApplicationMetadata.
  1280. * @exports ApplicationMetadata
  1281. * @classdesc Represents an ApplicationMetadata.
  1282. * @implements IApplicationMetadata
  1283. * @constructor
  1284. * @param {IApplicationMetadata=} [properties] Properties to set
  1285. */
  1286. function ApplicationMetadata(properties) {
  1287. this.answers = [];
  1288. if (properties)
  1289. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  1290. if (properties[keys[i]] != null)
  1291. this[keys[i]] = properties[keys[i]];
  1292. }
  1293. /**
  1294. * ApplicationMetadata answers.
  1295. * @member {Array.<string>} answers
  1296. * @memberof ApplicationMetadata
  1297. * @instance
  1298. */
  1299. ApplicationMetadata.prototype.answers = $util.emptyArray;
  1300. /**
  1301. * Creates a new ApplicationMetadata instance using the specified properties.
  1302. * @function create
  1303. * @memberof ApplicationMetadata
  1304. * @static
  1305. * @param {IApplicationMetadata=} [properties] Properties to set
  1306. * @returns {ApplicationMetadata} ApplicationMetadata instance
  1307. */
  1308. ApplicationMetadata.create = function create(properties) {
  1309. return new ApplicationMetadata(properties);
  1310. };
  1311. /**
  1312. * Encodes the specified ApplicationMetadata message. Does not implicitly {@link ApplicationMetadata.verify|verify} messages.
  1313. * @function encode
  1314. * @memberof ApplicationMetadata
  1315. * @static
  1316. * @param {IApplicationMetadata} message ApplicationMetadata message or plain object to encode
  1317. * @param {$protobuf.Writer} [writer] Writer to encode to
  1318. * @returns {$protobuf.Writer} Writer
  1319. */
  1320. ApplicationMetadata.encode = function encode(message, writer) {
  1321. if (!writer)
  1322. writer = $Writer.create();
  1323. if (message.answers != null && message.answers.length)
  1324. for (var i = 0; i < message.answers.length; ++i)
  1325. writer.uint32(/* id 1, wireType 2 =*/10).string(message.answers[i]);
  1326. return writer;
  1327. };
  1328. /**
  1329. * Encodes the specified ApplicationMetadata message, length delimited. Does not implicitly {@link ApplicationMetadata.verify|verify} messages.
  1330. * @function encodeDelimited
  1331. * @memberof ApplicationMetadata
  1332. * @static
  1333. * @param {IApplicationMetadata} message ApplicationMetadata message or plain object to encode
  1334. * @param {$protobuf.Writer} [writer] Writer to encode to
  1335. * @returns {$protobuf.Writer} Writer
  1336. */
  1337. ApplicationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
  1338. return this.encode(message, writer).ldelim();
  1339. };
  1340. /**
  1341. * Decodes an ApplicationMetadata message from the specified reader or buffer.
  1342. * @function decode
  1343. * @memberof ApplicationMetadata
  1344. * @static
  1345. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1346. * @param {number} [length] Message length if known beforehand
  1347. * @returns {ApplicationMetadata} ApplicationMetadata
  1348. * @throws {Error} If the payload is not a reader or valid buffer
  1349. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1350. */
  1351. ApplicationMetadata.decode = function decode(reader, length) {
  1352. if (!(reader instanceof $Reader))
  1353. reader = $Reader.create(reader);
  1354. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ApplicationMetadata();
  1355. while (reader.pos < end) {
  1356. var tag = reader.uint32();
  1357. switch (tag >>> 3) {
  1358. case 1:
  1359. if (!(message.answers && message.answers.length))
  1360. message.answers = [];
  1361. message.answers.push(reader.string());
  1362. break;
  1363. default:
  1364. reader.skipType(tag & 7);
  1365. break;
  1366. }
  1367. }
  1368. return message;
  1369. };
  1370. /**
  1371. * Decodes an ApplicationMetadata message from the specified reader or buffer, length delimited.
  1372. * @function decodeDelimited
  1373. * @memberof ApplicationMetadata
  1374. * @static
  1375. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1376. * @returns {ApplicationMetadata} ApplicationMetadata
  1377. * @throws {Error} If the payload is not a reader or valid buffer
  1378. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1379. */
  1380. ApplicationMetadata.decodeDelimited = function decodeDelimited(reader) {
  1381. if (!(reader instanceof $Reader))
  1382. reader = new $Reader(reader);
  1383. return this.decode(reader, reader.uint32());
  1384. };
  1385. /**
  1386. * Verifies an ApplicationMetadata message.
  1387. * @function verify
  1388. * @memberof ApplicationMetadata
  1389. * @static
  1390. * @param {Object.<string,*>} message Plain object to verify
  1391. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  1392. */
  1393. ApplicationMetadata.verify = function verify(message) {
  1394. if (typeof message !== "object" || message === null)
  1395. return "object expected";
  1396. if (message.answers != null && message.hasOwnProperty("answers")) {
  1397. if (!Array.isArray(message.answers))
  1398. return "answers: array expected";
  1399. for (var i = 0; i < message.answers.length; ++i)
  1400. if (!$util.isString(message.answers[i]))
  1401. return "answers: string[] expected";
  1402. }
  1403. return null;
  1404. };
  1405. /**
  1406. * Creates an ApplicationMetadata message from a plain object. Also converts values to their respective internal types.
  1407. * @function fromObject
  1408. * @memberof ApplicationMetadata
  1409. * @static
  1410. * @param {Object.<string,*>} object Plain object
  1411. * @returns {ApplicationMetadata} ApplicationMetadata
  1412. */
  1413. ApplicationMetadata.fromObject = function fromObject(object) {
  1414. if (object instanceof $root.ApplicationMetadata)
  1415. return object;
  1416. var message = new $root.ApplicationMetadata();
  1417. if (object.answers) {
  1418. if (!Array.isArray(object.answers))
  1419. throw TypeError(".ApplicationMetadata.answers: array expected");
  1420. message.answers = [];
  1421. for (var i = 0; i < object.answers.length; ++i)
  1422. message.answers[i] = String(object.answers[i]);
  1423. }
  1424. return message;
  1425. };
  1426. /**
  1427. * Creates a plain object from an ApplicationMetadata message. Also converts values to other types if specified.
  1428. * @function toObject
  1429. * @memberof ApplicationMetadata
  1430. * @static
  1431. * @param {ApplicationMetadata} message ApplicationMetadata
  1432. * @param {$protobuf.IConversionOptions} [options] Conversion options
  1433. * @returns {Object.<string,*>} Plain object
  1434. */
  1435. ApplicationMetadata.toObject = function toObject(message, options) {
  1436. if (!options)
  1437. options = {};
  1438. var object = {};
  1439. if (options.arrays || options.defaults)
  1440. object.answers = [];
  1441. if (message.answers && message.answers.length) {
  1442. object.answers = [];
  1443. for (var j = 0; j < message.answers.length; ++j)
  1444. object.answers[j] = message.answers[j];
  1445. }
  1446. return object;
  1447. };
  1448. /**
  1449. * Converts this ApplicationMetadata to JSON.
  1450. * @function toJSON
  1451. * @memberof ApplicationMetadata
  1452. * @instance
  1453. * @returns {Object.<string,*>} JSON object
  1454. */
  1455. ApplicationMetadata.prototype.toJSON = function toJSON() {
  1456. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  1457. };
  1458. return ApplicationMetadata;
  1459. })();
  1460. $root.WorkingGroupMetadata = (function() {
  1461. /**
  1462. * Properties of a WorkingGroupMetadata.
  1463. * @exports IWorkingGroupMetadata
  1464. * @interface IWorkingGroupMetadata
  1465. * @property {string|null} [description] WorkingGroupMetadata description
  1466. * @property {string|null} [about] WorkingGroupMetadata about
  1467. * @property {string|null} [status] WorkingGroupMetadata status
  1468. * @property {string|null} [statusMessage] WorkingGroupMetadata statusMessage
  1469. */
  1470. /**
  1471. * Constructs a new WorkingGroupMetadata.
  1472. * @exports WorkingGroupMetadata
  1473. * @classdesc Represents a WorkingGroupMetadata.
  1474. * @implements IWorkingGroupMetadata
  1475. * @constructor
  1476. * @param {IWorkingGroupMetadata=} [properties] Properties to set
  1477. */
  1478. function WorkingGroupMetadata(properties) {
  1479. if (properties)
  1480. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  1481. if (properties[keys[i]] != null)
  1482. this[keys[i]] = properties[keys[i]];
  1483. }
  1484. /**
  1485. * WorkingGroupMetadata description.
  1486. * @member {string} description
  1487. * @memberof WorkingGroupMetadata
  1488. * @instance
  1489. */
  1490. WorkingGroupMetadata.prototype.description = "";
  1491. /**
  1492. * WorkingGroupMetadata about.
  1493. * @member {string} about
  1494. * @memberof WorkingGroupMetadata
  1495. * @instance
  1496. */
  1497. WorkingGroupMetadata.prototype.about = "";
  1498. /**
  1499. * WorkingGroupMetadata status.
  1500. * @member {string} status
  1501. * @memberof WorkingGroupMetadata
  1502. * @instance
  1503. */
  1504. WorkingGroupMetadata.prototype.status = "";
  1505. /**
  1506. * WorkingGroupMetadata statusMessage.
  1507. * @member {string} statusMessage
  1508. * @memberof WorkingGroupMetadata
  1509. * @instance
  1510. */
  1511. WorkingGroupMetadata.prototype.statusMessage = "";
  1512. /**
  1513. * Creates a new WorkingGroupMetadata instance using the specified properties.
  1514. * @function create
  1515. * @memberof WorkingGroupMetadata
  1516. * @static
  1517. * @param {IWorkingGroupMetadata=} [properties] Properties to set
  1518. * @returns {WorkingGroupMetadata} WorkingGroupMetadata instance
  1519. */
  1520. WorkingGroupMetadata.create = function create(properties) {
  1521. return new WorkingGroupMetadata(properties);
  1522. };
  1523. /**
  1524. * Encodes the specified WorkingGroupMetadata message. Does not implicitly {@link WorkingGroupMetadata.verify|verify} messages.
  1525. * @function encode
  1526. * @memberof WorkingGroupMetadata
  1527. * @static
  1528. * @param {IWorkingGroupMetadata} message WorkingGroupMetadata message or plain object to encode
  1529. * @param {$protobuf.Writer} [writer] Writer to encode to
  1530. * @returns {$protobuf.Writer} Writer
  1531. */
  1532. WorkingGroupMetadata.encode = function encode(message, writer) {
  1533. if (!writer)
  1534. writer = $Writer.create();
  1535. if (message.description != null && Object.hasOwnProperty.call(message, "description"))
  1536. writer.uint32(/* id 1, wireType 2 =*/10).string(message.description);
  1537. if (message.about != null && Object.hasOwnProperty.call(message, "about"))
  1538. writer.uint32(/* id 2, wireType 2 =*/18).string(message.about);
  1539. if (message.status != null && Object.hasOwnProperty.call(message, "status"))
  1540. writer.uint32(/* id 3, wireType 2 =*/26).string(message.status);
  1541. if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage"))
  1542. writer.uint32(/* id 4, wireType 2 =*/34).string(message.statusMessage);
  1543. return writer;
  1544. };
  1545. /**
  1546. * Encodes the specified WorkingGroupMetadata message, length delimited. Does not implicitly {@link WorkingGroupMetadata.verify|verify} messages.
  1547. * @function encodeDelimited
  1548. * @memberof WorkingGroupMetadata
  1549. * @static
  1550. * @param {IWorkingGroupMetadata} message WorkingGroupMetadata message or plain object to encode
  1551. * @param {$protobuf.Writer} [writer] Writer to encode to
  1552. * @returns {$protobuf.Writer} Writer
  1553. */
  1554. WorkingGroupMetadata.encodeDelimited = function encodeDelimited(message, writer) {
  1555. return this.encode(message, writer).ldelim();
  1556. };
  1557. /**
  1558. * Decodes a WorkingGroupMetadata message from the specified reader or buffer.
  1559. * @function decode
  1560. * @memberof WorkingGroupMetadata
  1561. * @static
  1562. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1563. * @param {number} [length] Message length if known beforehand
  1564. * @returns {WorkingGroupMetadata} WorkingGroupMetadata
  1565. * @throws {Error} If the payload is not a reader or valid buffer
  1566. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1567. */
  1568. WorkingGroupMetadata.decode = function decode(reader, length) {
  1569. if (!(reader instanceof $Reader))
  1570. reader = $Reader.create(reader);
  1571. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.WorkingGroupMetadata();
  1572. while (reader.pos < end) {
  1573. var tag = reader.uint32();
  1574. switch (tag >>> 3) {
  1575. case 1:
  1576. message.description = reader.string();
  1577. break;
  1578. case 2:
  1579. message.about = reader.string();
  1580. break;
  1581. case 3:
  1582. message.status = reader.string();
  1583. break;
  1584. case 4:
  1585. message.statusMessage = reader.string();
  1586. break;
  1587. default:
  1588. reader.skipType(tag & 7);
  1589. break;
  1590. }
  1591. }
  1592. return message;
  1593. };
  1594. /**
  1595. * Decodes a WorkingGroupMetadata message from the specified reader or buffer, length delimited.
  1596. * @function decodeDelimited
  1597. * @memberof WorkingGroupMetadata
  1598. * @static
  1599. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1600. * @returns {WorkingGroupMetadata} WorkingGroupMetadata
  1601. * @throws {Error} If the payload is not a reader or valid buffer
  1602. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1603. */
  1604. WorkingGroupMetadata.decodeDelimited = function decodeDelimited(reader) {
  1605. if (!(reader instanceof $Reader))
  1606. reader = new $Reader(reader);
  1607. return this.decode(reader, reader.uint32());
  1608. };
  1609. /**
  1610. * Verifies a WorkingGroupMetadata message.
  1611. * @function verify
  1612. * @memberof WorkingGroupMetadata
  1613. * @static
  1614. * @param {Object.<string,*>} message Plain object to verify
  1615. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  1616. */
  1617. WorkingGroupMetadata.verify = function verify(message) {
  1618. if (typeof message !== "object" || message === null)
  1619. return "object expected";
  1620. if (message.description != null && message.hasOwnProperty("description"))
  1621. if (!$util.isString(message.description))
  1622. return "description: string expected";
  1623. if (message.about != null && message.hasOwnProperty("about"))
  1624. if (!$util.isString(message.about))
  1625. return "about: string expected";
  1626. if (message.status != null && message.hasOwnProperty("status"))
  1627. if (!$util.isString(message.status))
  1628. return "status: string expected";
  1629. if (message.statusMessage != null && message.hasOwnProperty("statusMessage"))
  1630. if (!$util.isString(message.statusMessage))
  1631. return "statusMessage: string expected";
  1632. return null;
  1633. };
  1634. /**
  1635. * Creates a WorkingGroupMetadata message from a plain object. Also converts values to their respective internal types.
  1636. * @function fromObject
  1637. * @memberof WorkingGroupMetadata
  1638. * @static
  1639. * @param {Object.<string,*>} object Plain object
  1640. * @returns {WorkingGroupMetadata} WorkingGroupMetadata
  1641. */
  1642. WorkingGroupMetadata.fromObject = function fromObject(object) {
  1643. if (object instanceof $root.WorkingGroupMetadata)
  1644. return object;
  1645. var message = new $root.WorkingGroupMetadata();
  1646. if (object.description != null)
  1647. message.description = String(object.description);
  1648. if (object.about != null)
  1649. message.about = String(object.about);
  1650. if (object.status != null)
  1651. message.status = String(object.status);
  1652. if (object.statusMessage != null)
  1653. message.statusMessage = String(object.statusMessage);
  1654. return message;
  1655. };
  1656. /**
  1657. * Creates a plain object from a WorkingGroupMetadata message. Also converts values to other types if specified.
  1658. * @function toObject
  1659. * @memberof WorkingGroupMetadata
  1660. * @static
  1661. * @param {WorkingGroupMetadata} message WorkingGroupMetadata
  1662. * @param {$protobuf.IConversionOptions} [options] Conversion options
  1663. * @returns {Object.<string,*>} Plain object
  1664. */
  1665. WorkingGroupMetadata.toObject = function toObject(message, options) {
  1666. if (!options)
  1667. options = {};
  1668. var object = {};
  1669. if (options.defaults) {
  1670. object.description = "";
  1671. object.about = "";
  1672. object.status = "";
  1673. object.statusMessage = "";
  1674. }
  1675. if (message.description != null && message.hasOwnProperty("description"))
  1676. object.description = message.description;
  1677. if (message.about != null && message.hasOwnProperty("about"))
  1678. object.about = message.about;
  1679. if (message.status != null && message.hasOwnProperty("status"))
  1680. object.status = message.status;
  1681. if (message.statusMessage != null && message.hasOwnProperty("statusMessage"))
  1682. object.statusMessage = message.statusMessage;
  1683. return object;
  1684. };
  1685. /**
  1686. * Converts this WorkingGroupMetadata to JSON.
  1687. * @function toJSON
  1688. * @memberof WorkingGroupMetadata
  1689. * @instance
  1690. * @returns {Object.<string,*>} JSON object
  1691. */
  1692. WorkingGroupMetadata.prototype.toJSON = function toJSON() {
  1693. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  1694. };
  1695. return WorkingGroupMetadata;
  1696. })();
  1697. $root.SetGroupMetadata = (function() {
  1698. /**
  1699. * Properties of a SetGroupMetadata.
  1700. * @exports ISetGroupMetadata
  1701. * @interface ISetGroupMetadata
  1702. * @property {IWorkingGroupMetadata} newMetadata SetGroupMetadata newMetadata
  1703. */
  1704. /**
  1705. * Constructs a new SetGroupMetadata.
  1706. * @exports SetGroupMetadata
  1707. * @classdesc Represents a SetGroupMetadata.
  1708. * @implements ISetGroupMetadata
  1709. * @constructor
  1710. * @param {ISetGroupMetadata=} [properties] Properties to set
  1711. */
  1712. function SetGroupMetadata(properties) {
  1713. if (properties)
  1714. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  1715. if (properties[keys[i]] != null)
  1716. this[keys[i]] = properties[keys[i]];
  1717. }
  1718. /**
  1719. * SetGroupMetadata newMetadata.
  1720. * @member {IWorkingGroupMetadata} newMetadata
  1721. * @memberof SetGroupMetadata
  1722. * @instance
  1723. */
  1724. SetGroupMetadata.prototype.newMetadata = null;
  1725. /**
  1726. * Creates a new SetGroupMetadata instance using the specified properties.
  1727. * @function create
  1728. * @memberof SetGroupMetadata
  1729. * @static
  1730. * @param {ISetGroupMetadata=} [properties] Properties to set
  1731. * @returns {SetGroupMetadata} SetGroupMetadata instance
  1732. */
  1733. SetGroupMetadata.create = function create(properties) {
  1734. return new SetGroupMetadata(properties);
  1735. };
  1736. /**
  1737. * Encodes the specified SetGroupMetadata message. Does not implicitly {@link SetGroupMetadata.verify|verify} messages.
  1738. * @function encode
  1739. * @memberof SetGroupMetadata
  1740. * @static
  1741. * @param {ISetGroupMetadata} message SetGroupMetadata message or plain object to encode
  1742. * @param {$protobuf.Writer} [writer] Writer to encode to
  1743. * @returns {$protobuf.Writer} Writer
  1744. */
  1745. SetGroupMetadata.encode = function encode(message, writer) {
  1746. if (!writer)
  1747. writer = $Writer.create();
  1748. $root.WorkingGroupMetadata.encode(message.newMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
  1749. return writer;
  1750. };
  1751. /**
  1752. * Encodes the specified SetGroupMetadata message, length delimited. Does not implicitly {@link SetGroupMetadata.verify|verify} messages.
  1753. * @function encodeDelimited
  1754. * @memberof SetGroupMetadata
  1755. * @static
  1756. * @param {ISetGroupMetadata} message SetGroupMetadata message or plain object to encode
  1757. * @param {$protobuf.Writer} [writer] Writer to encode to
  1758. * @returns {$protobuf.Writer} Writer
  1759. */
  1760. SetGroupMetadata.encodeDelimited = function encodeDelimited(message, writer) {
  1761. return this.encode(message, writer).ldelim();
  1762. };
  1763. /**
  1764. * Decodes a SetGroupMetadata message from the specified reader or buffer.
  1765. * @function decode
  1766. * @memberof SetGroupMetadata
  1767. * @static
  1768. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1769. * @param {number} [length] Message length if known beforehand
  1770. * @returns {SetGroupMetadata} SetGroupMetadata
  1771. * @throws {Error} If the payload is not a reader or valid buffer
  1772. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1773. */
  1774. SetGroupMetadata.decode = function decode(reader, length) {
  1775. if (!(reader instanceof $Reader))
  1776. reader = $Reader.create(reader);
  1777. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SetGroupMetadata();
  1778. while (reader.pos < end) {
  1779. var tag = reader.uint32();
  1780. switch (tag >>> 3) {
  1781. case 1:
  1782. message.newMetadata = $root.WorkingGroupMetadata.decode(reader, reader.uint32());
  1783. break;
  1784. default:
  1785. reader.skipType(tag & 7);
  1786. break;
  1787. }
  1788. }
  1789. if (!message.hasOwnProperty("newMetadata"))
  1790. throw $util.ProtocolError("missing required 'newMetadata'", { instance: message });
  1791. return message;
  1792. };
  1793. /**
  1794. * Decodes a SetGroupMetadata message from the specified reader or buffer, length delimited.
  1795. * @function decodeDelimited
  1796. * @memberof SetGroupMetadata
  1797. * @static
  1798. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1799. * @returns {SetGroupMetadata} SetGroupMetadata
  1800. * @throws {Error} If the payload is not a reader or valid buffer
  1801. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1802. */
  1803. SetGroupMetadata.decodeDelimited = function decodeDelimited(reader) {
  1804. if (!(reader instanceof $Reader))
  1805. reader = new $Reader(reader);
  1806. return this.decode(reader, reader.uint32());
  1807. };
  1808. /**
  1809. * Verifies a SetGroupMetadata message.
  1810. * @function verify
  1811. * @memberof SetGroupMetadata
  1812. * @static
  1813. * @param {Object.<string,*>} message Plain object to verify
  1814. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  1815. */
  1816. SetGroupMetadata.verify = function verify(message) {
  1817. if (typeof message !== "object" || message === null)
  1818. return "object expected";
  1819. {
  1820. var error = $root.WorkingGroupMetadata.verify(message.newMetadata);
  1821. if (error)
  1822. return "newMetadata." + error;
  1823. }
  1824. return null;
  1825. };
  1826. /**
  1827. * Creates a SetGroupMetadata message from a plain object. Also converts values to their respective internal types.
  1828. * @function fromObject
  1829. * @memberof SetGroupMetadata
  1830. * @static
  1831. * @param {Object.<string,*>} object Plain object
  1832. * @returns {SetGroupMetadata} SetGroupMetadata
  1833. */
  1834. SetGroupMetadata.fromObject = function fromObject(object) {
  1835. if (object instanceof $root.SetGroupMetadata)
  1836. return object;
  1837. var message = new $root.SetGroupMetadata();
  1838. if (object.newMetadata != null) {
  1839. if (typeof object.newMetadata !== "object")
  1840. throw TypeError(".SetGroupMetadata.newMetadata: object expected");
  1841. message.newMetadata = $root.WorkingGroupMetadata.fromObject(object.newMetadata);
  1842. }
  1843. return message;
  1844. };
  1845. /**
  1846. * Creates a plain object from a SetGroupMetadata message. Also converts values to other types if specified.
  1847. * @function toObject
  1848. * @memberof SetGroupMetadata
  1849. * @static
  1850. * @param {SetGroupMetadata} message SetGroupMetadata
  1851. * @param {$protobuf.IConversionOptions} [options] Conversion options
  1852. * @returns {Object.<string,*>} Plain object
  1853. */
  1854. SetGroupMetadata.toObject = function toObject(message, options) {
  1855. if (!options)
  1856. options = {};
  1857. var object = {};
  1858. if (options.defaults)
  1859. object.newMetadata = null;
  1860. if (message.newMetadata != null && message.hasOwnProperty("newMetadata"))
  1861. object.newMetadata = $root.WorkingGroupMetadata.toObject(message.newMetadata, options);
  1862. return object;
  1863. };
  1864. /**
  1865. * Converts this SetGroupMetadata to JSON.
  1866. * @function toJSON
  1867. * @memberof SetGroupMetadata
  1868. * @instance
  1869. * @returns {Object.<string,*>} JSON object
  1870. */
  1871. SetGroupMetadata.prototype.toJSON = function toJSON() {
  1872. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  1873. };
  1874. return SetGroupMetadata;
  1875. })();
  1876. $root.AddUpcomingOpening = (function() {
  1877. /**
  1878. * Properties of an AddUpcomingOpening.
  1879. * @exports IAddUpcomingOpening
  1880. * @interface IAddUpcomingOpening
  1881. * @property {IUpcomingOpeningMetadata} metadata AddUpcomingOpening metadata
  1882. */
  1883. /**
  1884. * Constructs a new AddUpcomingOpening.
  1885. * @exports AddUpcomingOpening
  1886. * @classdesc Represents an AddUpcomingOpening.
  1887. * @implements IAddUpcomingOpening
  1888. * @constructor
  1889. * @param {IAddUpcomingOpening=} [properties] Properties to set
  1890. */
  1891. function AddUpcomingOpening(properties) {
  1892. if (properties)
  1893. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  1894. if (properties[keys[i]] != null)
  1895. this[keys[i]] = properties[keys[i]];
  1896. }
  1897. /**
  1898. * AddUpcomingOpening metadata.
  1899. * @member {IUpcomingOpeningMetadata} metadata
  1900. * @memberof AddUpcomingOpening
  1901. * @instance
  1902. */
  1903. AddUpcomingOpening.prototype.metadata = null;
  1904. /**
  1905. * Creates a new AddUpcomingOpening instance using the specified properties.
  1906. * @function create
  1907. * @memberof AddUpcomingOpening
  1908. * @static
  1909. * @param {IAddUpcomingOpening=} [properties] Properties to set
  1910. * @returns {AddUpcomingOpening} AddUpcomingOpening instance
  1911. */
  1912. AddUpcomingOpening.create = function create(properties) {
  1913. return new AddUpcomingOpening(properties);
  1914. };
  1915. /**
  1916. * Encodes the specified AddUpcomingOpening message. Does not implicitly {@link AddUpcomingOpening.verify|verify} messages.
  1917. * @function encode
  1918. * @memberof AddUpcomingOpening
  1919. * @static
  1920. * @param {IAddUpcomingOpening} message AddUpcomingOpening message or plain object to encode
  1921. * @param {$protobuf.Writer} [writer] Writer to encode to
  1922. * @returns {$protobuf.Writer} Writer
  1923. */
  1924. AddUpcomingOpening.encode = function encode(message, writer) {
  1925. if (!writer)
  1926. writer = $Writer.create();
  1927. $root.UpcomingOpeningMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
  1928. return writer;
  1929. };
  1930. /**
  1931. * Encodes the specified AddUpcomingOpening message, length delimited. Does not implicitly {@link AddUpcomingOpening.verify|verify} messages.
  1932. * @function encodeDelimited
  1933. * @memberof AddUpcomingOpening
  1934. * @static
  1935. * @param {IAddUpcomingOpening} message AddUpcomingOpening message or plain object to encode
  1936. * @param {$protobuf.Writer} [writer] Writer to encode to
  1937. * @returns {$protobuf.Writer} Writer
  1938. */
  1939. AddUpcomingOpening.encodeDelimited = function encodeDelimited(message, writer) {
  1940. return this.encode(message, writer).ldelim();
  1941. };
  1942. /**
  1943. * Decodes an AddUpcomingOpening message from the specified reader or buffer.
  1944. * @function decode
  1945. * @memberof AddUpcomingOpening
  1946. * @static
  1947. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1948. * @param {number} [length] Message length if known beforehand
  1949. * @returns {AddUpcomingOpening} AddUpcomingOpening
  1950. * @throws {Error} If the payload is not a reader or valid buffer
  1951. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1952. */
  1953. AddUpcomingOpening.decode = function decode(reader, length) {
  1954. if (!(reader instanceof $Reader))
  1955. reader = $Reader.create(reader);
  1956. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AddUpcomingOpening();
  1957. while (reader.pos < end) {
  1958. var tag = reader.uint32();
  1959. switch (tag >>> 3) {
  1960. case 1:
  1961. message.metadata = $root.UpcomingOpeningMetadata.decode(reader, reader.uint32());
  1962. break;
  1963. default:
  1964. reader.skipType(tag & 7);
  1965. break;
  1966. }
  1967. }
  1968. if (!message.hasOwnProperty("metadata"))
  1969. throw $util.ProtocolError("missing required 'metadata'", { instance: message });
  1970. return message;
  1971. };
  1972. /**
  1973. * Decodes an AddUpcomingOpening message from the specified reader or buffer, length delimited.
  1974. * @function decodeDelimited
  1975. * @memberof AddUpcomingOpening
  1976. * @static
  1977. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1978. * @returns {AddUpcomingOpening} AddUpcomingOpening
  1979. * @throws {Error} If the payload is not a reader or valid buffer
  1980. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1981. */
  1982. AddUpcomingOpening.decodeDelimited = function decodeDelimited(reader) {
  1983. if (!(reader instanceof $Reader))
  1984. reader = new $Reader(reader);
  1985. return this.decode(reader, reader.uint32());
  1986. };
  1987. /**
  1988. * Verifies an AddUpcomingOpening message.
  1989. * @function verify
  1990. * @memberof AddUpcomingOpening
  1991. * @static
  1992. * @param {Object.<string,*>} message Plain object to verify
  1993. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  1994. */
  1995. AddUpcomingOpening.verify = function verify(message) {
  1996. if (typeof message !== "object" || message === null)
  1997. return "object expected";
  1998. {
  1999. var error = $root.UpcomingOpeningMetadata.verify(message.metadata);
  2000. if (error)
  2001. return "metadata." + error;
  2002. }
  2003. return null;
  2004. };
  2005. /**
  2006. * Creates an AddUpcomingOpening message from a plain object. Also converts values to their respective internal types.
  2007. * @function fromObject
  2008. * @memberof AddUpcomingOpening
  2009. * @static
  2010. * @param {Object.<string,*>} object Plain object
  2011. * @returns {AddUpcomingOpening} AddUpcomingOpening
  2012. */
  2013. AddUpcomingOpening.fromObject = function fromObject(object) {
  2014. if (object instanceof $root.AddUpcomingOpening)
  2015. return object;
  2016. var message = new $root.AddUpcomingOpening();
  2017. if (object.metadata != null) {
  2018. if (typeof object.metadata !== "object")
  2019. throw TypeError(".AddUpcomingOpening.metadata: object expected");
  2020. message.metadata = $root.UpcomingOpeningMetadata.fromObject(object.metadata);
  2021. }
  2022. return message;
  2023. };
  2024. /**
  2025. * Creates a plain object from an AddUpcomingOpening message. Also converts values to other types if specified.
  2026. * @function toObject
  2027. * @memberof AddUpcomingOpening
  2028. * @static
  2029. * @param {AddUpcomingOpening} message AddUpcomingOpening
  2030. * @param {$protobuf.IConversionOptions} [options] Conversion options
  2031. * @returns {Object.<string,*>} Plain object
  2032. */
  2033. AddUpcomingOpening.toObject = function toObject(message, options) {
  2034. if (!options)
  2035. options = {};
  2036. var object = {};
  2037. if (options.defaults)
  2038. object.metadata = null;
  2039. if (message.metadata != null && message.hasOwnProperty("metadata"))
  2040. object.metadata = $root.UpcomingOpeningMetadata.toObject(message.metadata, options);
  2041. return object;
  2042. };
  2043. /**
  2044. * Converts this AddUpcomingOpening to JSON.
  2045. * @function toJSON
  2046. * @memberof AddUpcomingOpening
  2047. * @instance
  2048. * @returns {Object.<string,*>} JSON object
  2049. */
  2050. AddUpcomingOpening.prototype.toJSON = function toJSON() {
  2051. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  2052. };
  2053. return AddUpcomingOpening;
  2054. })();
  2055. $root.RemoveUpcomingOpening = (function() {
  2056. /**
  2057. * Properties of a RemoveUpcomingOpening.
  2058. * @exports IRemoveUpcomingOpening
  2059. * @interface IRemoveUpcomingOpening
  2060. * @property {string} id RemoveUpcomingOpening id
  2061. */
  2062. /**
  2063. * Constructs a new RemoveUpcomingOpening.
  2064. * @exports RemoveUpcomingOpening
  2065. * @classdesc Represents a RemoveUpcomingOpening.
  2066. * @implements IRemoveUpcomingOpening
  2067. * @constructor
  2068. * @param {IRemoveUpcomingOpening=} [properties] Properties to set
  2069. */
  2070. function RemoveUpcomingOpening(properties) {
  2071. if (properties)
  2072. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  2073. if (properties[keys[i]] != null)
  2074. this[keys[i]] = properties[keys[i]];
  2075. }
  2076. /**
  2077. * RemoveUpcomingOpening id.
  2078. * @member {string} id
  2079. * @memberof RemoveUpcomingOpening
  2080. * @instance
  2081. */
  2082. RemoveUpcomingOpening.prototype.id = "";
  2083. /**
  2084. * Creates a new RemoveUpcomingOpening instance using the specified properties.
  2085. * @function create
  2086. * @memberof RemoveUpcomingOpening
  2087. * @static
  2088. * @param {IRemoveUpcomingOpening=} [properties] Properties to set
  2089. * @returns {RemoveUpcomingOpening} RemoveUpcomingOpening instance
  2090. */
  2091. RemoveUpcomingOpening.create = function create(properties) {
  2092. return new RemoveUpcomingOpening(properties);
  2093. };
  2094. /**
  2095. * Encodes the specified RemoveUpcomingOpening message. Does not implicitly {@link RemoveUpcomingOpening.verify|verify} messages.
  2096. * @function encode
  2097. * @memberof RemoveUpcomingOpening
  2098. * @static
  2099. * @param {IRemoveUpcomingOpening} message RemoveUpcomingOpening message or plain object to encode
  2100. * @param {$protobuf.Writer} [writer] Writer to encode to
  2101. * @returns {$protobuf.Writer} Writer
  2102. */
  2103. RemoveUpcomingOpening.encode = function encode(message, writer) {
  2104. if (!writer)
  2105. writer = $Writer.create();
  2106. writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
  2107. return writer;
  2108. };
  2109. /**
  2110. * Encodes the specified RemoveUpcomingOpening message, length delimited. Does not implicitly {@link RemoveUpcomingOpening.verify|verify} messages.
  2111. * @function encodeDelimited
  2112. * @memberof RemoveUpcomingOpening
  2113. * @static
  2114. * @param {IRemoveUpcomingOpening} message RemoveUpcomingOpening message or plain object to encode
  2115. * @param {$protobuf.Writer} [writer] Writer to encode to
  2116. * @returns {$protobuf.Writer} Writer
  2117. */
  2118. RemoveUpcomingOpening.encodeDelimited = function encodeDelimited(message, writer) {
  2119. return this.encode(message, writer).ldelim();
  2120. };
  2121. /**
  2122. * Decodes a RemoveUpcomingOpening message from the specified reader or buffer.
  2123. * @function decode
  2124. * @memberof RemoveUpcomingOpening
  2125. * @static
  2126. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  2127. * @param {number} [length] Message length if known beforehand
  2128. * @returns {RemoveUpcomingOpening} RemoveUpcomingOpening
  2129. * @throws {Error} If the payload is not a reader or valid buffer
  2130. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  2131. */
  2132. RemoveUpcomingOpening.decode = function decode(reader, length) {
  2133. if (!(reader instanceof $Reader))
  2134. reader = $Reader.create(reader);
  2135. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.RemoveUpcomingOpening();
  2136. while (reader.pos < end) {
  2137. var tag = reader.uint32();
  2138. switch (tag >>> 3) {
  2139. case 1:
  2140. message.id = reader.string();
  2141. break;
  2142. default:
  2143. reader.skipType(tag & 7);
  2144. break;
  2145. }
  2146. }
  2147. if (!message.hasOwnProperty("id"))
  2148. throw $util.ProtocolError("missing required 'id'", { instance: message });
  2149. return message;
  2150. };
  2151. /**
  2152. * Decodes a RemoveUpcomingOpening message from the specified reader or buffer, length delimited.
  2153. * @function decodeDelimited
  2154. * @memberof RemoveUpcomingOpening
  2155. * @static
  2156. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  2157. * @returns {RemoveUpcomingOpening} RemoveUpcomingOpening
  2158. * @throws {Error} If the payload is not a reader or valid buffer
  2159. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  2160. */
  2161. RemoveUpcomingOpening.decodeDelimited = function decodeDelimited(reader) {
  2162. if (!(reader instanceof $Reader))
  2163. reader = new $Reader(reader);
  2164. return this.decode(reader, reader.uint32());
  2165. };
  2166. /**
  2167. * Verifies a RemoveUpcomingOpening message.
  2168. * @function verify
  2169. * @memberof RemoveUpcomingOpening
  2170. * @static
  2171. * @param {Object.<string,*>} message Plain object to verify
  2172. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  2173. */
  2174. RemoveUpcomingOpening.verify = function verify(message) {
  2175. if (typeof message !== "object" || message === null)
  2176. return "object expected";
  2177. if (!$util.isString(message.id))
  2178. return "id: string expected";
  2179. return null;
  2180. };
  2181. /**
  2182. * Creates a RemoveUpcomingOpening message from a plain object. Also converts values to their respective internal types.
  2183. * @function fromObject
  2184. * @memberof RemoveUpcomingOpening
  2185. * @static
  2186. * @param {Object.<string,*>} object Plain object
  2187. * @returns {RemoveUpcomingOpening} RemoveUpcomingOpening
  2188. */
  2189. RemoveUpcomingOpening.fromObject = function fromObject(object) {
  2190. if (object instanceof $root.RemoveUpcomingOpening)
  2191. return object;
  2192. var message = new $root.RemoveUpcomingOpening();
  2193. if (object.id != null)
  2194. message.id = String(object.id);
  2195. return message;
  2196. };
  2197. /**
  2198. * Creates a plain object from a RemoveUpcomingOpening message. Also converts values to other types if specified.
  2199. * @function toObject
  2200. * @memberof RemoveUpcomingOpening
  2201. * @static
  2202. * @param {RemoveUpcomingOpening} message RemoveUpcomingOpening
  2203. * @param {$protobuf.IConversionOptions} [options] Conversion options
  2204. * @returns {Object.<string,*>} Plain object
  2205. */
  2206. RemoveUpcomingOpening.toObject = function toObject(message, options) {
  2207. if (!options)
  2208. options = {};
  2209. var object = {};
  2210. if (options.defaults)
  2211. object.id = "";
  2212. if (message.id != null && message.hasOwnProperty("id"))
  2213. object.id = message.id;
  2214. return object;
  2215. };
  2216. /**
  2217. * Converts this RemoveUpcomingOpening to JSON.
  2218. * @function toJSON
  2219. * @memberof RemoveUpcomingOpening
  2220. * @instance
  2221. * @returns {Object.<string,*>} JSON object
  2222. */
  2223. RemoveUpcomingOpening.prototype.toJSON = function toJSON() {
  2224. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  2225. };
  2226. return RemoveUpcomingOpening;
  2227. })();
  2228. $root.WorkingGroupMetadataAction = (function() {
  2229. /**
  2230. * Properties of a WorkingGroupMetadataAction.
  2231. * @exports IWorkingGroupMetadataAction
  2232. * @interface IWorkingGroupMetadataAction
  2233. * @property {ISetGroupMetadata|null} [setGroupMetadata] WorkingGroupMetadataAction setGroupMetadata
  2234. * @property {IAddUpcomingOpening|null} [addUpcomingOpening] WorkingGroupMetadataAction addUpcomingOpening
  2235. * @property {IRemoveUpcomingOpening|null} [removeUpcomingOpening] WorkingGroupMetadataAction removeUpcomingOpening
  2236. */
  2237. /**
  2238. * Constructs a new WorkingGroupMetadataAction.
  2239. * @exports WorkingGroupMetadataAction
  2240. * @classdesc Represents a WorkingGroupMetadataAction.
  2241. * @implements IWorkingGroupMetadataAction
  2242. * @constructor
  2243. * @param {IWorkingGroupMetadataAction=} [properties] Properties to set
  2244. */
  2245. function WorkingGroupMetadataAction(properties) {
  2246. if (properties)
  2247. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  2248. if (properties[keys[i]] != null)
  2249. this[keys[i]] = properties[keys[i]];
  2250. }
  2251. /**
  2252. * WorkingGroupMetadataAction setGroupMetadata.
  2253. * @member {ISetGroupMetadata|null|undefined} setGroupMetadata
  2254. * @memberof WorkingGroupMetadataAction
  2255. * @instance
  2256. */
  2257. WorkingGroupMetadataAction.prototype.setGroupMetadata = null;
  2258. /**
  2259. * WorkingGroupMetadataAction addUpcomingOpening.
  2260. * @member {IAddUpcomingOpening|null|undefined} addUpcomingOpening
  2261. * @memberof WorkingGroupMetadataAction
  2262. * @instance
  2263. */
  2264. WorkingGroupMetadataAction.prototype.addUpcomingOpening = null;
  2265. /**
  2266. * WorkingGroupMetadataAction removeUpcomingOpening.
  2267. * @member {IRemoveUpcomingOpening|null|undefined} removeUpcomingOpening
  2268. * @memberof WorkingGroupMetadataAction
  2269. * @instance
  2270. */
  2271. WorkingGroupMetadataAction.prototype.removeUpcomingOpening = null;
  2272. // OneOf field names bound to virtual getters and setters
  2273. var $oneOfFields;
  2274. /**
  2275. * WorkingGroupMetadataAction action.
  2276. * @member {"setGroupMetadata"|"addUpcomingOpening"|"removeUpcomingOpening"|undefined} action
  2277. * @memberof WorkingGroupMetadataAction
  2278. * @instance
  2279. */
  2280. Object.defineProperty(WorkingGroupMetadataAction.prototype, "action", {
  2281. get: $util.oneOfGetter($oneOfFields = ["setGroupMetadata", "addUpcomingOpening", "removeUpcomingOpening"]),
  2282. set: $util.oneOfSetter($oneOfFields)
  2283. });
  2284. /**
  2285. * Creates a new WorkingGroupMetadataAction instance using the specified properties.
  2286. * @function create
  2287. * @memberof WorkingGroupMetadataAction
  2288. * @static
  2289. * @param {IWorkingGroupMetadataAction=} [properties] Properties to set
  2290. * @returns {WorkingGroupMetadataAction} WorkingGroupMetadataAction instance
  2291. */
  2292. WorkingGroupMetadataAction.create = function create(properties) {
  2293. return new WorkingGroupMetadataAction(properties);
  2294. };
  2295. /**
  2296. * Encodes the specified WorkingGroupMetadataAction message. Does not implicitly {@link WorkingGroupMetadataAction.verify|verify} messages.
  2297. * @function encode
  2298. * @memberof WorkingGroupMetadataAction
  2299. * @static
  2300. * @param {IWorkingGroupMetadataAction} message WorkingGroupMetadataAction message or plain object to encode
  2301. * @param {$protobuf.Writer} [writer] Writer to encode to
  2302. * @returns {$protobuf.Writer} Writer
  2303. */
  2304. WorkingGroupMetadataAction.encode = function encode(message, writer) {
  2305. if (!writer)
  2306. writer = $Writer.create();
  2307. if (message.setGroupMetadata != null && Object.hasOwnProperty.call(message, "setGroupMetadata"))
  2308. $root.SetGroupMetadata.encode(message.setGroupMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
  2309. if (message.addUpcomingOpening != null && Object.hasOwnProperty.call(message, "addUpcomingOpening"))
  2310. $root.AddUpcomingOpening.encode(message.addUpcomingOpening, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
  2311. if (message.removeUpcomingOpening != null && Object.hasOwnProperty.call(message, "removeUpcomingOpening"))
  2312. $root.RemoveUpcomingOpening.encode(message.removeUpcomingOpening, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
  2313. return writer;
  2314. };
  2315. /**
  2316. * Encodes the specified WorkingGroupMetadataAction message, length delimited. Does not implicitly {@link WorkingGroupMetadataAction.verify|verify} messages.
  2317. * @function encodeDelimited
  2318. * @memberof WorkingGroupMetadataAction
  2319. * @static
  2320. * @param {IWorkingGroupMetadataAction} message WorkingGroupMetadataAction message or plain object to encode
  2321. * @param {$protobuf.Writer} [writer] Writer to encode to
  2322. * @returns {$protobuf.Writer} Writer
  2323. */
  2324. WorkingGroupMetadataAction.encodeDelimited = function encodeDelimited(message, writer) {
  2325. return this.encode(message, writer).ldelim();
  2326. };
  2327. /**
  2328. * Decodes a WorkingGroupMetadataAction message from the specified reader or buffer.
  2329. * @function decode
  2330. * @memberof WorkingGroupMetadataAction
  2331. * @static
  2332. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  2333. * @param {number} [length] Message length if known beforehand
  2334. * @returns {WorkingGroupMetadataAction} WorkingGroupMetadataAction
  2335. * @throws {Error} If the payload is not a reader or valid buffer
  2336. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  2337. */
  2338. WorkingGroupMetadataAction.decode = function decode(reader, length) {
  2339. if (!(reader instanceof $Reader))
  2340. reader = $Reader.create(reader);
  2341. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.WorkingGroupMetadataAction();
  2342. while (reader.pos < end) {
  2343. var tag = reader.uint32();
  2344. switch (tag >>> 3) {
  2345. case 1:
  2346. message.setGroupMetadata = $root.SetGroupMetadata.decode(reader, reader.uint32());
  2347. break;
  2348. case 2:
  2349. message.addUpcomingOpening = $root.AddUpcomingOpening.decode(reader, reader.uint32());
  2350. break;
  2351. case 3:
  2352. message.removeUpcomingOpening = $root.RemoveUpcomingOpening.decode(reader, reader.uint32());
  2353. break;
  2354. default:
  2355. reader.skipType(tag & 7);
  2356. break;
  2357. }
  2358. }
  2359. return message;
  2360. };
  2361. /**
  2362. * Decodes a WorkingGroupMetadataAction message from the specified reader or buffer, length delimited.
  2363. * @function decodeDelimited
  2364. * @memberof WorkingGroupMetadataAction
  2365. * @static
  2366. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  2367. * @returns {WorkingGroupMetadataAction} WorkingGroupMetadataAction
  2368. * @throws {Error} If the payload is not a reader or valid buffer
  2369. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  2370. */
  2371. WorkingGroupMetadataAction.decodeDelimited = function decodeDelimited(reader) {
  2372. if (!(reader instanceof $Reader))
  2373. reader = new $Reader(reader);
  2374. return this.decode(reader, reader.uint32());
  2375. };
  2376. /**
  2377. * Verifies a WorkingGroupMetadataAction message.
  2378. * @function verify
  2379. * @memberof WorkingGroupMetadataAction
  2380. * @static
  2381. * @param {Object.<string,*>} message Plain object to verify
  2382. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  2383. */
  2384. WorkingGroupMetadataAction.verify = function verify(message) {
  2385. if (typeof message !== "object" || message === null)
  2386. return "object expected";
  2387. var properties = {};
  2388. if (message.setGroupMetadata != null && message.hasOwnProperty("setGroupMetadata")) {
  2389. properties.action = 1;
  2390. {
  2391. var error = $root.SetGroupMetadata.verify(message.setGroupMetadata);
  2392. if (error)
  2393. return "setGroupMetadata." + error;
  2394. }
  2395. }
  2396. if (message.addUpcomingOpening != null && message.hasOwnProperty("addUpcomingOpening")) {
  2397. if (properties.action === 1)
  2398. return "action: multiple values";
  2399. properties.action = 1;
  2400. {
  2401. var error = $root.AddUpcomingOpening.verify(message.addUpcomingOpening);
  2402. if (error)
  2403. return "addUpcomingOpening." + error;
  2404. }
  2405. }
  2406. if (message.removeUpcomingOpening != null && message.hasOwnProperty("removeUpcomingOpening")) {
  2407. if (properties.action === 1)
  2408. return "action: multiple values";
  2409. properties.action = 1;
  2410. {
  2411. var error = $root.RemoveUpcomingOpening.verify(message.removeUpcomingOpening);
  2412. if (error)
  2413. return "removeUpcomingOpening." + error;
  2414. }
  2415. }
  2416. return null;
  2417. };
  2418. /**
  2419. * Creates a WorkingGroupMetadataAction message from a plain object. Also converts values to their respective internal types.
  2420. * @function fromObject
  2421. * @memberof WorkingGroupMetadataAction
  2422. * @static
  2423. * @param {Object.<string,*>} object Plain object
  2424. * @returns {WorkingGroupMetadataAction} WorkingGroupMetadataAction
  2425. */
  2426. WorkingGroupMetadataAction.fromObject = function fromObject(object) {
  2427. if (object instanceof $root.WorkingGroupMetadataAction)
  2428. return object;
  2429. var message = new $root.WorkingGroupMetadataAction();
  2430. if (object.setGroupMetadata != null) {
  2431. if (typeof object.setGroupMetadata !== "object")
  2432. throw TypeError(".WorkingGroupMetadataAction.setGroupMetadata: object expected");
  2433. message.setGroupMetadata = $root.SetGroupMetadata.fromObject(object.setGroupMetadata);
  2434. }
  2435. if (object.addUpcomingOpening != null) {
  2436. if (typeof object.addUpcomingOpening !== "object")
  2437. throw TypeError(".WorkingGroupMetadataAction.addUpcomingOpening: object expected");
  2438. message.addUpcomingOpening = $root.AddUpcomingOpening.fromObject(object.addUpcomingOpening);
  2439. }
  2440. if (object.removeUpcomingOpening != null) {
  2441. if (typeof object.removeUpcomingOpening !== "object")
  2442. throw TypeError(".WorkingGroupMetadataAction.removeUpcomingOpening: object expected");
  2443. message.removeUpcomingOpening = $root.RemoveUpcomingOpening.fromObject(object.removeUpcomingOpening);
  2444. }
  2445. return message;
  2446. };
  2447. /**
  2448. * Creates a plain object from a WorkingGroupMetadataAction message. Also converts values to other types if specified.
  2449. * @function toObject
  2450. * @memberof WorkingGroupMetadataAction
  2451. * @static
  2452. * @param {WorkingGroupMetadataAction} message WorkingGroupMetadataAction
  2453. * @param {$protobuf.IConversionOptions} [options] Conversion options
  2454. * @returns {Object.<string,*>} Plain object
  2455. */
  2456. WorkingGroupMetadataAction.toObject = function toObject(message, options) {
  2457. if (!options)
  2458. options = {};
  2459. var object = {};
  2460. if (message.setGroupMetadata != null && message.hasOwnProperty("setGroupMetadata")) {
  2461. object.setGroupMetadata = $root.SetGroupMetadata.toObject(message.setGroupMetadata, options);
  2462. if (options.oneofs)
  2463. object.action = "setGroupMetadata";
  2464. }
  2465. if (message.addUpcomingOpening != null && message.hasOwnProperty("addUpcomingOpening")) {
  2466. object.addUpcomingOpening = $root.AddUpcomingOpening.toObject(message.addUpcomingOpening, options);
  2467. if (options.oneofs)
  2468. object.action = "addUpcomingOpening";
  2469. }
  2470. if (message.removeUpcomingOpening != null && message.hasOwnProperty("removeUpcomingOpening")) {
  2471. object.removeUpcomingOpening = $root.RemoveUpcomingOpening.toObject(message.removeUpcomingOpening, options);
  2472. if (options.oneofs)
  2473. object.action = "removeUpcomingOpening";
  2474. }
  2475. return object;
  2476. };
  2477. /**
  2478. * Converts this WorkingGroupMetadataAction to JSON.
  2479. * @function toJSON
  2480. * @memberof WorkingGroupMetadataAction
  2481. * @instance
  2482. * @returns {Object.<string,*>} JSON object
  2483. */
  2484. WorkingGroupMetadataAction.prototype.toJSON = function toJSON() {
  2485. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  2486. };
  2487. return WorkingGroupMetadataAction;
  2488. })();
  2489. module.exports = $root;