index.js 109 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666
  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|null} [shortDescription] OpeningMetadata shortDescription
  484. * @property {string|null} [description] OpeningMetadata description
  485. * @property {number|null} [hiringLimit] OpeningMetadata hiringLimit
  486. * @property {number|null} [expectedEndingTimestamp] OpeningMetadata expectedEndingTimestamp
  487. * @property {string|null} [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. if (message.shortDescription != null && Object.hasOwnProperty.call(message, "shortDescription"))
  571. writer.uint32(/* id 1, wireType 2 =*/10).string(message.shortDescription);
  572. if (message.description != null && Object.hasOwnProperty.call(message, "description"))
  573. writer.uint32(/* id 2, wireType 2 =*/18).string(message.description);
  574. if (message.hiringLimit != null && Object.hasOwnProperty.call(message, "hiringLimit"))
  575. writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.hiringLimit);
  576. if (message.expectedEndingTimestamp != null && Object.hasOwnProperty.call(message, "expectedEndingTimestamp"))
  577. writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.expectedEndingTimestamp);
  578. if (message.applicationDetails != null && Object.hasOwnProperty.call(message, "applicationDetails"))
  579. writer.uint32(/* id 5, wireType 2 =*/42).string(message.applicationDetails);
  580. if (message.applicationFormQuestions != null && message.applicationFormQuestions.length)
  581. for (var i = 0; i < message.applicationFormQuestions.length; ++i)
  582. $root.OpeningMetadata.ApplicationFormQuestion.encode(message.applicationFormQuestions[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
  583. return writer;
  584. };
  585. /**
  586. * Encodes the specified OpeningMetadata message, length delimited. Does not implicitly {@link OpeningMetadata.verify|verify} messages.
  587. * @function encodeDelimited
  588. * @memberof OpeningMetadata
  589. * @static
  590. * @param {IOpeningMetadata} message OpeningMetadata message or plain object to encode
  591. * @param {$protobuf.Writer} [writer] Writer to encode to
  592. * @returns {$protobuf.Writer} Writer
  593. */
  594. OpeningMetadata.encodeDelimited = function encodeDelimited(message, writer) {
  595. return this.encode(message, writer).ldelim();
  596. };
  597. /**
  598. * Decodes an OpeningMetadata message from the specified reader or buffer.
  599. * @function decode
  600. * @memberof OpeningMetadata
  601. * @static
  602. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  603. * @param {number} [length] Message length if known beforehand
  604. * @returns {OpeningMetadata} OpeningMetadata
  605. * @throws {Error} If the payload is not a reader or valid buffer
  606. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  607. */
  608. OpeningMetadata.decode = function decode(reader, length) {
  609. if (!(reader instanceof $Reader))
  610. reader = $Reader.create(reader);
  611. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.OpeningMetadata();
  612. while (reader.pos < end) {
  613. var tag = reader.uint32();
  614. switch (tag >>> 3) {
  615. case 1:
  616. message.shortDescription = reader.string();
  617. break;
  618. case 2:
  619. message.description = reader.string();
  620. break;
  621. case 3:
  622. message.hiringLimit = reader.uint32();
  623. break;
  624. case 4:
  625. message.expectedEndingTimestamp = reader.uint32();
  626. break;
  627. case 5:
  628. message.applicationDetails = reader.string();
  629. break;
  630. case 6:
  631. if (!(message.applicationFormQuestions && message.applicationFormQuestions.length))
  632. message.applicationFormQuestions = [];
  633. message.applicationFormQuestions.push($root.OpeningMetadata.ApplicationFormQuestion.decode(reader, reader.uint32()));
  634. break;
  635. default:
  636. reader.skipType(tag & 7);
  637. break;
  638. }
  639. }
  640. return message;
  641. };
  642. /**
  643. * Decodes an OpeningMetadata message from the specified reader or buffer, length delimited.
  644. * @function decodeDelimited
  645. * @memberof OpeningMetadata
  646. * @static
  647. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  648. * @returns {OpeningMetadata} OpeningMetadata
  649. * @throws {Error} If the payload is not a reader or valid buffer
  650. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  651. */
  652. OpeningMetadata.decodeDelimited = function decodeDelimited(reader) {
  653. if (!(reader instanceof $Reader))
  654. reader = new $Reader(reader);
  655. return this.decode(reader, reader.uint32());
  656. };
  657. /**
  658. * Verifies an OpeningMetadata message.
  659. * @function verify
  660. * @memberof OpeningMetadata
  661. * @static
  662. * @param {Object.<string,*>} message Plain object to verify
  663. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  664. */
  665. OpeningMetadata.verify = function verify(message) {
  666. if (typeof message !== "object" || message === null)
  667. return "object expected";
  668. if (message.shortDescription != null && message.hasOwnProperty("shortDescription"))
  669. if (!$util.isString(message.shortDescription))
  670. return "shortDescription: string expected";
  671. if (message.description != null && message.hasOwnProperty("description"))
  672. if (!$util.isString(message.description))
  673. return "description: string expected";
  674. if (message.hiringLimit != null && message.hasOwnProperty("hiringLimit"))
  675. if (!$util.isInteger(message.hiringLimit))
  676. return "hiringLimit: integer expected";
  677. if (message.expectedEndingTimestamp != null && message.hasOwnProperty("expectedEndingTimestamp"))
  678. if (!$util.isInteger(message.expectedEndingTimestamp))
  679. return "expectedEndingTimestamp: integer expected";
  680. if (message.applicationDetails != null && message.hasOwnProperty("applicationDetails"))
  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|null} [question] ApplicationFormQuestion question
  783. * @property {OpeningMetadata.ApplicationFormQuestion.InputType|null} [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 = 0;
  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. if (message.question != null && Object.hasOwnProperty.call(message, "question"))
  837. writer.uint32(/* id 1, wireType 2 =*/10).string(message.question);
  838. if (message.type != null && Object.hasOwnProperty.call(message, "type"))
  839. writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type);
  840. return writer;
  841. };
  842. /**
  843. * Encodes the specified ApplicationFormQuestion message, length delimited. Does not implicitly {@link OpeningMetadata.ApplicationFormQuestion.verify|verify} messages.
  844. * @function encodeDelimited
  845. * @memberof OpeningMetadata.ApplicationFormQuestion
  846. * @static
  847. * @param {OpeningMetadata.IApplicationFormQuestion} message ApplicationFormQuestion message or plain object to encode
  848. * @param {$protobuf.Writer} [writer] Writer to encode to
  849. * @returns {$protobuf.Writer} Writer
  850. */
  851. ApplicationFormQuestion.encodeDelimited = function encodeDelimited(message, writer) {
  852. return this.encode(message, writer).ldelim();
  853. };
  854. /**
  855. * Decodes an ApplicationFormQuestion message from the specified reader or buffer.
  856. * @function decode
  857. * @memberof OpeningMetadata.ApplicationFormQuestion
  858. * @static
  859. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  860. * @param {number} [length] Message length if known beforehand
  861. * @returns {OpeningMetadata.ApplicationFormQuestion} ApplicationFormQuestion
  862. * @throws {Error} If the payload is not a reader or valid buffer
  863. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  864. */
  865. ApplicationFormQuestion.decode = function decode(reader, length) {
  866. if (!(reader instanceof $Reader))
  867. reader = $Reader.create(reader);
  868. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.OpeningMetadata.ApplicationFormQuestion();
  869. while (reader.pos < end) {
  870. var tag = reader.uint32();
  871. switch (tag >>> 3) {
  872. case 1:
  873. message.question = reader.string();
  874. break;
  875. case 2:
  876. message.type = reader.int32();
  877. break;
  878. default:
  879. reader.skipType(tag & 7);
  880. break;
  881. }
  882. }
  883. return message;
  884. };
  885. /**
  886. * Decodes an ApplicationFormQuestion message from the specified reader or buffer, length delimited.
  887. * @function decodeDelimited
  888. * @memberof OpeningMetadata.ApplicationFormQuestion
  889. * @static
  890. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  891. * @returns {OpeningMetadata.ApplicationFormQuestion} ApplicationFormQuestion
  892. * @throws {Error} If the payload is not a reader or valid buffer
  893. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  894. */
  895. ApplicationFormQuestion.decodeDelimited = function decodeDelimited(reader) {
  896. if (!(reader instanceof $Reader))
  897. reader = new $Reader(reader);
  898. return this.decode(reader, reader.uint32());
  899. };
  900. /**
  901. * Verifies an ApplicationFormQuestion message.
  902. * @function verify
  903. * @memberof OpeningMetadata.ApplicationFormQuestion
  904. * @static
  905. * @param {Object.<string,*>} message Plain object to verify
  906. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  907. */
  908. ApplicationFormQuestion.verify = function verify(message) {
  909. if (typeof message !== "object" || message === null)
  910. return "object expected";
  911. if (message.question != null && message.hasOwnProperty("question"))
  912. if (!$util.isString(message.question))
  913. return "question: string expected";
  914. if (message.type != null && message.hasOwnProperty("type"))
  915. switch (message.type) {
  916. default:
  917. return "type: enum value expected";
  918. case 0:
  919. case 1:
  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 0:
  941. message.type = 0;
  942. break;
  943. case "TEXTAREA":
  944. case 1:
  945. message.type = 1;
  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" : 0;
  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=0 TEXT value
  988. * @property {number} TEXTAREA=1 TEXTAREA value
  989. */
  990. ApplicationFormQuestion.InputType = (function() {
  991. var valuesById = {}, values = Object.create(valuesById);
  992. values[valuesById[0] = "TEXT"] = 0;
  993. values[valuesById[1] = "TEXTAREA"] = 1;
  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|null} [expectedStart] UpcomingOpeningMetadata expectedStart
  1006. * @property {Long|null} [rewardPerBlock] UpcomingOpeningMetadata rewardPerBlock
  1007. * @property {Long|null} [minApplicationStake] UpcomingOpeningMetadata minApplicationStake
  1008. * @property {IOpeningMetadata|null} [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|null|undefined} 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. if (message.expectedStart != null && Object.hasOwnProperty.call(message, "expectedStart"))
  1076. writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.expectedStart);
  1077. if (message.rewardPerBlock != null && Object.hasOwnProperty.call(message, "rewardPerBlock"))
  1078. writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.rewardPerBlock);
  1079. if (message.minApplicationStake != null && Object.hasOwnProperty.call(message, "minApplicationStake"))
  1080. writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.minApplicationStake);
  1081. if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
  1082. $root.OpeningMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
  1083. return writer;
  1084. };
  1085. /**
  1086. * Encodes the specified UpcomingOpeningMetadata message, length delimited. Does not implicitly {@link UpcomingOpeningMetadata.verify|verify} messages.
  1087. * @function encodeDelimited
  1088. * @memberof UpcomingOpeningMetadata
  1089. * @static
  1090. * @param {IUpcomingOpeningMetadata} message UpcomingOpeningMetadata message or plain object to encode
  1091. * @param {$protobuf.Writer} [writer] Writer to encode to
  1092. * @returns {$protobuf.Writer} Writer
  1093. */
  1094. UpcomingOpeningMetadata.encodeDelimited = function encodeDelimited(message, writer) {
  1095. return this.encode(message, writer).ldelim();
  1096. };
  1097. /**
  1098. * Decodes an UpcomingOpeningMetadata message from the specified reader or buffer.
  1099. * @function decode
  1100. * @memberof UpcomingOpeningMetadata
  1101. * @static
  1102. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1103. * @param {number} [length] Message length if known beforehand
  1104. * @returns {UpcomingOpeningMetadata} UpcomingOpeningMetadata
  1105. * @throws {Error} If the payload is not a reader or valid buffer
  1106. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1107. */
  1108. UpcomingOpeningMetadata.decode = function decode(reader, length) {
  1109. if (!(reader instanceof $Reader))
  1110. reader = $Reader.create(reader);
  1111. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UpcomingOpeningMetadata();
  1112. while (reader.pos < end) {
  1113. var tag = reader.uint32();
  1114. switch (tag >>> 3) {
  1115. case 1:
  1116. message.expectedStart = reader.uint32();
  1117. break;
  1118. case 2:
  1119. message.rewardPerBlock = reader.uint64();
  1120. break;
  1121. case 3:
  1122. message.minApplicationStake = reader.uint64();
  1123. break;
  1124. case 4:
  1125. message.metadata = $root.OpeningMetadata.decode(reader, reader.uint32());
  1126. break;
  1127. default:
  1128. reader.skipType(tag & 7);
  1129. break;
  1130. }
  1131. }
  1132. return message;
  1133. };
  1134. /**
  1135. * Decodes an UpcomingOpeningMetadata message from the specified reader or buffer, length delimited.
  1136. * @function decodeDelimited
  1137. * @memberof UpcomingOpeningMetadata
  1138. * @static
  1139. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1140. * @returns {UpcomingOpeningMetadata} UpcomingOpeningMetadata
  1141. * @throws {Error} If the payload is not a reader or valid buffer
  1142. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1143. */
  1144. UpcomingOpeningMetadata.decodeDelimited = function decodeDelimited(reader) {
  1145. if (!(reader instanceof $Reader))
  1146. reader = new $Reader(reader);
  1147. return this.decode(reader, reader.uint32());
  1148. };
  1149. /**
  1150. * Verifies an UpcomingOpeningMetadata message.
  1151. * @function verify
  1152. * @memberof UpcomingOpeningMetadata
  1153. * @static
  1154. * @param {Object.<string,*>} message Plain object to verify
  1155. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  1156. */
  1157. UpcomingOpeningMetadata.verify = function verify(message) {
  1158. if (typeof message !== "object" || message === null)
  1159. return "object expected";
  1160. if (message.expectedStart != null && message.hasOwnProperty("expectedStart"))
  1161. if (!$util.isInteger(message.expectedStart))
  1162. return "expectedStart: integer expected";
  1163. if (message.rewardPerBlock != null && message.hasOwnProperty("rewardPerBlock"))
  1164. if (!$util.isInteger(message.rewardPerBlock) && !(message.rewardPerBlock && $util.isInteger(message.rewardPerBlock.low) && $util.isInteger(message.rewardPerBlock.high)))
  1165. return "rewardPerBlock: integer|Long expected";
  1166. if (message.minApplicationStake != null && message.hasOwnProperty("minApplicationStake"))
  1167. if (!$util.isInteger(message.minApplicationStake) && !(message.minApplicationStake && $util.isInteger(message.minApplicationStake.low) && $util.isInteger(message.minApplicationStake.high)))
  1168. return "minApplicationStake: integer|Long expected";
  1169. if (message.metadata != null && message.hasOwnProperty("metadata")) {
  1170. var error = $root.OpeningMetadata.verify(message.metadata);
  1171. if (error)
  1172. return "metadata." + error;
  1173. }
  1174. return null;
  1175. };
  1176. /**
  1177. * Creates an UpcomingOpeningMetadata message from a plain object. Also converts values to their respective internal types.
  1178. * @function fromObject
  1179. * @memberof UpcomingOpeningMetadata
  1180. * @static
  1181. * @param {Object.<string,*>} object Plain object
  1182. * @returns {UpcomingOpeningMetadata} UpcomingOpeningMetadata
  1183. */
  1184. UpcomingOpeningMetadata.fromObject = function fromObject(object) {
  1185. if (object instanceof $root.UpcomingOpeningMetadata)
  1186. return object;
  1187. var message = new $root.UpcomingOpeningMetadata();
  1188. if (object.expectedStart != null)
  1189. message.expectedStart = object.expectedStart >>> 0;
  1190. if (object.rewardPerBlock != null)
  1191. if ($util.Long)
  1192. (message.rewardPerBlock = $util.Long.fromValue(object.rewardPerBlock)).unsigned = true;
  1193. else if (typeof object.rewardPerBlock === "string")
  1194. message.rewardPerBlock = parseInt(object.rewardPerBlock, 10);
  1195. else if (typeof object.rewardPerBlock === "number")
  1196. message.rewardPerBlock = object.rewardPerBlock;
  1197. else if (typeof object.rewardPerBlock === "object")
  1198. message.rewardPerBlock = new $util.LongBits(object.rewardPerBlock.low >>> 0, object.rewardPerBlock.high >>> 0).toNumber(true);
  1199. if (object.minApplicationStake != null)
  1200. if ($util.Long)
  1201. (message.minApplicationStake = $util.Long.fromValue(object.minApplicationStake)).unsigned = true;
  1202. else if (typeof object.minApplicationStake === "string")
  1203. message.minApplicationStake = parseInt(object.minApplicationStake, 10);
  1204. else if (typeof object.minApplicationStake === "number")
  1205. message.minApplicationStake = object.minApplicationStake;
  1206. else if (typeof object.minApplicationStake === "object")
  1207. message.minApplicationStake = new $util.LongBits(object.minApplicationStake.low >>> 0, object.minApplicationStake.high >>> 0).toNumber(true);
  1208. if (object.metadata != null) {
  1209. if (typeof object.metadata !== "object")
  1210. throw TypeError(".UpcomingOpeningMetadata.metadata: object expected");
  1211. message.metadata = $root.OpeningMetadata.fromObject(object.metadata);
  1212. }
  1213. return message;
  1214. };
  1215. /**
  1216. * Creates a plain object from an UpcomingOpeningMetadata message. Also converts values to other types if specified.
  1217. * @function toObject
  1218. * @memberof UpcomingOpeningMetadata
  1219. * @static
  1220. * @param {UpcomingOpeningMetadata} message UpcomingOpeningMetadata
  1221. * @param {$protobuf.IConversionOptions} [options] Conversion options
  1222. * @returns {Object.<string,*>} Plain object
  1223. */
  1224. UpcomingOpeningMetadata.toObject = function toObject(message, options) {
  1225. if (!options)
  1226. options = {};
  1227. var object = {};
  1228. if (options.defaults) {
  1229. object.expectedStart = 0;
  1230. if ($util.Long) {
  1231. var long = new $util.Long(0, 0, true);
  1232. object.rewardPerBlock = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
  1233. } else
  1234. object.rewardPerBlock = options.longs === String ? "0" : 0;
  1235. if ($util.Long) {
  1236. var long = new $util.Long(0, 0, true);
  1237. object.minApplicationStake = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
  1238. } else
  1239. object.minApplicationStake = options.longs === String ? "0" : 0;
  1240. object.metadata = null;
  1241. }
  1242. if (message.expectedStart != null && message.hasOwnProperty("expectedStart"))
  1243. object.expectedStart = message.expectedStart;
  1244. if (message.rewardPerBlock != null && message.hasOwnProperty("rewardPerBlock"))
  1245. if (typeof message.rewardPerBlock === "number")
  1246. object.rewardPerBlock = options.longs === String ? String(message.rewardPerBlock) : message.rewardPerBlock;
  1247. else
  1248. 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;
  1249. if (message.minApplicationStake != null && message.hasOwnProperty("minApplicationStake"))
  1250. if (typeof message.minApplicationStake === "number")
  1251. object.minApplicationStake = options.longs === String ? String(message.minApplicationStake) : message.minApplicationStake;
  1252. else
  1253. 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;
  1254. if (message.metadata != null && message.hasOwnProperty("metadata"))
  1255. object.metadata = $root.OpeningMetadata.toObject(message.metadata, options);
  1256. return object;
  1257. };
  1258. /**
  1259. * Converts this UpcomingOpeningMetadata to JSON.
  1260. * @function toJSON
  1261. * @memberof UpcomingOpeningMetadata
  1262. * @instance
  1263. * @returns {Object.<string,*>} JSON object
  1264. */
  1265. UpcomingOpeningMetadata.prototype.toJSON = function toJSON() {
  1266. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  1267. };
  1268. return UpcomingOpeningMetadata;
  1269. })();
  1270. $root.ApplicationMetadata = (function() {
  1271. /**
  1272. * Properties of an ApplicationMetadata.
  1273. * @exports IApplicationMetadata
  1274. * @interface IApplicationMetadata
  1275. * @property {Array.<string>|null} [answers] ApplicationMetadata answers
  1276. */
  1277. /**
  1278. * Constructs a new ApplicationMetadata.
  1279. * @exports ApplicationMetadata
  1280. * @classdesc Represents an ApplicationMetadata.
  1281. * @implements IApplicationMetadata
  1282. * @constructor
  1283. * @param {IApplicationMetadata=} [properties] Properties to set
  1284. */
  1285. function ApplicationMetadata(properties) {
  1286. this.answers = [];
  1287. if (properties)
  1288. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  1289. if (properties[keys[i]] != null)
  1290. this[keys[i]] = properties[keys[i]];
  1291. }
  1292. /**
  1293. * ApplicationMetadata answers.
  1294. * @member {Array.<string>} answers
  1295. * @memberof ApplicationMetadata
  1296. * @instance
  1297. */
  1298. ApplicationMetadata.prototype.answers = $util.emptyArray;
  1299. /**
  1300. * Creates a new ApplicationMetadata instance using the specified properties.
  1301. * @function create
  1302. * @memberof ApplicationMetadata
  1303. * @static
  1304. * @param {IApplicationMetadata=} [properties] Properties to set
  1305. * @returns {ApplicationMetadata} ApplicationMetadata instance
  1306. */
  1307. ApplicationMetadata.create = function create(properties) {
  1308. return new ApplicationMetadata(properties);
  1309. };
  1310. /**
  1311. * Encodes the specified ApplicationMetadata message. Does not implicitly {@link ApplicationMetadata.verify|verify} messages.
  1312. * @function encode
  1313. * @memberof ApplicationMetadata
  1314. * @static
  1315. * @param {IApplicationMetadata} message ApplicationMetadata message or plain object to encode
  1316. * @param {$protobuf.Writer} [writer] Writer to encode to
  1317. * @returns {$protobuf.Writer} Writer
  1318. */
  1319. ApplicationMetadata.encode = function encode(message, writer) {
  1320. if (!writer)
  1321. writer = $Writer.create();
  1322. if (message.answers != null && message.answers.length)
  1323. for (var i = 0; i < message.answers.length; ++i)
  1324. writer.uint32(/* id 1, wireType 2 =*/10).string(message.answers[i]);
  1325. return writer;
  1326. };
  1327. /**
  1328. * Encodes the specified ApplicationMetadata message, length delimited. Does not implicitly {@link ApplicationMetadata.verify|verify} messages.
  1329. * @function encodeDelimited
  1330. * @memberof ApplicationMetadata
  1331. * @static
  1332. * @param {IApplicationMetadata} message ApplicationMetadata message or plain object to encode
  1333. * @param {$protobuf.Writer} [writer] Writer to encode to
  1334. * @returns {$protobuf.Writer} Writer
  1335. */
  1336. ApplicationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
  1337. return this.encode(message, writer).ldelim();
  1338. };
  1339. /**
  1340. * Decodes an ApplicationMetadata message from the specified reader or buffer.
  1341. * @function decode
  1342. * @memberof ApplicationMetadata
  1343. * @static
  1344. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1345. * @param {number} [length] Message length if known beforehand
  1346. * @returns {ApplicationMetadata} ApplicationMetadata
  1347. * @throws {Error} If the payload is not a reader or valid buffer
  1348. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1349. */
  1350. ApplicationMetadata.decode = function decode(reader, length) {
  1351. if (!(reader instanceof $Reader))
  1352. reader = $Reader.create(reader);
  1353. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ApplicationMetadata();
  1354. while (reader.pos < end) {
  1355. var tag = reader.uint32();
  1356. switch (tag >>> 3) {
  1357. case 1:
  1358. if (!(message.answers && message.answers.length))
  1359. message.answers = [];
  1360. message.answers.push(reader.string());
  1361. break;
  1362. default:
  1363. reader.skipType(tag & 7);
  1364. break;
  1365. }
  1366. }
  1367. return message;
  1368. };
  1369. /**
  1370. * Decodes an ApplicationMetadata message from the specified reader or buffer, length delimited.
  1371. * @function decodeDelimited
  1372. * @memberof ApplicationMetadata
  1373. * @static
  1374. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1375. * @returns {ApplicationMetadata} ApplicationMetadata
  1376. * @throws {Error} If the payload is not a reader or valid buffer
  1377. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1378. */
  1379. ApplicationMetadata.decodeDelimited = function decodeDelimited(reader) {
  1380. if (!(reader instanceof $Reader))
  1381. reader = new $Reader(reader);
  1382. return this.decode(reader, reader.uint32());
  1383. };
  1384. /**
  1385. * Verifies an ApplicationMetadata message.
  1386. * @function verify
  1387. * @memberof ApplicationMetadata
  1388. * @static
  1389. * @param {Object.<string,*>} message Plain object to verify
  1390. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  1391. */
  1392. ApplicationMetadata.verify = function verify(message) {
  1393. if (typeof message !== "object" || message === null)
  1394. return "object expected";
  1395. if (message.answers != null && message.hasOwnProperty("answers")) {
  1396. if (!Array.isArray(message.answers))
  1397. return "answers: array expected";
  1398. for (var i = 0; i < message.answers.length; ++i)
  1399. if (!$util.isString(message.answers[i]))
  1400. return "answers: string[] expected";
  1401. }
  1402. return null;
  1403. };
  1404. /**
  1405. * Creates an ApplicationMetadata message from a plain object. Also converts values to their respective internal types.
  1406. * @function fromObject
  1407. * @memberof ApplicationMetadata
  1408. * @static
  1409. * @param {Object.<string,*>} object Plain object
  1410. * @returns {ApplicationMetadata} ApplicationMetadata
  1411. */
  1412. ApplicationMetadata.fromObject = function fromObject(object) {
  1413. if (object instanceof $root.ApplicationMetadata)
  1414. return object;
  1415. var message = new $root.ApplicationMetadata();
  1416. if (object.answers) {
  1417. if (!Array.isArray(object.answers))
  1418. throw TypeError(".ApplicationMetadata.answers: array expected");
  1419. message.answers = [];
  1420. for (var i = 0; i < object.answers.length; ++i)
  1421. message.answers[i] = String(object.answers[i]);
  1422. }
  1423. return message;
  1424. };
  1425. /**
  1426. * Creates a plain object from an ApplicationMetadata message. Also converts values to other types if specified.
  1427. * @function toObject
  1428. * @memberof ApplicationMetadata
  1429. * @static
  1430. * @param {ApplicationMetadata} message ApplicationMetadata
  1431. * @param {$protobuf.IConversionOptions} [options] Conversion options
  1432. * @returns {Object.<string,*>} Plain object
  1433. */
  1434. ApplicationMetadata.toObject = function toObject(message, options) {
  1435. if (!options)
  1436. options = {};
  1437. var object = {};
  1438. if (options.arrays || options.defaults)
  1439. object.answers = [];
  1440. if (message.answers && message.answers.length) {
  1441. object.answers = [];
  1442. for (var j = 0; j < message.answers.length; ++j)
  1443. object.answers[j] = message.answers[j];
  1444. }
  1445. return object;
  1446. };
  1447. /**
  1448. * Converts this ApplicationMetadata to JSON.
  1449. * @function toJSON
  1450. * @memberof ApplicationMetadata
  1451. * @instance
  1452. * @returns {Object.<string,*>} JSON object
  1453. */
  1454. ApplicationMetadata.prototype.toJSON = function toJSON() {
  1455. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  1456. };
  1457. return ApplicationMetadata;
  1458. })();
  1459. $root.WorkingGroupMetadata = (function() {
  1460. /**
  1461. * Properties of a WorkingGroupMetadata.
  1462. * @exports IWorkingGroupMetadata
  1463. * @interface IWorkingGroupMetadata
  1464. * @property {string|null} [description] WorkingGroupMetadata description
  1465. * @property {string|null} [about] WorkingGroupMetadata about
  1466. * @property {string|null} [status] WorkingGroupMetadata status
  1467. * @property {string|null} [statusMessage] WorkingGroupMetadata statusMessage
  1468. */
  1469. /**
  1470. * Constructs a new WorkingGroupMetadata.
  1471. * @exports WorkingGroupMetadata
  1472. * @classdesc Represents a WorkingGroupMetadata.
  1473. * @implements IWorkingGroupMetadata
  1474. * @constructor
  1475. * @param {IWorkingGroupMetadata=} [properties] Properties to set
  1476. */
  1477. function WorkingGroupMetadata(properties) {
  1478. if (properties)
  1479. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  1480. if (properties[keys[i]] != null)
  1481. this[keys[i]] = properties[keys[i]];
  1482. }
  1483. /**
  1484. * WorkingGroupMetadata description.
  1485. * @member {string} description
  1486. * @memberof WorkingGroupMetadata
  1487. * @instance
  1488. */
  1489. WorkingGroupMetadata.prototype.description = "";
  1490. /**
  1491. * WorkingGroupMetadata about.
  1492. * @member {string} about
  1493. * @memberof WorkingGroupMetadata
  1494. * @instance
  1495. */
  1496. WorkingGroupMetadata.prototype.about = "";
  1497. /**
  1498. * WorkingGroupMetadata status.
  1499. * @member {string} status
  1500. * @memberof WorkingGroupMetadata
  1501. * @instance
  1502. */
  1503. WorkingGroupMetadata.prototype.status = "";
  1504. /**
  1505. * WorkingGroupMetadata statusMessage.
  1506. * @member {string} statusMessage
  1507. * @memberof WorkingGroupMetadata
  1508. * @instance
  1509. */
  1510. WorkingGroupMetadata.prototype.statusMessage = "";
  1511. /**
  1512. * Creates a new WorkingGroupMetadata instance using the specified properties.
  1513. * @function create
  1514. * @memberof WorkingGroupMetadata
  1515. * @static
  1516. * @param {IWorkingGroupMetadata=} [properties] Properties to set
  1517. * @returns {WorkingGroupMetadata} WorkingGroupMetadata instance
  1518. */
  1519. WorkingGroupMetadata.create = function create(properties) {
  1520. return new WorkingGroupMetadata(properties);
  1521. };
  1522. /**
  1523. * Encodes the specified WorkingGroupMetadata message. Does not implicitly {@link WorkingGroupMetadata.verify|verify} messages.
  1524. * @function encode
  1525. * @memberof WorkingGroupMetadata
  1526. * @static
  1527. * @param {IWorkingGroupMetadata} message WorkingGroupMetadata message or plain object to encode
  1528. * @param {$protobuf.Writer} [writer] Writer to encode to
  1529. * @returns {$protobuf.Writer} Writer
  1530. */
  1531. WorkingGroupMetadata.encode = function encode(message, writer) {
  1532. if (!writer)
  1533. writer = $Writer.create();
  1534. if (message.description != null && Object.hasOwnProperty.call(message, "description"))
  1535. writer.uint32(/* id 1, wireType 2 =*/10).string(message.description);
  1536. if (message.about != null && Object.hasOwnProperty.call(message, "about"))
  1537. writer.uint32(/* id 2, wireType 2 =*/18).string(message.about);
  1538. if (message.status != null && Object.hasOwnProperty.call(message, "status"))
  1539. writer.uint32(/* id 3, wireType 2 =*/26).string(message.status);
  1540. if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage"))
  1541. writer.uint32(/* id 4, wireType 2 =*/34).string(message.statusMessage);
  1542. return writer;
  1543. };
  1544. /**
  1545. * Encodes the specified WorkingGroupMetadata message, length delimited. Does not implicitly {@link WorkingGroupMetadata.verify|verify} messages.
  1546. * @function encodeDelimited
  1547. * @memberof WorkingGroupMetadata
  1548. * @static
  1549. * @param {IWorkingGroupMetadata} message WorkingGroupMetadata message or plain object to encode
  1550. * @param {$protobuf.Writer} [writer] Writer to encode to
  1551. * @returns {$protobuf.Writer} Writer
  1552. */
  1553. WorkingGroupMetadata.encodeDelimited = function encodeDelimited(message, writer) {
  1554. return this.encode(message, writer).ldelim();
  1555. };
  1556. /**
  1557. * Decodes a WorkingGroupMetadata message from the specified reader or buffer.
  1558. * @function decode
  1559. * @memberof WorkingGroupMetadata
  1560. * @static
  1561. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1562. * @param {number} [length] Message length if known beforehand
  1563. * @returns {WorkingGroupMetadata} WorkingGroupMetadata
  1564. * @throws {Error} If the payload is not a reader or valid buffer
  1565. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1566. */
  1567. WorkingGroupMetadata.decode = function decode(reader, length) {
  1568. if (!(reader instanceof $Reader))
  1569. reader = $Reader.create(reader);
  1570. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.WorkingGroupMetadata();
  1571. while (reader.pos < end) {
  1572. var tag = reader.uint32();
  1573. switch (tag >>> 3) {
  1574. case 1:
  1575. message.description = reader.string();
  1576. break;
  1577. case 2:
  1578. message.about = reader.string();
  1579. break;
  1580. case 3:
  1581. message.status = reader.string();
  1582. break;
  1583. case 4:
  1584. message.statusMessage = reader.string();
  1585. break;
  1586. default:
  1587. reader.skipType(tag & 7);
  1588. break;
  1589. }
  1590. }
  1591. return message;
  1592. };
  1593. /**
  1594. * Decodes a WorkingGroupMetadata message from the specified reader or buffer, length delimited.
  1595. * @function decodeDelimited
  1596. * @memberof WorkingGroupMetadata
  1597. * @static
  1598. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1599. * @returns {WorkingGroupMetadata} WorkingGroupMetadata
  1600. * @throws {Error} If the payload is not a reader or valid buffer
  1601. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1602. */
  1603. WorkingGroupMetadata.decodeDelimited = function decodeDelimited(reader) {
  1604. if (!(reader instanceof $Reader))
  1605. reader = new $Reader(reader);
  1606. return this.decode(reader, reader.uint32());
  1607. };
  1608. /**
  1609. * Verifies a WorkingGroupMetadata message.
  1610. * @function verify
  1611. * @memberof WorkingGroupMetadata
  1612. * @static
  1613. * @param {Object.<string,*>} message Plain object to verify
  1614. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  1615. */
  1616. WorkingGroupMetadata.verify = function verify(message) {
  1617. if (typeof message !== "object" || message === null)
  1618. return "object expected";
  1619. if (message.description != null && message.hasOwnProperty("description"))
  1620. if (!$util.isString(message.description))
  1621. return "description: string expected";
  1622. if (message.about != null && message.hasOwnProperty("about"))
  1623. if (!$util.isString(message.about))
  1624. return "about: string expected";
  1625. if (message.status != null && message.hasOwnProperty("status"))
  1626. if (!$util.isString(message.status))
  1627. return "status: string expected";
  1628. if (message.statusMessage != null && message.hasOwnProperty("statusMessage"))
  1629. if (!$util.isString(message.statusMessage))
  1630. return "statusMessage: string expected";
  1631. return null;
  1632. };
  1633. /**
  1634. * Creates a WorkingGroupMetadata message from a plain object. Also converts values to their respective internal types.
  1635. * @function fromObject
  1636. * @memberof WorkingGroupMetadata
  1637. * @static
  1638. * @param {Object.<string,*>} object Plain object
  1639. * @returns {WorkingGroupMetadata} WorkingGroupMetadata
  1640. */
  1641. WorkingGroupMetadata.fromObject = function fromObject(object) {
  1642. if (object instanceof $root.WorkingGroupMetadata)
  1643. return object;
  1644. var message = new $root.WorkingGroupMetadata();
  1645. if (object.description != null)
  1646. message.description = String(object.description);
  1647. if (object.about != null)
  1648. message.about = String(object.about);
  1649. if (object.status != null)
  1650. message.status = String(object.status);
  1651. if (object.statusMessage != null)
  1652. message.statusMessage = String(object.statusMessage);
  1653. return message;
  1654. };
  1655. /**
  1656. * Creates a plain object from a WorkingGroupMetadata message. Also converts values to other types if specified.
  1657. * @function toObject
  1658. * @memberof WorkingGroupMetadata
  1659. * @static
  1660. * @param {WorkingGroupMetadata} message WorkingGroupMetadata
  1661. * @param {$protobuf.IConversionOptions} [options] Conversion options
  1662. * @returns {Object.<string,*>} Plain object
  1663. */
  1664. WorkingGroupMetadata.toObject = function toObject(message, options) {
  1665. if (!options)
  1666. options = {};
  1667. var object = {};
  1668. if (options.defaults) {
  1669. object.description = "";
  1670. object.about = "";
  1671. object.status = "";
  1672. object.statusMessage = "";
  1673. }
  1674. if (message.description != null && message.hasOwnProperty("description"))
  1675. object.description = message.description;
  1676. if (message.about != null && message.hasOwnProperty("about"))
  1677. object.about = message.about;
  1678. if (message.status != null && message.hasOwnProperty("status"))
  1679. object.status = message.status;
  1680. if (message.statusMessage != null && message.hasOwnProperty("statusMessage"))
  1681. object.statusMessage = message.statusMessage;
  1682. return object;
  1683. };
  1684. /**
  1685. * Converts this WorkingGroupMetadata to JSON.
  1686. * @function toJSON
  1687. * @memberof WorkingGroupMetadata
  1688. * @instance
  1689. * @returns {Object.<string,*>} JSON object
  1690. */
  1691. WorkingGroupMetadata.prototype.toJSON = function toJSON() {
  1692. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  1693. };
  1694. return WorkingGroupMetadata;
  1695. })();
  1696. $root.SetGroupMetadata = (function() {
  1697. /**
  1698. * Properties of a SetGroupMetadata.
  1699. * @exports ISetGroupMetadata
  1700. * @interface ISetGroupMetadata
  1701. * @property {IWorkingGroupMetadata|null} [newMetadata] SetGroupMetadata newMetadata
  1702. */
  1703. /**
  1704. * Constructs a new SetGroupMetadata.
  1705. * @exports SetGroupMetadata
  1706. * @classdesc Represents a SetGroupMetadata.
  1707. * @implements ISetGroupMetadata
  1708. * @constructor
  1709. * @param {ISetGroupMetadata=} [properties] Properties to set
  1710. */
  1711. function SetGroupMetadata(properties) {
  1712. if (properties)
  1713. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  1714. if (properties[keys[i]] != null)
  1715. this[keys[i]] = properties[keys[i]];
  1716. }
  1717. /**
  1718. * SetGroupMetadata newMetadata.
  1719. * @member {IWorkingGroupMetadata|null|undefined} newMetadata
  1720. * @memberof SetGroupMetadata
  1721. * @instance
  1722. */
  1723. SetGroupMetadata.prototype.newMetadata = null;
  1724. /**
  1725. * Creates a new SetGroupMetadata instance using the specified properties.
  1726. * @function create
  1727. * @memberof SetGroupMetadata
  1728. * @static
  1729. * @param {ISetGroupMetadata=} [properties] Properties to set
  1730. * @returns {SetGroupMetadata} SetGroupMetadata instance
  1731. */
  1732. SetGroupMetadata.create = function create(properties) {
  1733. return new SetGroupMetadata(properties);
  1734. };
  1735. /**
  1736. * Encodes the specified SetGroupMetadata message. Does not implicitly {@link SetGroupMetadata.verify|verify} messages.
  1737. * @function encode
  1738. * @memberof SetGroupMetadata
  1739. * @static
  1740. * @param {ISetGroupMetadata} message SetGroupMetadata message or plain object to encode
  1741. * @param {$protobuf.Writer} [writer] Writer to encode to
  1742. * @returns {$protobuf.Writer} Writer
  1743. */
  1744. SetGroupMetadata.encode = function encode(message, writer) {
  1745. if (!writer)
  1746. writer = $Writer.create();
  1747. if (message.newMetadata != null && Object.hasOwnProperty.call(message, "newMetadata"))
  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. return message;
  1790. };
  1791. /**
  1792. * Decodes a SetGroupMetadata message from the specified reader or buffer, length delimited.
  1793. * @function decodeDelimited
  1794. * @memberof SetGroupMetadata
  1795. * @static
  1796. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1797. * @returns {SetGroupMetadata} SetGroupMetadata
  1798. * @throws {Error} If the payload is not a reader or valid buffer
  1799. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1800. */
  1801. SetGroupMetadata.decodeDelimited = function decodeDelimited(reader) {
  1802. if (!(reader instanceof $Reader))
  1803. reader = new $Reader(reader);
  1804. return this.decode(reader, reader.uint32());
  1805. };
  1806. /**
  1807. * Verifies a SetGroupMetadata message.
  1808. * @function verify
  1809. * @memberof SetGroupMetadata
  1810. * @static
  1811. * @param {Object.<string,*>} message Plain object to verify
  1812. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  1813. */
  1814. SetGroupMetadata.verify = function verify(message) {
  1815. if (typeof message !== "object" || message === null)
  1816. return "object expected";
  1817. if (message.newMetadata != null && message.hasOwnProperty("newMetadata")) {
  1818. var error = $root.WorkingGroupMetadata.verify(message.newMetadata);
  1819. if (error)
  1820. return "newMetadata." + error;
  1821. }
  1822. return null;
  1823. };
  1824. /**
  1825. * Creates a SetGroupMetadata message from a plain object. Also converts values to their respective internal types.
  1826. * @function fromObject
  1827. * @memberof SetGroupMetadata
  1828. * @static
  1829. * @param {Object.<string,*>} object Plain object
  1830. * @returns {SetGroupMetadata} SetGroupMetadata
  1831. */
  1832. SetGroupMetadata.fromObject = function fromObject(object) {
  1833. if (object instanceof $root.SetGroupMetadata)
  1834. return object;
  1835. var message = new $root.SetGroupMetadata();
  1836. if (object.newMetadata != null) {
  1837. if (typeof object.newMetadata !== "object")
  1838. throw TypeError(".SetGroupMetadata.newMetadata: object expected");
  1839. message.newMetadata = $root.WorkingGroupMetadata.fromObject(object.newMetadata);
  1840. }
  1841. return message;
  1842. };
  1843. /**
  1844. * Creates a plain object from a SetGroupMetadata message. Also converts values to other types if specified.
  1845. * @function toObject
  1846. * @memberof SetGroupMetadata
  1847. * @static
  1848. * @param {SetGroupMetadata} message SetGroupMetadata
  1849. * @param {$protobuf.IConversionOptions} [options] Conversion options
  1850. * @returns {Object.<string,*>} Plain object
  1851. */
  1852. SetGroupMetadata.toObject = function toObject(message, options) {
  1853. if (!options)
  1854. options = {};
  1855. var object = {};
  1856. if (options.defaults)
  1857. object.newMetadata = null;
  1858. if (message.newMetadata != null && message.hasOwnProperty("newMetadata"))
  1859. object.newMetadata = $root.WorkingGroupMetadata.toObject(message.newMetadata, options);
  1860. return object;
  1861. };
  1862. /**
  1863. * Converts this SetGroupMetadata to JSON.
  1864. * @function toJSON
  1865. * @memberof SetGroupMetadata
  1866. * @instance
  1867. * @returns {Object.<string,*>} JSON object
  1868. */
  1869. SetGroupMetadata.prototype.toJSON = function toJSON() {
  1870. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  1871. };
  1872. return SetGroupMetadata;
  1873. })();
  1874. $root.AddUpcomingOpening = (function() {
  1875. /**
  1876. * Properties of an AddUpcomingOpening.
  1877. * @exports IAddUpcomingOpening
  1878. * @interface IAddUpcomingOpening
  1879. * @property {IUpcomingOpeningMetadata|null} [metadata] AddUpcomingOpening metadata
  1880. */
  1881. /**
  1882. * Constructs a new AddUpcomingOpening.
  1883. * @exports AddUpcomingOpening
  1884. * @classdesc Represents an AddUpcomingOpening.
  1885. * @implements IAddUpcomingOpening
  1886. * @constructor
  1887. * @param {IAddUpcomingOpening=} [properties] Properties to set
  1888. */
  1889. function AddUpcomingOpening(properties) {
  1890. if (properties)
  1891. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  1892. if (properties[keys[i]] != null)
  1893. this[keys[i]] = properties[keys[i]];
  1894. }
  1895. /**
  1896. * AddUpcomingOpening metadata.
  1897. * @member {IUpcomingOpeningMetadata|null|undefined} metadata
  1898. * @memberof AddUpcomingOpening
  1899. * @instance
  1900. */
  1901. AddUpcomingOpening.prototype.metadata = null;
  1902. /**
  1903. * Creates a new AddUpcomingOpening instance using the specified properties.
  1904. * @function create
  1905. * @memberof AddUpcomingOpening
  1906. * @static
  1907. * @param {IAddUpcomingOpening=} [properties] Properties to set
  1908. * @returns {AddUpcomingOpening} AddUpcomingOpening instance
  1909. */
  1910. AddUpcomingOpening.create = function create(properties) {
  1911. return new AddUpcomingOpening(properties);
  1912. };
  1913. /**
  1914. * Encodes the specified AddUpcomingOpening message. Does not implicitly {@link AddUpcomingOpening.verify|verify} messages.
  1915. * @function encode
  1916. * @memberof AddUpcomingOpening
  1917. * @static
  1918. * @param {IAddUpcomingOpening} message AddUpcomingOpening message or plain object to encode
  1919. * @param {$protobuf.Writer} [writer] Writer to encode to
  1920. * @returns {$protobuf.Writer} Writer
  1921. */
  1922. AddUpcomingOpening.encode = function encode(message, writer) {
  1923. if (!writer)
  1924. writer = $Writer.create();
  1925. if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
  1926. $root.UpcomingOpeningMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
  1927. return writer;
  1928. };
  1929. /**
  1930. * Encodes the specified AddUpcomingOpening message, length delimited. Does not implicitly {@link AddUpcomingOpening.verify|verify} messages.
  1931. * @function encodeDelimited
  1932. * @memberof AddUpcomingOpening
  1933. * @static
  1934. * @param {IAddUpcomingOpening} message AddUpcomingOpening message or plain object to encode
  1935. * @param {$protobuf.Writer} [writer] Writer to encode to
  1936. * @returns {$protobuf.Writer} Writer
  1937. */
  1938. AddUpcomingOpening.encodeDelimited = function encodeDelimited(message, writer) {
  1939. return this.encode(message, writer).ldelim();
  1940. };
  1941. /**
  1942. * Decodes an AddUpcomingOpening message from the specified reader or buffer.
  1943. * @function decode
  1944. * @memberof AddUpcomingOpening
  1945. * @static
  1946. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1947. * @param {number} [length] Message length if known beforehand
  1948. * @returns {AddUpcomingOpening} AddUpcomingOpening
  1949. * @throws {Error} If the payload is not a reader or valid buffer
  1950. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1951. */
  1952. AddUpcomingOpening.decode = function decode(reader, length) {
  1953. if (!(reader instanceof $Reader))
  1954. reader = $Reader.create(reader);
  1955. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AddUpcomingOpening();
  1956. while (reader.pos < end) {
  1957. var tag = reader.uint32();
  1958. switch (tag >>> 3) {
  1959. case 1:
  1960. message.metadata = $root.UpcomingOpeningMetadata.decode(reader, reader.uint32());
  1961. break;
  1962. default:
  1963. reader.skipType(tag & 7);
  1964. break;
  1965. }
  1966. }
  1967. return message;
  1968. };
  1969. /**
  1970. * Decodes an AddUpcomingOpening message from the specified reader or buffer, length delimited.
  1971. * @function decodeDelimited
  1972. * @memberof AddUpcomingOpening
  1973. * @static
  1974. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  1975. * @returns {AddUpcomingOpening} AddUpcomingOpening
  1976. * @throws {Error} If the payload is not a reader or valid buffer
  1977. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  1978. */
  1979. AddUpcomingOpening.decodeDelimited = function decodeDelimited(reader) {
  1980. if (!(reader instanceof $Reader))
  1981. reader = new $Reader(reader);
  1982. return this.decode(reader, reader.uint32());
  1983. };
  1984. /**
  1985. * Verifies an AddUpcomingOpening message.
  1986. * @function verify
  1987. * @memberof AddUpcomingOpening
  1988. * @static
  1989. * @param {Object.<string,*>} message Plain object to verify
  1990. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  1991. */
  1992. AddUpcomingOpening.verify = function verify(message) {
  1993. if (typeof message !== "object" || message === null)
  1994. return "object expected";
  1995. if (message.metadata != null && message.hasOwnProperty("metadata")) {
  1996. var error = $root.UpcomingOpeningMetadata.verify(message.metadata);
  1997. if (error)
  1998. return "metadata." + error;
  1999. }
  2000. return null;
  2001. };
  2002. /**
  2003. * Creates an AddUpcomingOpening message from a plain object. Also converts values to their respective internal types.
  2004. * @function fromObject
  2005. * @memberof AddUpcomingOpening
  2006. * @static
  2007. * @param {Object.<string,*>} object Plain object
  2008. * @returns {AddUpcomingOpening} AddUpcomingOpening
  2009. */
  2010. AddUpcomingOpening.fromObject = function fromObject(object) {
  2011. if (object instanceof $root.AddUpcomingOpening)
  2012. return object;
  2013. var message = new $root.AddUpcomingOpening();
  2014. if (object.metadata != null) {
  2015. if (typeof object.metadata !== "object")
  2016. throw TypeError(".AddUpcomingOpening.metadata: object expected");
  2017. message.metadata = $root.UpcomingOpeningMetadata.fromObject(object.metadata);
  2018. }
  2019. return message;
  2020. };
  2021. /**
  2022. * Creates a plain object from an AddUpcomingOpening message. Also converts values to other types if specified.
  2023. * @function toObject
  2024. * @memberof AddUpcomingOpening
  2025. * @static
  2026. * @param {AddUpcomingOpening} message AddUpcomingOpening
  2027. * @param {$protobuf.IConversionOptions} [options] Conversion options
  2028. * @returns {Object.<string,*>} Plain object
  2029. */
  2030. AddUpcomingOpening.toObject = function toObject(message, options) {
  2031. if (!options)
  2032. options = {};
  2033. var object = {};
  2034. if (options.defaults)
  2035. object.metadata = null;
  2036. if (message.metadata != null && message.hasOwnProperty("metadata"))
  2037. object.metadata = $root.UpcomingOpeningMetadata.toObject(message.metadata, options);
  2038. return object;
  2039. };
  2040. /**
  2041. * Converts this AddUpcomingOpening to JSON.
  2042. * @function toJSON
  2043. * @memberof AddUpcomingOpening
  2044. * @instance
  2045. * @returns {Object.<string,*>} JSON object
  2046. */
  2047. AddUpcomingOpening.prototype.toJSON = function toJSON() {
  2048. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  2049. };
  2050. return AddUpcomingOpening;
  2051. })();
  2052. $root.RemoveUpcomingOpening = (function() {
  2053. /**
  2054. * Properties of a RemoveUpcomingOpening.
  2055. * @exports IRemoveUpcomingOpening
  2056. * @interface IRemoveUpcomingOpening
  2057. * @property {string|null} [id] RemoveUpcomingOpening id
  2058. */
  2059. /**
  2060. * Constructs a new RemoveUpcomingOpening.
  2061. * @exports RemoveUpcomingOpening
  2062. * @classdesc Represents a RemoveUpcomingOpening.
  2063. * @implements IRemoveUpcomingOpening
  2064. * @constructor
  2065. * @param {IRemoveUpcomingOpening=} [properties] Properties to set
  2066. */
  2067. function RemoveUpcomingOpening(properties) {
  2068. if (properties)
  2069. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  2070. if (properties[keys[i]] != null)
  2071. this[keys[i]] = properties[keys[i]];
  2072. }
  2073. /**
  2074. * RemoveUpcomingOpening id.
  2075. * @member {string} id
  2076. * @memberof RemoveUpcomingOpening
  2077. * @instance
  2078. */
  2079. RemoveUpcomingOpening.prototype.id = "";
  2080. /**
  2081. * Creates a new RemoveUpcomingOpening instance using the specified properties.
  2082. * @function create
  2083. * @memberof RemoveUpcomingOpening
  2084. * @static
  2085. * @param {IRemoveUpcomingOpening=} [properties] Properties to set
  2086. * @returns {RemoveUpcomingOpening} RemoveUpcomingOpening instance
  2087. */
  2088. RemoveUpcomingOpening.create = function create(properties) {
  2089. return new RemoveUpcomingOpening(properties);
  2090. };
  2091. /**
  2092. * Encodes the specified RemoveUpcomingOpening message. Does not implicitly {@link RemoveUpcomingOpening.verify|verify} messages.
  2093. * @function encode
  2094. * @memberof RemoveUpcomingOpening
  2095. * @static
  2096. * @param {IRemoveUpcomingOpening} message RemoveUpcomingOpening message or plain object to encode
  2097. * @param {$protobuf.Writer} [writer] Writer to encode to
  2098. * @returns {$protobuf.Writer} Writer
  2099. */
  2100. RemoveUpcomingOpening.encode = function encode(message, writer) {
  2101. if (!writer)
  2102. writer = $Writer.create();
  2103. if (message.id != null && Object.hasOwnProperty.call(message, "id"))
  2104. writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
  2105. return writer;
  2106. };
  2107. /**
  2108. * Encodes the specified RemoveUpcomingOpening message, length delimited. Does not implicitly {@link RemoveUpcomingOpening.verify|verify} messages.
  2109. * @function encodeDelimited
  2110. * @memberof RemoveUpcomingOpening
  2111. * @static
  2112. * @param {IRemoveUpcomingOpening} message RemoveUpcomingOpening message or plain object to encode
  2113. * @param {$protobuf.Writer} [writer] Writer to encode to
  2114. * @returns {$protobuf.Writer} Writer
  2115. */
  2116. RemoveUpcomingOpening.encodeDelimited = function encodeDelimited(message, writer) {
  2117. return this.encode(message, writer).ldelim();
  2118. };
  2119. /**
  2120. * Decodes a RemoveUpcomingOpening message from the specified reader or buffer.
  2121. * @function decode
  2122. * @memberof RemoveUpcomingOpening
  2123. * @static
  2124. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  2125. * @param {number} [length] Message length if known beforehand
  2126. * @returns {RemoveUpcomingOpening} RemoveUpcomingOpening
  2127. * @throws {Error} If the payload is not a reader or valid buffer
  2128. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  2129. */
  2130. RemoveUpcomingOpening.decode = function decode(reader, length) {
  2131. if (!(reader instanceof $Reader))
  2132. reader = $Reader.create(reader);
  2133. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.RemoveUpcomingOpening();
  2134. while (reader.pos < end) {
  2135. var tag = reader.uint32();
  2136. switch (tag >>> 3) {
  2137. case 1:
  2138. message.id = reader.string();
  2139. break;
  2140. default:
  2141. reader.skipType(tag & 7);
  2142. break;
  2143. }
  2144. }
  2145. return message;
  2146. };
  2147. /**
  2148. * Decodes a RemoveUpcomingOpening message from the specified reader or buffer, length delimited.
  2149. * @function decodeDelimited
  2150. * @memberof RemoveUpcomingOpening
  2151. * @static
  2152. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  2153. * @returns {RemoveUpcomingOpening} RemoveUpcomingOpening
  2154. * @throws {Error} If the payload is not a reader or valid buffer
  2155. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  2156. */
  2157. RemoveUpcomingOpening.decodeDelimited = function decodeDelimited(reader) {
  2158. if (!(reader instanceof $Reader))
  2159. reader = new $Reader(reader);
  2160. return this.decode(reader, reader.uint32());
  2161. };
  2162. /**
  2163. * Verifies a RemoveUpcomingOpening message.
  2164. * @function verify
  2165. * @memberof RemoveUpcomingOpening
  2166. * @static
  2167. * @param {Object.<string,*>} message Plain object to verify
  2168. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  2169. */
  2170. RemoveUpcomingOpening.verify = function verify(message) {
  2171. if (typeof message !== "object" || message === null)
  2172. return "object expected";
  2173. if (message.id != null && message.hasOwnProperty("id"))
  2174. if (!$util.isString(message.id))
  2175. return "id: string expected";
  2176. return null;
  2177. };
  2178. /**
  2179. * Creates a RemoveUpcomingOpening message from a plain object. Also converts values to their respective internal types.
  2180. * @function fromObject
  2181. * @memberof RemoveUpcomingOpening
  2182. * @static
  2183. * @param {Object.<string,*>} object Plain object
  2184. * @returns {RemoveUpcomingOpening} RemoveUpcomingOpening
  2185. */
  2186. RemoveUpcomingOpening.fromObject = function fromObject(object) {
  2187. if (object instanceof $root.RemoveUpcomingOpening)
  2188. return object;
  2189. var message = new $root.RemoveUpcomingOpening();
  2190. if (object.id != null)
  2191. message.id = String(object.id);
  2192. return message;
  2193. };
  2194. /**
  2195. * Creates a plain object from a RemoveUpcomingOpening message. Also converts values to other types if specified.
  2196. * @function toObject
  2197. * @memberof RemoveUpcomingOpening
  2198. * @static
  2199. * @param {RemoveUpcomingOpening} message RemoveUpcomingOpening
  2200. * @param {$protobuf.IConversionOptions} [options] Conversion options
  2201. * @returns {Object.<string,*>} Plain object
  2202. */
  2203. RemoveUpcomingOpening.toObject = function toObject(message, options) {
  2204. if (!options)
  2205. options = {};
  2206. var object = {};
  2207. if (options.defaults)
  2208. object.id = "";
  2209. if (message.id != null && message.hasOwnProperty("id"))
  2210. object.id = message.id;
  2211. return object;
  2212. };
  2213. /**
  2214. * Converts this RemoveUpcomingOpening to JSON.
  2215. * @function toJSON
  2216. * @memberof RemoveUpcomingOpening
  2217. * @instance
  2218. * @returns {Object.<string,*>} JSON object
  2219. */
  2220. RemoveUpcomingOpening.prototype.toJSON = function toJSON() {
  2221. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  2222. };
  2223. return RemoveUpcomingOpening;
  2224. })();
  2225. $root.WorkingGroupMetadataAction = (function() {
  2226. /**
  2227. * Properties of a WorkingGroupMetadataAction.
  2228. * @exports IWorkingGroupMetadataAction
  2229. * @interface IWorkingGroupMetadataAction
  2230. * @property {ISetGroupMetadata|null} [setGroupMetadata] WorkingGroupMetadataAction setGroupMetadata
  2231. * @property {IAddUpcomingOpening|null} [addUpcomingOpening] WorkingGroupMetadataAction addUpcomingOpening
  2232. * @property {IRemoveUpcomingOpening|null} [removeUpcomingOpening] WorkingGroupMetadataAction removeUpcomingOpening
  2233. */
  2234. /**
  2235. * Constructs a new WorkingGroupMetadataAction.
  2236. * @exports WorkingGroupMetadataAction
  2237. * @classdesc Represents a WorkingGroupMetadataAction.
  2238. * @implements IWorkingGroupMetadataAction
  2239. * @constructor
  2240. * @param {IWorkingGroupMetadataAction=} [properties] Properties to set
  2241. */
  2242. function WorkingGroupMetadataAction(properties) {
  2243. if (properties)
  2244. for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
  2245. if (properties[keys[i]] != null)
  2246. this[keys[i]] = properties[keys[i]];
  2247. }
  2248. /**
  2249. * WorkingGroupMetadataAction setGroupMetadata.
  2250. * @member {ISetGroupMetadata|null|undefined} setGroupMetadata
  2251. * @memberof WorkingGroupMetadataAction
  2252. * @instance
  2253. */
  2254. WorkingGroupMetadataAction.prototype.setGroupMetadata = null;
  2255. /**
  2256. * WorkingGroupMetadataAction addUpcomingOpening.
  2257. * @member {IAddUpcomingOpening|null|undefined} addUpcomingOpening
  2258. * @memberof WorkingGroupMetadataAction
  2259. * @instance
  2260. */
  2261. WorkingGroupMetadataAction.prototype.addUpcomingOpening = null;
  2262. /**
  2263. * WorkingGroupMetadataAction removeUpcomingOpening.
  2264. * @member {IRemoveUpcomingOpening|null|undefined} removeUpcomingOpening
  2265. * @memberof WorkingGroupMetadataAction
  2266. * @instance
  2267. */
  2268. WorkingGroupMetadataAction.prototype.removeUpcomingOpening = null;
  2269. // OneOf field names bound to virtual getters and setters
  2270. var $oneOfFields;
  2271. /**
  2272. * WorkingGroupMetadataAction action.
  2273. * @member {"setGroupMetadata"|"addUpcomingOpening"|"removeUpcomingOpening"|undefined} action
  2274. * @memberof WorkingGroupMetadataAction
  2275. * @instance
  2276. */
  2277. Object.defineProperty(WorkingGroupMetadataAction.prototype, "action", {
  2278. get: $util.oneOfGetter($oneOfFields = ["setGroupMetadata", "addUpcomingOpening", "removeUpcomingOpening"]),
  2279. set: $util.oneOfSetter($oneOfFields)
  2280. });
  2281. /**
  2282. * Creates a new WorkingGroupMetadataAction instance using the specified properties.
  2283. * @function create
  2284. * @memberof WorkingGroupMetadataAction
  2285. * @static
  2286. * @param {IWorkingGroupMetadataAction=} [properties] Properties to set
  2287. * @returns {WorkingGroupMetadataAction} WorkingGroupMetadataAction instance
  2288. */
  2289. WorkingGroupMetadataAction.create = function create(properties) {
  2290. return new WorkingGroupMetadataAction(properties);
  2291. };
  2292. /**
  2293. * Encodes the specified WorkingGroupMetadataAction message. Does not implicitly {@link WorkingGroupMetadataAction.verify|verify} messages.
  2294. * @function encode
  2295. * @memberof WorkingGroupMetadataAction
  2296. * @static
  2297. * @param {IWorkingGroupMetadataAction} message WorkingGroupMetadataAction message or plain object to encode
  2298. * @param {$protobuf.Writer} [writer] Writer to encode to
  2299. * @returns {$protobuf.Writer} Writer
  2300. */
  2301. WorkingGroupMetadataAction.encode = function encode(message, writer) {
  2302. if (!writer)
  2303. writer = $Writer.create();
  2304. if (message.setGroupMetadata != null && Object.hasOwnProperty.call(message, "setGroupMetadata"))
  2305. $root.SetGroupMetadata.encode(message.setGroupMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
  2306. if (message.addUpcomingOpening != null && Object.hasOwnProperty.call(message, "addUpcomingOpening"))
  2307. $root.AddUpcomingOpening.encode(message.addUpcomingOpening, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
  2308. if (message.removeUpcomingOpening != null && Object.hasOwnProperty.call(message, "removeUpcomingOpening"))
  2309. $root.RemoveUpcomingOpening.encode(message.removeUpcomingOpening, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
  2310. return writer;
  2311. };
  2312. /**
  2313. * Encodes the specified WorkingGroupMetadataAction message, length delimited. Does not implicitly {@link WorkingGroupMetadataAction.verify|verify} messages.
  2314. * @function encodeDelimited
  2315. * @memberof WorkingGroupMetadataAction
  2316. * @static
  2317. * @param {IWorkingGroupMetadataAction} message WorkingGroupMetadataAction message or plain object to encode
  2318. * @param {$protobuf.Writer} [writer] Writer to encode to
  2319. * @returns {$protobuf.Writer} Writer
  2320. */
  2321. WorkingGroupMetadataAction.encodeDelimited = function encodeDelimited(message, writer) {
  2322. return this.encode(message, writer).ldelim();
  2323. };
  2324. /**
  2325. * Decodes a WorkingGroupMetadataAction message from the specified reader or buffer.
  2326. * @function decode
  2327. * @memberof WorkingGroupMetadataAction
  2328. * @static
  2329. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  2330. * @param {number} [length] Message length if known beforehand
  2331. * @returns {WorkingGroupMetadataAction} WorkingGroupMetadataAction
  2332. * @throws {Error} If the payload is not a reader or valid buffer
  2333. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  2334. */
  2335. WorkingGroupMetadataAction.decode = function decode(reader, length) {
  2336. if (!(reader instanceof $Reader))
  2337. reader = $Reader.create(reader);
  2338. var end = length === undefined ? reader.len : reader.pos + length, message = new $root.WorkingGroupMetadataAction();
  2339. while (reader.pos < end) {
  2340. var tag = reader.uint32();
  2341. switch (tag >>> 3) {
  2342. case 1:
  2343. message.setGroupMetadata = $root.SetGroupMetadata.decode(reader, reader.uint32());
  2344. break;
  2345. case 2:
  2346. message.addUpcomingOpening = $root.AddUpcomingOpening.decode(reader, reader.uint32());
  2347. break;
  2348. case 3:
  2349. message.removeUpcomingOpening = $root.RemoveUpcomingOpening.decode(reader, reader.uint32());
  2350. break;
  2351. default:
  2352. reader.skipType(tag & 7);
  2353. break;
  2354. }
  2355. }
  2356. return message;
  2357. };
  2358. /**
  2359. * Decodes a WorkingGroupMetadataAction message from the specified reader or buffer, length delimited.
  2360. * @function decodeDelimited
  2361. * @memberof WorkingGroupMetadataAction
  2362. * @static
  2363. * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
  2364. * @returns {WorkingGroupMetadataAction} WorkingGroupMetadataAction
  2365. * @throws {Error} If the payload is not a reader or valid buffer
  2366. * @throws {$protobuf.util.ProtocolError} If required fields are missing
  2367. */
  2368. WorkingGroupMetadataAction.decodeDelimited = function decodeDelimited(reader) {
  2369. if (!(reader instanceof $Reader))
  2370. reader = new $Reader(reader);
  2371. return this.decode(reader, reader.uint32());
  2372. };
  2373. /**
  2374. * Verifies a WorkingGroupMetadataAction message.
  2375. * @function verify
  2376. * @memberof WorkingGroupMetadataAction
  2377. * @static
  2378. * @param {Object.<string,*>} message Plain object to verify
  2379. * @returns {string|null} `null` if valid, otherwise the reason why it is not
  2380. */
  2381. WorkingGroupMetadataAction.verify = function verify(message) {
  2382. if (typeof message !== "object" || message === null)
  2383. return "object expected";
  2384. var properties = {};
  2385. if (message.setGroupMetadata != null && message.hasOwnProperty("setGroupMetadata")) {
  2386. properties.action = 1;
  2387. {
  2388. var error = $root.SetGroupMetadata.verify(message.setGroupMetadata);
  2389. if (error)
  2390. return "setGroupMetadata." + error;
  2391. }
  2392. }
  2393. if (message.addUpcomingOpening != null && message.hasOwnProperty("addUpcomingOpening")) {
  2394. if (properties.action === 1)
  2395. return "action: multiple values";
  2396. properties.action = 1;
  2397. {
  2398. var error = $root.AddUpcomingOpening.verify(message.addUpcomingOpening);
  2399. if (error)
  2400. return "addUpcomingOpening." + error;
  2401. }
  2402. }
  2403. if (message.removeUpcomingOpening != null && message.hasOwnProperty("removeUpcomingOpening")) {
  2404. if (properties.action === 1)
  2405. return "action: multiple values";
  2406. properties.action = 1;
  2407. {
  2408. var error = $root.RemoveUpcomingOpening.verify(message.removeUpcomingOpening);
  2409. if (error)
  2410. return "removeUpcomingOpening." + error;
  2411. }
  2412. }
  2413. return null;
  2414. };
  2415. /**
  2416. * Creates a WorkingGroupMetadataAction message from a plain object. Also converts values to their respective internal types.
  2417. * @function fromObject
  2418. * @memberof WorkingGroupMetadataAction
  2419. * @static
  2420. * @param {Object.<string,*>} object Plain object
  2421. * @returns {WorkingGroupMetadataAction} WorkingGroupMetadataAction
  2422. */
  2423. WorkingGroupMetadataAction.fromObject = function fromObject(object) {
  2424. if (object instanceof $root.WorkingGroupMetadataAction)
  2425. return object;
  2426. var message = new $root.WorkingGroupMetadataAction();
  2427. if (object.setGroupMetadata != null) {
  2428. if (typeof object.setGroupMetadata !== "object")
  2429. throw TypeError(".WorkingGroupMetadataAction.setGroupMetadata: object expected");
  2430. message.setGroupMetadata = $root.SetGroupMetadata.fromObject(object.setGroupMetadata);
  2431. }
  2432. if (object.addUpcomingOpening != null) {
  2433. if (typeof object.addUpcomingOpening !== "object")
  2434. throw TypeError(".WorkingGroupMetadataAction.addUpcomingOpening: object expected");
  2435. message.addUpcomingOpening = $root.AddUpcomingOpening.fromObject(object.addUpcomingOpening);
  2436. }
  2437. if (object.removeUpcomingOpening != null) {
  2438. if (typeof object.removeUpcomingOpening !== "object")
  2439. throw TypeError(".WorkingGroupMetadataAction.removeUpcomingOpening: object expected");
  2440. message.removeUpcomingOpening = $root.RemoveUpcomingOpening.fromObject(object.removeUpcomingOpening);
  2441. }
  2442. return message;
  2443. };
  2444. /**
  2445. * Creates a plain object from a WorkingGroupMetadataAction message. Also converts values to other types if specified.
  2446. * @function toObject
  2447. * @memberof WorkingGroupMetadataAction
  2448. * @static
  2449. * @param {WorkingGroupMetadataAction} message WorkingGroupMetadataAction
  2450. * @param {$protobuf.IConversionOptions} [options] Conversion options
  2451. * @returns {Object.<string,*>} Plain object
  2452. */
  2453. WorkingGroupMetadataAction.toObject = function toObject(message, options) {
  2454. if (!options)
  2455. options = {};
  2456. var object = {};
  2457. if (message.setGroupMetadata != null && message.hasOwnProperty("setGroupMetadata")) {
  2458. object.setGroupMetadata = $root.SetGroupMetadata.toObject(message.setGroupMetadata, options);
  2459. if (options.oneofs)
  2460. object.action = "setGroupMetadata";
  2461. }
  2462. if (message.addUpcomingOpening != null && message.hasOwnProperty("addUpcomingOpening")) {
  2463. object.addUpcomingOpening = $root.AddUpcomingOpening.toObject(message.addUpcomingOpening, options);
  2464. if (options.oneofs)
  2465. object.action = "addUpcomingOpening";
  2466. }
  2467. if (message.removeUpcomingOpening != null && message.hasOwnProperty("removeUpcomingOpening")) {
  2468. object.removeUpcomingOpening = $root.RemoveUpcomingOpening.toObject(message.removeUpcomingOpening, options);
  2469. if (options.oneofs)
  2470. object.action = "removeUpcomingOpening";
  2471. }
  2472. return object;
  2473. };
  2474. /**
  2475. * Converts this WorkingGroupMetadataAction to JSON.
  2476. * @function toJSON
  2477. * @memberof WorkingGroupMetadataAction
  2478. * @instance
  2479. * @returns {Object.<string,*>} JSON object
  2480. */
  2481. WorkingGroupMetadataAction.prototype.toJSON = function toJSON() {
  2482. return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
  2483. };
  2484. return WorkingGroupMetadataAction;
  2485. })();
  2486. module.exports = $root;