12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666 |
- /*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/
- "use strict";
- var $protobuf = require("protobufjs/minimal");
- // Common aliases
- var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util;
- // Exported root namespace
- var $root = $protobuf.roots["default"] || ($protobuf.roots["default"] = {});
- $root.CouncilCandidacyNoteMetadata = (function() {
- /**
- * Properties of a CouncilCandidacyNoteMetadata.
- * @exports ICouncilCandidacyNoteMetadata
- * @interface ICouncilCandidacyNoteMetadata
- * @property {string|null} [header] CouncilCandidacyNoteMetadata header
- * @property {Array.<string>|null} [bulletPoints] CouncilCandidacyNoteMetadata bulletPoints
- * @property {string|null} [bannerImageUri] CouncilCandidacyNoteMetadata bannerImageUri
- * @property {string|null} [description] CouncilCandidacyNoteMetadata description
- */
- /**
- * Constructs a new CouncilCandidacyNoteMetadata.
- * @exports CouncilCandidacyNoteMetadata
- * @classdesc Represents a CouncilCandidacyNoteMetadata.
- * @implements ICouncilCandidacyNoteMetadata
- * @constructor
- * @param {ICouncilCandidacyNoteMetadata=} [properties] Properties to set
- */
- function CouncilCandidacyNoteMetadata(properties) {
- this.bulletPoints = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
- /**
- * CouncilCandidacyNoteMetadata header.
- * @member {string} header
- * @memberof CouncilCandidacyNoteMetadata
- * @instance
- */
- CouncilCandidacyNoteMetadata.prototype.header = "";
- /**
- * CouncilCandidacyNoteMetadata bulletPoints.
- * @member {Array.<string>} bulletPoints
- * @memberof CouncilCandidacyNoteMetadata
- * @instance
- */
- CouncilCandidacyNoteMetadata.prototype.bulletPoints = $util.emptyArray;
- /**
- * CouncilCandidacyNoteMetadata bannerImageUri.
- * @member {string} bannerImageUri
- * @memberof CouncilCandidacyNoteMetadata
- * @instance
- */
- CouncilCandidacyNoteMetadata.prototype.bannerImageUri = "";
- /**
- * CouncilCandidacyNoteMetadata description.
- * @member {string} description
- * @memberof CouncilCandidacyNoteMetadata
- * @instance
- */
- CouncilCandidacyNoteMetadata.prototype.description = "";
- /**
- * Creates a new CouncilCandidacyNoteMetadata instance using the specified properties.
- * @function create
- * @memberof CouncilCandidacyNoteMetadata
- * @static
- * @param {ICouncilCandidacyNoteMetadata=} [properties] Properties to set
- * @returns {CouncilCandidacyNoteMetadata} CouncilCandidacyNoteMetadata instance
- */
- CouncilCandidacyNoteMetadata.create = function create(properties) {
- return new CouncilCandidacyNoteMetadata(properties);
- };
- /**
- * Encodes the specified CouncilCandidacyNoteMetadata message. Does not implicitly {@link CouncilCandidacyNoteMetadata.verify|verify} messages.
- * @function encode
- * @memberof CouncilCandidacyNoteMetadata
- * @static
- * @param {ICouncilCandidacyNoteMetadata} message CouncilCandidacyNoteMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- CouncilCandidacyNoteMetadata.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.header != null && Object.hasOwnProperty.call(message, "header"))
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.header);
- if (message.bulletPoints != null && message.bulletPoints.length)
- for (var i = 0; i < message.bulletPoints.length; ++i)
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.bulletPoints[i]);
- if (message.bannerImageUri != null && Object.hasOwnProperty.call(message, "bannerImageUri"))
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.bannerImageUri);
- if (message.description != null && Object.hasOwnProperty.call(message, "description"))
- writer.uint32(/* id 4, wireType 2 =*/34).string(message.description);
- return writer;
- };
- /**
- * Encodes the specified CouncilCandidacyNoteMetadata message, length delimited. Does not implicitly {@link CouncilCandidacyNoteMetadata.verify|verify} messages.
- * @function encodeDelimited
- * @memberof CouncilCandidacyNoteMetadata
- * @static
- * @param {ICouncilCandidacyNoteMetadata} message CouncilCandidacyNoteMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- CouncilCandidacyNoteMetadata.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
- /**
- * Decodes a CouncilCandidacyNoteMetadata message from the specified reader or buffer.
- * @function decode
- * @memberof CouncilCandidacyNoteMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {CouncilCandidacyNoteMetadata} CouncilCandidacyNoteMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- CouncilCandidacyNoteMetadata.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.CouncilCandidacyNoteMetadata();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.header = reader.string();
- break;
- case 2:
- if (!(message.bulletPoints && message.bulletPoints.length))
- message.bulletPoints = [];
- message.bulletPoints.push(reader.string());
- break;
- case 3:
- message.bannerImageUri = reader.string();
- break;
- case 4:
- message.description = reader.string();
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
- /**
- * Decodes a CouncilCandidacyNoteMetadata message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof CouncilCandidacyNoteMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {CouncilCandidacyNoteMetadata} CouncilCandidacyNoteMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- CouncilCandidacyNoteMetadata.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
- /**
- * Verifies a CouncilCandidacyNoteMetadata message.
- * @function verify
- * @memberof CouncilCandidacyNoteMetadata
- * @static
- * @param {Object.<string,*>} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- CouncilCandidacyNoteMetadata.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.header != null && message.hasOwnProperty("header"))
- if (!$util.isString(message.header))
- return "header: string expected";
- if (message.bulletPoints != null && message.hasOwnProperty("bulletPoints")) {
- if (!Array.isArray(message.bulletPoints))
- return "bulletPoints: array expected";
- for (var i = 0; i < message.bulletPoints.length; ++i)
- if (!$util.isString(message.bulletPoints[i]))
- return "bulletPoints: string[] expected";
- }
- if (message.bannerImageUri != null && message.hasOwnProperty("bannerImageUri"))
- if (!$util.isString(message.bannerImageUri))
- return "bannerImageUri: string expected";
- if (message.description != null && message.hasOwnProperty("description"))
- if (!$util.isString(message.description))
- return "description: string expected";
- return null;
- };
- /**
- * Creates a CouncilCandidacyNoteMetadata message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof CouncilCandidacyNoteMetadata
- * @static
- * @param {Object.<string,*>} object Plain object
- * @returns {CouncilCandidacyNoteMetadata} CouncilCandidacyNoteMetadata
- */
- CouncilCandidacyNoteMetadata.fromObject = function fromObject(object) {
- if (object instanceof $root.CouncilCandidacyNoteMetadata)
- return object;
- var message = new $root.CouncilCandidacyNoteMetadata();
- if (object.header != null)
- message.header = String(object.header);
- if (object.bulletPoints) {
- if (!Array.isArray(object.bulletPoints))
- throw TypeError(".CouncilCandidacyNoteMetadata.bulletPoints: array expected");
- message.bulletPoints = [];
- for (var i = 0; i < object.bulletPoints.length; ++i)
- message.bulletPoints[i] = String(object.bulletPoints[i]);
- }
- if (object.bannerImageUri != null)
- message.bannerImageUri = String(object.bannerImageUri);
- if (object.description != null)
- message.description = String(object.description);
- return message;
- };
- /**
- * Creates a plain object from a CouncilCandidacyNoteMetadata message. Also converts values to other types if specified.
- * @function toObject
- * @memberof CouncilCandidacyNoteMetadata
- * @static
- * @param {CouncilCandidacyNoteMetadata} message CouncilCandidacyNoteMetadata
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.<string,*>} Plain object
- */
- CouncilCandidacyNoteMetadata.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.bulletPoints = [];
- if (options.defaults) {
- object.header = "";
- object.bannerImageUri = "";
- object.description = "";
- }
- if (message.header != null && message.hasOwnProperty("header"))
- object.header = message.header;
- if (message.bulletPoints && message.bulletPoints.length) {
- object.bulletPoints = [];
- for (var j = 0; j < message.bulletPoints.length; ++j)
- object.bulletPoints[j] = message.bulletPoints[j];
- }
- if (message.bannerImageUri != null && message.hasOwnProperty("bannerImageUri"))
- object.bannerImageUri = message.bannerImageUri;
- if (message.description != null && message.hasOwnProperty("description"))
- object.description = message.description;
- return object;
- };
- /**
- * Converts this CouncilCandidacyNoteMetadata to JSON.
- * @function toJSON
- * @memberof CouncilCandidacyNoteMetadata
- * @instance
- * @returns {Object.<string,*>} JSON object
- */
- CouncilCandidacyNoteMetadata.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- return CouncilCandidacyNoteMetadata;
- })();
- $root.MembershipMetadata = (function() {
- /**
- * Properties of a MembershipMetadata.
- * @exports IMembershipMetadata
- * @interface IMembershipMetadata
- * @property {string|null} [name] MembershipMetadata name
- * @property {number|null} [avatar] MembershipMetadata avatar
- * @property {string|null} [about] MembershipMetadata about
- */
- /**
- * Constructs a new MembershipMetadata.
- * @exports MembershipMetadata
- * @classdesc Represents a MembershipMetadata.
- * @implements IMembershipMetadata
- * @constructor
- * @param {IMembershipMetadata=} [properties] Properties to set
- */
- function MembershipMetadata(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
- /**
- * MembershipMetadata name.
- * @member {string} name
- * @memberof MembershipMetadata
- * @instance
- */
- MembershipMetadata.prototype.name = "";
- /**
- * MembershipMetadata avatar.
- * @member {number} avatar
- * @memberof MembershipMetadata
- * @instance
- */
- MembershipMetadata.prototype.avatar = 0;
- /**
- * MembershipMetadata about.
- * @member {string} about
- * @memberof MembershipMetadata
- * @instance
- */
- MembershipMetadata.prototype.about = "";
- /**
- * Creates a new MembershipMetadata instance using the specified properties.
- * @function create
- * @memberof MembershipMetadata
- * @static
- * @param {IMembershipMetadata=} [properties] Properties to set
- * @returns {MembershipMetadata} MembershipMetadata instance
- */
- MembershipMetadata.create = function create(properties) {
- return new MembershipMetadata(properties);
- };
- /**
- * Encodes the specified MembershipMetadata message. Does not implicitly {@link MembershipMetadata.verify|verify} messages.
- * @function encode
- * @memberof MembershipMetadata
- * @static
- * @param {IMembershipMetadata} message MembershipMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- MembershipMetadata.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.name != null && Object.hasOwnProperty.call(message, "name"))
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.name);
- if (message.avatar != null && Object.hasOwnProperty.call(message, "avatar"))
- writer.uint32(/* id 2, wireType 0 =*/16).uint32(message.avatar);
- if (message.about != null && Object.hasOwnProperty.call(message, "about"))
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.about);
- return writer;
- };
- /**
- * Encodes the specified MembershipMetadata message, length delimited. Does not implicitly {@link MembershipMetadata.verify|verify} messages.
- * @function encodeDelimited
- * @memberof MembershipMetadata
- * @static
- * @param {IMembershipMetadata} message MembershipMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- MembershipMetadata.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
- /**
- * Decodes a MembershipMetadata message from the specified reader or buffer.
- * @function decode
- * @memberof MembershipMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {MembershipMetadata} MembershipMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- MembershipMetadata.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.MembershipMetadata();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.name = reader.string();
- break;
- case 2:
- message.avatar = reader.uint32();
- break;
- case 3:
- message.about = reader.string();
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
- /**
- * Decodes a MembershipMetadata message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof MembershipMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {MembershipMetadata} MembershipMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- MembershipMetadata.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
- /**
- * Verifies a MembershipMetadata message.
- * @function verify
- * @memberof MembershipMetadata
- * @static
- * @param {Object.<string,*>} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- MembershipMetadata.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.name != null && message.hasOwnProperty("name"))
- if (!$util.isString(message.name))
- return "name: string expected";
- if (message.avatar != null && message.hasOwnProperty("avatar"))
- if (!$util.isInteger(message.avatar))
- return "avatar: integer expected";
- if (message.about != null && message.hasOwnProperty("about"))
- if (!$util.isString(message.about))
- return "about: string expected";
- return null;
- };
- /**
- * Creates a MembershipMetadata message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof MembershipMetadata
- * @static
- * @param {Object.<string,*>} object Plain object
- * @returns {MembershipMetadata} MembershipMetadata
- */
- MembershipMetadata.fromObject = function fromObject(object) {
- if (object instanceof $root.MembershipMetadata)
- return object;
- var message = new $root.MembershipMetadata();
- if (object.name != null)
- message.name = String(object.name);
- if (object.avatar != null)
- message.avatar = object.avatar >>> 0;
- if (object.about != null)
- message.about = String(object.about);
- return message;
- };
- /**
- * Creates a plain object from a MembershipMetadata message. Also converts values to other types if specified.
- * @function toObject
- * @memberof MembershipMetadata
- * @static
- * @param {MembershipMetadata} message MembershipMetadata
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.<string,*>} Plain object
- */
- MembershipMetadata.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.name = "";
- object.avatar = 0;
- object.about = "";
- }
- if (message.name != null && message.hasOwnProperty("name"))
- object.name = message.name;
- if (message.avatar != null && message.hasOwnProperty("avatar"))
- object.avatar = message.avatar;
- if (message.about != null && message.hasOwnProperty("about"))
- object.about = message.about;
- return object;
- };
- /**
- * Converts this MembershipMetadata to JSON.
- * @function toJSON
- * @memberof MembershipMetadata
- * @instance
- * @returns {Object.<string,*>} JSON object
- */
- MembershipMetadata.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- return MembershipMetadata;
- })();
- $root.OpeningMetadata = (function() {
- /**
- * Properties of an OpeningMetadata.
- * @exports IOpeningMetadata
- * @interface IOpeningMetadata
- * @property {string|null} [shortDescription] OpeningMetadata shortDescription
- * @property {string|null} [description] OpeningMetadata description
- * @property {number|null} [hiringLimit] OpeningMetadata hiringLimit
- * @property {number|null} [expectedEndingTimestamp] OpeningMetadata expectedEndingTimestamp
- * @property {string|null} [applicationDetails] OpeningMetadata applicationDetails
- * @property {Array.<OpeningMetadata.IApplicationFormQuestion>|null} [applicationFormQuestions] OpeningMetadata applicationFormQuestions
- */
- /**
- * Constructs a new OpeningMetadata.
- * @exports OpeningMetadata
- * @classdesc Represents an OpeningMetadata.
- * @implements IOpeningMetadata
- * @constructor
- * @param {IOpeningMetadata=} [properties] Properties to set
- */
- function OpeningMetadata(properties) {
- this.applicationFormQuestions = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
- /**
- * OpeningMetadata shortDescription.
- * @member {string} shortDescription
- * @memberof OpeningMetadata
- * @instance
- */
- OpeningMetadata.prototype.shortDescription = "";
- /**
- * OpeningMetadata description.
- * @member {string} description
- * @memberof OpeningMetadata
- * @instance
- */
- OpeningMetadata.prototype.description = "";
- /**
- * OpeningMetadata hiringLimit.
- * @member {number} hiringLimit
- * @memberof OpeningMetadata
- * @instance
- */
- OpeningMetadata.prototype.hiringLimit = 0;
- /**
- * OpeningMetadata expectedEndingTimestamp.
- * @member {number} expectedEndingTimestamp
- * @memberof OpeningMetadata
- * @instance
- */
- OpeningMetadata.prototype.expectedEndingTimestamp = 0;
- /**
- * OpeningMetadata applicationDetails.
- * @member {string} applicationDetails
- * @memberof OpeningMetadata
- * @instance
- */
- OpeningMetadata.prototype.applicationDetails = "";
- /**
- * OpeningMetadata applicationFormQuestions.
- * @member {Array.<OpeningMetadata.IApplicationFormQuestion>} applicationFormQuestions
- * @memberof OpeningMetadata
- * @instance
- */
- OpeningMetadata.prototype.applicationFormQuestions = $util.emptyArray;
- /**
- * Creates a new OpeningMetadata instance using the specified properties.
- * @function create
- * @memberof OpeningMetadata
- * @static
- * @param {IOpeningMetadata=} [properties] Properties to set
- * @returns {OpeningMetadata} OpeningMetadata instance
- */
- OpeningMetadata.create = function create(properties) {
- return new OpeningMetadata(properties);
- };
- /**
- * Encodes the specified OpeningMetadata message. Does not implicitly {@link OpeningMetadata.verify|verify} messages.
- * @function encode
- * @memberof OpeningMetadata
- * @static
- * @param {IOpeningMetadata} message OpeningMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- OpeningMetadata.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.shortDescription != null && Object.hasOwnProperty.call(message, "shortDescription"))
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.shortDescription);
- if (message.description != null && Object.hasOwnProperty.call(message, "description"))
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.description);
- if (message.hiringLimit != null && Object.hasOwnProperty.call(message, "hiringLimit"))
- writer.uint32(/* id 3, wireType 0 =*/24).uint32(message.hiringLimit);
- if (message.expectedEndingTimestamp != null && Object.hasOwnProperty.call(message, "expectedEndingTimestamp"))
- writer.uint32(/* id 4, wireType 0 =*/32).uint32(message.expectedEndingTimestamp);
- if (message.applicationDetails != null && Object.hasOwnProperty.call(message, "applicationDetails"))
- writer.uint32(/* id 5, wireType 2 =*/42).string(message.applicationDetails);
- if (message.applicationFormQuestions != null && message.applicationFormQuestions.length)
- for (var i = 0; i < message.applicationFormQuestions.length; ++i)
- $root.OpeningMetadata.ApplicationFormQuestion.encode(message.applicationFormQuestions[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim();
- return writer;
- };
- /**
- * Encodes the specified OpeningMetadata message, length delimited. Does not implicitly {@link OpeningMetadata.verify|verify} messages.
- * @function encodeDelimited
- * @memberof OpeningMetadata
- * @static
- * @param {IOpeningMetadata} message OpeningMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- OpeningMetadata.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
- /**
- * Decodes an OpeningMetadata message from the specified reader or buffer.
- * @function decode
- * @memberof OpeningMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {OpeningMetadata} OpeningMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- OpeningMetadata.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.OpeningMetadata();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.shortDescription = reader.string();
- break;
- case 2:
- message.description = reader.string();
- break;
- case 3:
- message.hiringLimit = reader.uint32();
- break;
- case 4:
- message.expectedEndingTimestamp = reader.uint32();
- break;
- case 5:
- message.applicationDetails = reader.string();
- break;
- case 6:
- if (!(message.applicationFormQuestions && message.applicationFormQuestions.length))
- message.applicationFormQuestions = [];
- message.applicationFormQuestions.push($root.OpeningMetadata.ApplicationFormQuestion.decode(reader, reader.uint32()));
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
- /**
- * Decodes an OpeningMetadata message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof OpeningMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {OpeningMetadata} OpeningMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- OpeningMetadata.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
- /**
- * Verifies an OpeningMetadata message.
- * @function verify
- * @memberof OpeningMetadata
- * @static
- * @param {Object.<string,*>} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- OpeningMetadata.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.shortDescription != null && message.hasOwnProperty("shortDescription"))
- if (!$util.isString(message.shortDescription))
- return "shortDescription: string expected";
- if (message.description != null && message.hasOwnProperty("description"))
- if (!$util.isString(message.description))
- return "description: string expected";
- if (message.hiringLimit != null && message.hasOwnProperty("hiringLimit"))
- if (!$util.isInteger(message.hiringLimit))
- return "hiringLimit: integer expected";
- if (message.expectedEndingTimestamp != null && message.hasOwnProperty("expectedEndingTimestamp"))
- if (!$util.isInteger(message.expectedEndingTimestamp))
- return "expectedEndingTimestamp: integer expected";
- if (message.applicationDetails != null && message.hasOwnProperty("applicationDetails"))
- if (!$util.isString(message.applicationDetails))
- return "applicationDetails: string expected";
- if (message.applicationFormQuestions != null && message.hasOwnProperty("applicationFormQuestions")) {
- if (!Array.isArray(message.applicationFormQuestions))
- return "applicationFormQuestions: array expected";
- for (var i = 0; i < message.applicationFormQuestions.length; ++i) {
- var error = $root.OpeningMetadata.ApplicationFormQuestion.verify(message.applicationFormQuestions[i]);
- if (error)
- return "applicationFormQuestions." + error;
- }
- }
- return null;
- };
- /**
- * Creates an OpeningMetadata message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof OpeningMetadata
- * @static
- * @param {Object.<string,*>} object Plain object
- * @returns {OpeningMetadata} OpeningMetadata
- */
- OpeningMetadata.fromObject = function fromObject(object) {
- if (object instanceof $root.OpeningMetadata)
- return object;
- var message = new $root.OpeningMetadata();
- if (object.shortDescription != null)
- message.shortDescription = String(object.shortDescription);
- if (object.description != null)
- message.description = String(object.description);
- if (object.hiringLimit != null)
- message.hiringLimit = object.hiringLimit >>> 0;
- if (object.expectedEndingTimestamp != null)
- message.expectedEndingTimestamp = object.expectedEndingTimestamp >>> 0;
- if (object.applicationDetails != null)
- message.applicationDetails = String(object.applicationDetails);
- if (object.applicationFormQuestions) {
- if (!Array.isArray(object.applicationFormQuestions))
- throw TypeError(".OpeningMetadata.applicationFormQuestions: array expected");
- message.applicationFormQuestions = [];
- for (var i = 0; i < object.applicationFormQuestions.length; ++i) {
- if (typeof object.applicationFormQuestions[i] !== "object")
- throw TypeError(".OpeningMetadata.applicationFormQuestions: object expected");
- message.applicationFormQuestions[i] = $root.OpeningMetadata.ApplicationFormQuestion.fromObject(object.applicationFormQuestions[i]);
- }
- }
- return message;
- };
- /**
- * Creates a plain object from an OpeningMetadata message. Also converts values to other types if specified.
- * @function toObject
- * @memberof OpeningMetadata
- * @static
- * @param {OpeningMetadata} message OpeningMetadata
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.<string,*>} Plain object
- */
- OpeningMetadata.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.applicationFormQuestions = [];
- if (options.defaults) {
- object.shortDescription = "";
- object.description = "";
- object.hiringLimit = 0;
- object.expectedEndingTimestamp = 0;
- object.applicationDetails = "";
- }
- if (message.shortDescription != null && message.hasOwnProperty("shortDescription"))
- object.shortDescription = message.shortDescription;
- if (message.description != null && message.hasOwnProperty("description"))
- object.description = message.description;
- if (message.hiringLimit != null && message.hasOwnProperty("hiringLimit"))
- object.hiringLimit = message.hiringLimit;
- if (message.expectedEndingTimestamp != null && message.hasOwnProperty("expectedEndingTimestamp"))
- object.expectedEndingTimestamp = message.expectedEndingTimestamp;
- if (message.applicationDetails != null && message.hasOwnProperty("applicationDetails"))
- object.applicationDetails = message.applicationDetails;
- if (message.applicationFormQuestions && message.applicationFormQuestions.length) {
- object.applicationFormQuestions = [];
- for (var j = 0; j < message.applicationFormQuestions.length; ++j)
- object.applicationFormQuestions[j] = $root.OpeningMetadata.ApplicationFormQuestion.toObject(message.applicationFormQuestions[j], options);
- }
- return object;
- };
- /**
- * Converts this OpeningMetadata to JSON.
- * @function toJSON
- * @memberof OpeningMetadata
- * @instance
- * @returns {Object.<string,*>} JSON object
- */
- OpeningMetadata.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- OpeningMetadata.ApplicationFormQuestion = (function() {
- /**
- * Properties of an ApplicationFormQuestion.
- * @memberof OpeningMetadata
- * @interface IApplicationFormQuestion
- * @property {string|null} [question] ApplicationFormQuestion question
- * @property {OpeningMetadata.ApplicationFormQuestion.InputType|null} [type] ApplicationFormQuestion type
- */
- /**
- * Constructs a new ApplicationFormQuestion.
- * @memberof OpeningMetadata
- * @classdesc Represents an ApplicationFormQuestion.
- * @implements IApplicationFormQuestion
- * @constructor
- * @param {OpeningMetadata.IApplicationFormQuestion=} [properties] Properties to set
- */
- function ApplicationFormQuestion(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
- /**
- * ApplicationFormQuestion question.
- * @member {string} question
- * @memberof OpeningMetadata.ApplicationFormQuestion
- * @instance
- */
- ApplicationFormQuestion.prototype.question = "";
- /**
- * ApplicationFormQuestion type.
- * @member {OpeningMetadata.ApplicationFormQuestion.InputType} type
- * @memberof OpeningMetadata.ApplicationFormQuestion
- * @instance
- */
- ApplicationFormQuestion.prototype.type = 0;
- /**
- * Creates a new ApplicationFormQuestion instance using the specified properties.
- * @function create
- * @memberof OpeningMetadata.ApplicationFormQuestion
- * @static
- * @param {OpeningMetadata.IApplicationFormQuestion=} [properties] Properties to set
- * @returns {OpeningMetadata.ApplicationFormQuestion} ApplicationFormQuestion instance
- */
- ApplicationFormQuestion.create = function create(properties) {
- return new ApplicationFormQuestion(properties);
- };
- /**
- * Encodes the specified ApplicationFormQuestion message. Does not implicitly {@link OpeningMetadata.ApplicationFormQuestion.verify|verify} messages.
- * @function encode
- * @memberof OpeningMetadata.ApplicationFormQuestion
- * @static
- * @param {OpeningMetadata.IApplicationFormQuestion} message ApplicationFormQuestion message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- ApplicationFormQuestion.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.question != null && Object.hasOwnProperty.call(message, "question"))
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.question);
- if (message.type != null && Object.hasOwnProperty.call(message, "type"))
- writer.uint32(/* id 2, wireType 0 =*/16).int32(message.type);
- return writer;
- };
- /**
- * Encodes the specified ApplicationFormQuestion message, length delimited. Does not implicitly {@link OpeningMetadata.ApplicationFormQuestion.verify|verify} messages.
- * @function encodeDelimited
- * @memberof OpeningMetadata.ApplicationFormQuestion
- * @static
- * @param {OpeningMetadata.IApplicationFormQuestion} message ApplicationFormQuestion message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- ApplicationFormQuestion.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
- /**
- * Decodes an ApplicationFormQuestion message from the specified reader or buffer.
- * @function decode
- * @memberof OpeningMetadata.ApplicationFormQuestion
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {OpeningMetadata.ApplicationFormQuestion} ApplicationFormQuestion
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- ApplicationFormQuestion.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.OpeningMetadata.ApplicationFormQuestion();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.question = reader.string();
- break;
- case 2:
- message.type = reader.int32();
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
- /**
- * Decodes an ApplicationFormQuestion message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof OpeningMetadata.ApplicationFormQuestion
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {OpeningMetadata.ApplicationFormQuestion} ApplicationFormQuestion
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- ApplicationFormQuestion.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
- /**
- * Verifies an ApplicationFormQuestion message.
- * @function verify
- * @memberof OpeningMetadata.ApplicationFormQuestion
- * @static
- * @param {Object.<string,*>} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- ApplicationFormQuestion.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.question != null && message.hasOwnProperty("question"))
- if (!$util.isString(message.question))
- return "question: string expected";
- if (message.type != null && message.hasOwnProperty("type"))
- switch (message.type) {
- default:
- return "type: enum value expected";
- case 0:
- case 1:
- break;
- }
- return null;
- };
- /**
- * Creates an ApplicationFormQuestion message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof OpeningMetadata.ApplicationFormQuestion
- * @static
- * @param {Object.<string,*>} object Plain object
- * @returns {OpeningMetadata.ApplicationFormQuestion} ApplicationFormQuestion
- */
- ApplicationFormQuestion.fromObject = function fromObject(object) {
- if (object instanceof $root.OpeningMetadata.ApplicationFormQuestion)
- return object;
- var message = new $root.OpeningMetadata.ApplicationFormQuestion();
- if (object.question != null)
- message.question = String(object.question);
- switch (object.type) {
- case "TEXT":
- case 0:
- message.type = 0;
- break;
- case "TEXTAREA":
- case 1:
- message.type = 1;
- break;
- }
- return message;
- };
- /**
- * Creates a plain object from an ApplicationFormQuestion message. Also converts values to other types if specified.
- * @function toObject
- * @memberof OpeningMetadata.ApplicationFormQuestion
- * @static
- * @param {OpeningMetadata.ApplicationFormQuestion} message ApplicationFormQuestion
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.<string,*>} Plain object
- */
- ApplicationFormQuestion.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.question = "";
- object.type = options.enums === String ? "TEXT" : 0;
- }
- if (message.question != null && message.hasOwnProperty("question"))
- object.question = message.question;
- if (message.type != null && message.hasOwnProperty("type"))
- object.type = options.enums === String ? $root.OpeningMetadata.ApplicationFormQuestion.InputType[message.type] : message.type;
- return object;
- };
- /**
- * Converts this ApplicationFormQuestion to JSON.
- * @function toJSON
- * @memberof OpeningMetadata.ApplicationFormQuestion
- * @instance
- * @returns {Object.<string,*>} JSON object
- */
- ApplicationFormQuestion.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- /**
- * InputType enum.
- * @name OpeningMetadata.ApplicationFormQuestion.InputType
- * @enum {number}
- * @property {number} TEXT=0 TEXT value
- * @property {number} TEXTAREA=1 TEXTAREA value
- */
- ApplicationFormQuestion.InputType = (function() {
- var valuesById = {}, values = Object.create(valuesById);
- values[valuesById[0] = "TEXT"] = 0;
- values[valuesById[1] = "TEXTAREA"] = 1;
- return values;
- })();
- return ApplicationFormQuestion;
- })();
- return OpeningMetadata;
- })();
- $root.UpcomingOpeningMetadata = (function() {
- /**
- * Properties of an UpcomingOpeningMetadata.
- * @exports IUpcomingOpeningMetadata
- * @interface IUpcomingOpeningMetadata
- * @property {number|null} [expectedStart] UpcomingOpeningMetadata expectedStart
- * @property {Long|null} [rewardPerBlock] UpcomingOpeningMetadata rewardPerBlock
- * @property {Long|null} [minApplicationStake] UpcomingOpeningMetadata minApplicationStake
- * @property {IOpeningMetadata|null} [metadata] UpcomingOpeningMetadata metadata
- */
- /**
- * Constructs a new UpcomingOpeningMetadata.
- * @exports UpcomingOpeningMetadata
- * @classdesc Represents an UpcomingOpeningMetadata.
- * @implements IUpcomingOpeningMetadata
- * @constructor
- * @param {IUpcomingOpeningMetadata=} [properties] Properties to set
- */
- function UpcomingOpeningMetadata(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
- /**
- * UpcomingOpeningMetadata expectedStart.
- * @member {number} expectedStart
- * @memberof UpcomingOpeningMetadata
- * @instance
- */
- UpcomingOpeningMetadata.prototype.expectedStart = 0;
- /**
- * UpcomingOpeningMetadata rewardPerBlock.
- * @member {Long} rewardPerBlock
- * @memberof UpcomingOpeningMetadata
- * @instance
- */
- UpcomingOpeningMetadata.prototype.rewardPerBlock = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
- /**
- * UpcomingOpeningMetadata minApplicationStake.
- * @member {Long} minApplicationStake
- * @memberof UpcomingOpeningMetadata
- * @instance
- */
- UpcomingOpeningMetadata.prototype.minApplicationStake = $util.Long ? $util.Long.fromBits(0,0,true) : 0;
- /**
- * UpcomingOpeningMetadata metadata.
- * @member {IOpeningMetadata|null|undefined} metadata
- * @memberof UpcomingOpeningMetadata
- * @instance
- */
- UpcomingOpeningMetadata.prototype.metadata = null;
- /**
- * Creates a new UpcomingOpeningMetadata instance using the specified properties.
- * @function create
- * @memberof UpcomingOpeningMetadata
- * @static
- * @param {IUpcomingOpeningMetadata=} [properties] Properties to set
- * @returns {UpcomingOpeningMetadata} UpcomingOpeningMetadata instance
- */
- UpcomingOpeningMetadata.create = function create(properties) {
- return new UpcomingOpeningMetadata(properties);
- };
- /**
- * Encodes the specified UpcomingOpeningMetadata message. Does not implicitly {@link UpcomingOpeningMetadata.verify|verify} messages.
- * @function encode
- * @memberof UpcomingOpeningMetadata
- * @static
- * @param {IUpcomingOpeningMetadata} message UpcomingOpeningMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- UpcomingOpeningMetadata.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.expectedStart != null && Object.hasOwnProperty.call(message, "expectedStart"))
- writer.uint32(/* id 1, wireType 0 =*/8).uint32(message.expectedStart);
- if (message.rewardPerBlock != null && Object.hasOwnProperty.call(message, "rewardPerBlock"))
- writer.uint32(/* id 2, wireType 0 =*/16).uint64(message.rewardPerBlock);
- if (message.minApplicationStake != null && Object.hasOwnProperty.call(message, "minApplicationStake"))
- writer.uint32(/* id 3, wireType 0 =*/24).uint64(message.minApplicationStake);
- if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
- $root.OpeningMetadata.encode(message.metadata, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim();
- return writer;
- };
- /**
- * Encodes the specified UpcomingOpeningMetadata message, length delimited. Does not implicitly {@link UpcomingOpeningMetadata.verify|verify} messages.
- * @function encodeDelimited
- * @memberof UpcomingOpeningMetadata
- * @static
- * @param {IUpcomingOpeningMetadata} message UpcomingOpeningMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- UpcomingOpeningMetadata.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
- /**
- * Decodes an UpcomingOpeningMetadata message from the specified reader or buffer.
- * @function decode
- * @memberof UpcomingOpeningMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {UpcomingOpeningMetadata} UpcomingOpeningMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- UpcomingOpeningMetadata.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.UpcomingOpeningMetadata();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.expectedStart = reader.uint32();
- break;
- case 2:
- message.rewardPerBlock = reader.uint64();
- break;
- case 3:
- message.minApplicationStake = reader.uint64();
- break;
- case 4:
- message.metadata = $root.OpeningMetadata.decode(reader, reader.uint32());
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
- /**
- * Decodes an UpcomingOpeningMetadata message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof UpcomingOpeningMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {UpcomingOpeningMetadata} UpcomingOpeningMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- UpcomingOpeningMetadata.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
- /**
- * Verifies an UpcomingOpeningMetadata message.
- * @function verify
- * @memberof UpcomingOpeningMetadata
- * @static
- * @param {Object.<string,*>} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- UpcomingOpeningMetadata.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.expectedStart != null && message.hasOwnProperty("expectedStart"))
- if (!$util.isInteger(message.expectedStart))
- return "expectedStart: integer expected";
- if (message.rewardPerBlock != null && message.hasOwnProperty("rewardPerBlock"))
- if (!$util.isInteger(message.rewardPerBlock) && !(message.rewardPerBlock && $util.isInteger(message.rewardPerBlock.low) && $util.isInteger(message.rewardPerBlock.high)))
- return "rewardPerBlock: integer|Long expected";
- if (message.minApplicationStake != null && message.hasOwnProperty("minApplicationStake"))
- if (!$util.isInteger(message.minApplicationStake) && !(message.minApplicationStake && $util.isInteger(message.minApplicationStake.low) && $util.isInteger(message.minApplicationStake.high)))
- return "minApplicationStake: integer|Long expected";
- if (message.metadata != null && message.hasOwnProperty("metadata")) {
- var error = $root.OpeningMetadata.verify(message.metadata);
- if (error)
- return "metadata." + error;
- }
- return null;
- };
- /**
- * Creates an UpcomingOpeningMetadata message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof UpcomingOpeningMetadata
- * @static
- * @param {Object.<string,*>} object Plain object
- * @returns {UpcomingOpeningMetadata} UpcomingOpeningMetadata
- */
- UpcomingOpeningMetadata.fromObject = function fromObject(object) {
- if (object instanceof $root.UpcomingOpeningMetadata)
- return object;
- var message = new $root.UpcomingOpeningMetadata();
- if (object.expectedStart != null)
- message.expectedStart = object.expectedStart >>> 0;
- if (object.rewardPerBlock != null)
- if ($util.Long)
- (message.rewardPerBlock = $util.Long.fromValue(object.rewardPerBlock)).unsigned = true;
- else if (typeof object.rewardPerBlock === "string")
- message.rewardPerBlock = parseInt(object.rewardPerBlock, 10);
- else if (typeof object.rewardPerBlock === "number")
- message.rewardPerBlock = object.rewardPerBlock;
- else if (typeof object.rewardPerBlock === "object")
- message.rewardPerBlock = new $util.LongBits(object.rewardPerBlock.low >>> 0, object.rewardPerBlock.high >>> 0).toNumber(true);
- if (object.minApplicationStake != null)
- if ($util.Long)
- (message.minApplicationStake = $util.Long.fromValue(object.minApplicationStake)).unsigned = true;
- else if (typeof object.minApplicationStake === "string")
- message.minApplicationStake = parseInt(object.minApplicationStake, 10);
- else if (typeof object.minApplicationStake === "number")
- message.minApplicationStake = object.minApplicationStake;
- else if (typeof object.minApplicationStake === "object")
- message.minApplicationStake = new $util.LongBits(object.minApplicationStake.low >>> 0, object.minApplicationStake.high >>> 0).toNumber(true);
- if (object.metadata != null) {
- if (typeof object.metadata !== "object")
- throw TypeError(".UpcomingOpeningMetadata.metadata: object expected");
- message.metadata = $root.OpeningMetadata.fromObject(object.metadata);
- }
- return message;
- };
- /**
- * Creates a plain object from an UpcomingOpeningMetadata message. Also converts values to other types if specified.
- * @function toObject
- * @memberof UpcomingOpeningMetadata
- * @static
- * @param {UpcomingOpeningMetadata} message UpcomingOpeningMetadata
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.<string,*>} Plain object
- */
- UpcomingOpeningMetadata.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.expectedStart = 0;
- if ($util.Long) {
- var long = new $util.Long(0, 0, true);
- object.rewardPerBlock = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.rewardPerBlock = options.longs === String ? "0" : 0;
- if ($util.Long) {
- var long = new $util.Long(0, 0, true);
- object.minApplicationStake = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long;
- } else
- object.minApplicationStake = options.longs === String ? "0" : 0;
- object.metadata = null;
- }
- if (message.expectedStart != null && message.hasOwnProperty("expectedStart"))
- object.expectedStart = message.expectedStart;
- if (message.rewardPerBlock != null && message.hasOwnProperty("rewardPerBlock"))
- if (typeof message.rewardPerBlock === "number")
- object.rewardPerBlock = options.longs === String ? String(message.rewardPerBlock) : message.rewardPerBlock;
- else
- 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;
- if (message.minApplicationStake != null && message.hasOwnProperty("minApplicationStake"))
- if (typeof message.minApplicationStake === "number")
- object.minApplicationStake = options.longs === String ? String(message.minApplicationStake) : message.minApplicationStake;
- else
- 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;
- if (message.metadata != null && message.hasOwnProperty("metadata"))
- object.metadata = $root.OpeningMetadata.toObject(message.metadata, options);
- return object;
- };
- /**
- * Converts this UpcomingOpeningMetadata to JSON.
- * @function toJSON
- * @memberof UpcomingOpeningMetadata
- * @instance
- * @returns {Object.<string,*>} JSON object
- */
- UpcomingOpeningMetadata.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- return UpcomingOpeningMetadata;
- })();
- $root.ApplicationMetadata = (function() {
- /**
- * Properties of an ApplicationMetadata.
- * @exports IApplicationMetadata
- * @interface IApplicationMetadata
- * @property {Array.<string>|null} [answers] ApplicationMetadata answers
- */
- /**
- * Constructs a new ApplicationMetadata.
- * @exports ApplicationMetadata
- * @classdesc Represents an ApplicationMetadata.
- * @implements IApplicationMetadata
- * @constructor
- * @param {IApplicationMetadata=} [properties] Properties to set
- */
- function ApplicationMetadata(properties) {
- this.answers = [];
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
- /**
- * ApplicationMetadata answers.
- * @member {Array.<string>} answers
- * @memberof ApplicationMetadata
- * @instance
- */
- ApplicationMetadata.prototype.answers = $util.emptyArray;
- /**
- * Creates a new ApplicationMetadata instance using the specified properties.
- * @function create
- * @memberof ApplicationMetadata
- * @static
- * @param {IApplicationMetadata=} [properties] Properties to set
- * @returns {ApplicationMetadata} ApplicationMetadata instance
- */
- ApplicationMetadata.create = function create(properties) {
- return new ApplicationMetadata(properties);
- };
- /**
- * Encodes the specified ApplicationMetadata message. Does not implicitly {@link ApplicationMetadata.verify|verify} messages.
- * @function encode
- * @memberof ApplicationMetadata
- * @static
- * @param {IApplicationMetadata} message ApplicationMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- ApplicationMetadata.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.answers != null && message.answers.length)
- for (var i = 0; i < message.answers.length; ++i)
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.answers[i]);
- return writer;
- };
- /**
- * Encodes the specified ApplicationMetadata message, length delimited. Does not implicitly {@link ApplicationMetadata.verify|verify} messages.
- * @function encodeDelimited
- * @memberof ApplicationMetadata
- * @static
- * @param {IApplicationMetadata} message ApplicationMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- ApplicationMetadata.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
- /**
- * Decodes an ApplicationMetadata message from the specified reader or buffer.
- * @function decode
- * @memberof ApplicationMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {ApplicationMetadata} ApplicationMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- ApplicationMetadata.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.ApplicationMetadata();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- if (!(message.answers && message.answers.length))
- message.answers = [];
- message.answers.push(reader.string());
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
- /**
- * Decodes an ApplicationMetadata message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof ApplicationMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {ApplicationMetadata} ApplicationMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- ApplicationMetadata.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
- /**
- * Verifies an ApplicationMetadata message.
- * @function verify
- * @memberof ApplicationMetadata
- * @static
- * @param {Object.<string,*>} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- ApplicationMetadata.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.answers != null && message.hasOwnProperty("answers")) {
- if (!Array.isArray(message.answers))
- return "answers: array expected";
- for (var i = 0; i < message.answers.length; ++i)
- if (!$util.isString(message.answers[i]))
- return "answers: string[] expected";
- }
- return null;
- };
- /**
- * Creates an ApplicationMetadata message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof ApplicationMetadata
- * @static
- * @param {Object.<string,*>} object Plain object
- * @returns {ApplicationMetadata} ApplicationMetadata
- */
- ApplicationMetadata.fromObject = function fromObject(object) {
- if (object instanceof $root.ApplicationMetadata)
- return object;
- var message = new $root.ApplicationMetadata();
- if (object.answers) {
- if (!Array.isArray(object.answers))
- throw TypeError(".ApplicationMetadata.answers: array expected");
- message.answers = [];
- for (var i = 0; i < object.answers.length; ++i)
- message.answers[i] = String(object.answers[i]);
- }
- return message;
- };
- /**
- * Creates a plain object from an ApplicationMetadata message. Also converts values to other types if specified.
- * @function toObject
- * @memberof ApplicationMetadata
- * @static
- * @param {ApplicationMetadata} message ApplicationMetadata
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.<string,*>} Plain object
- */
- ApplicationMetadata.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.arrays || options.defaults)
- object.answers = [];
- if (message.answers && message.answers.length) {
- object.answers = [];
- for (var j = 0; j < message.answers.length; ++j)
- object.answers[j] = message.answers[j];
- }
- return object;
- };
- /**
- * Converts this ApplicationMetadata to JSON.
- * @function toJSON
- * @memberof ApplicationMetadata
- * @instance
- * @returns {Object.<string,*>} JSON object
- */
- ApplicationMetadata.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- return ApplicationMetadata;
- })();
- $root.WorkingGroupMetadata = (function() {
- /**
- * Properties of a WorkingGroupMetadata.
- * @exports IWorkingGroupMetadata
- * @interface IWorkingGroupMetadata
- * @property {string|null} [description] WorkingGroupMetadata description
- * @property {string|null} [about] WorkingGroupMetadata about
- * @property {string|null} [status] WorkingGroupMetadata status
- * @property {string|null} [statusMessage] WorkingGroupMetadata statusMessage
- */
- /**
- * Constructs a new WorkingGroupMetadata.
- * @exports WorkingGroupMetadata
- * @classdesc Represents a WorkingGroupMetadata.
- * @implements IWorkingGroupMetadata
- * @constructor
- * @param {IWorkingGroupMetadata=} [properties] Properties to set
- */
- function WorkingGroupMetadata(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
- /**
- * WorkingGroupMetadata description.
- * @member {string} description
- * @memberof WorkingGroupMetadata
- * @instance
- */
- WorkingGroupMetadata.prototype.description = "";
- /**
- * WorkingGroupMetadata about.
- * @member {string} about
- * @memberof WorkingGroupMetadata
- * @instance
- */
- WorkingGroupMetadata.prototype.about = "";
- /**
- * WorkingGroupMetadata status.
- * @member {string} status
- * @memberof WorkingGroupMetadata
- * @instance
- */
- WorkingGroupMetadata.prototype.status = "";
- /**
- * WorkingGroupMetadata statusMessage.
- * @member {string} statusMessage
- * @memberof WorkingGroupMetadata
- * @instance
- */
- WorkingGroupMetadata.prototype.statusMessage = "";
- /**
- * Creates a new WorkingGroupMetadata instance using the specified properties.
- * @function create
- * @memberof WorkingGroupMetadata
- * @static
- * @param {IWorkingGroupMetadata=} [properties] Properties to set
- * @returns {WorkingGroupMetadata} WorkingGroupMetadata instance
- */
- WorkingGroupMetadata.create = function create(properties) {
- return new WorkingGroupMetadata(properties);
- };
- /**
- * Encodes the specified WorkingGroupMetadata message. Does not implicitly {@link WorkingGroupMetadata.verify|verify} messages.
- * @function encode
- * @memberof WorkingGroupMetadata
- * @static
- * @param {IWorkingGroupMetadata} message WorkingGroupMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- WorkingGroupMetadata.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.description != null && Object.hasOwnProperty.call(message, "description"))
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.description);
- if (message.about != null && Object.hasOwnProperty.call(message, "about"))
- writer.uint32(/* id 2, wireType 2 =*/18).string(message.about);
- if (message.status != null && Object.hasOwnProperty.call(message, "status"))
- writer.uint32(/* id 3, wireType 2 =*/26).string(message.status);
- if (message.statusMessage != null && Object.hasOwnProperty.call(message, "statusMessage"))
- writer.uint32(/* id 4, wireType 2 =*/34).string(message.statusMessage);
- return writer;
- };
- /**
- * Encodes the specified WorkingGroupMetadata message, length delimited. Does not implicitly {@link WorkingGroupMetadata.verify|verify} messages.
- * @function encodeDelimited
- * @memberof WorkingGroupMetadata
- * @static
- * @param {IWorkingGroupMetadata} message WorkingGroupMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- WorkingGroupMetadata.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
- /**
- * Decodes a WorkingGroupMetadata message from the specified reader or buffer.
- * @function decode
- * @memberof WorkingGroupMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {WorkingGroupMetadata} WorkingGroupMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- WorkingGroupMetadata.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.WorkingGroupMetadata();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.description = reader.string();
- break;
- case 2:
- message.about = reader.string();
- break;
- case 3:
- message.status = reader.string();
- break;
- case 4:
- message.statusMessage = reader.string();
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
- /**
- * Decodes a WorkingGroupMetadata message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof WorkingGroupMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {WorkingGroupMetadata} WorkingGroupMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- WorkingGroupMetadata.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
- /**
- * Verifies a WorkingGroupMetadata message.
- * @function verify
- * @memberof WorkingGroupMetadata
- * @static
- * @param {Object.<string,*>} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- WorkingGroupMetadata.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.description != null && message.hasOwnProperty("description"))
- if (!$util.isString(message.description))
- return "description: string expected";
- if (message.about != null && message.hasOwnProperty("about"))
- if (!$util.isString(message.about))
- return "about: string expected";
- if (message.status != null && message.hasOwnProperty("status"))
- if (!$util.isString(message.status))
- return "status: string expected";
- if (message.statusMessage != null && message.hasOwnProperty("statusMessage"))
- if (!$util.isString(message.statusMessage))
- return "statusMessage: string expected";
- return null;
- };
- /**
- * Creates a WorkingGroupMetadata message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof WorkingGroupMetadata
- * @static
- * @param {Object.<string,*>} object Plain object
- * @returns {WorkingGroupMetadata} WorkingGroupMetadata
- */
- WorkingGroupMetadata.fromObject = function fromObject(object) {
- if (object instanceof $root.WorkingGroupMetadata)
- return object;
- var message = new $root.WorkingGroupMetadata();
- if (object.description != null)
- message.description = String(object.description);
- if (object.about != null)
- message.about = String(object.about);
- if (object.status != null)
- message.status = String(object.status);
- if (object.statusMessage != null)
- message.statusMessage = String(object.statusMessage);
- return message;
- };
- /**
- * Creates a plain object from a WorkingGroupMetadata message. Also converts values to other types if specified.
- * @function toObject
- * @memberof WorkingGroupMetadata
- * @static
- * @param {WorkingGroupMetadata} message WorkingGroupMetadata
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.<string,*>} Plain object
- */
- WorkingGroupMetadata.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults) {
- object.description = "";
- object.about = "";
- object.status = "";
- object.statusMessage = "";
- }
- if (message.description != null && message.hasOwnProperty("description"))
- object.description = message.description;
- if (message.about != null && message.hasOwnProperty("about"))
- object.about = message.about;
- if (message.status != null && message.hasOwnProperty("status"))
- object.status = message.status;
- if (message.statusMessage != null && message.hasOwnProperty("statusMessage"))
- object.statusMessage = message.statusMessage;
- return object;
- };
- /**
- * Converts this WorkingGroupMetadata to JSON.
- * @function toJSON
- * @memberof WorkingGroupMetadata
- * @instance
- * @returns {Object.<string,*>} JSON object
- */
- WorkingGroupMetadata.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- return WorkingGroupMetadata;
- })();
- $root.SetGroupMetadata = (function() {
- /**
- * Properties of a SetGroupMetadata.
- * @exports ISetGroupMetadata
- * @interface ISetGroupMetadata
- * @property {IWorkingGroupMetadata|null} [newMetadata] SetGroupMetadata newMetadata
- */
- /**
- * Constructs a new SetGroupMetadata.
- * @exports SetGroupMetadata
- * @classdesc Represents a SetGroupMetadata.
- * @implements ISetGroupMetadata
- * @constructor
- * @param {ISetGroupMetadata=} [properties] Properties to set
- */
- function SetGroupMetadata(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
- /**
- * SetGroupMetadata newMetadata.
- * @member {IWorkingGroupMetadata|null|undefined} newMetadata
- * @memberof SetGroupMetadata
- * @instance
- */
- SetGroupMetadata.prototype.newMetadata = null;
- /**
- * Creates a new SetGroupMetadata instance using the specified properties.
- * @function create
- * @memberof SetGroupMetadata
- * @static
- * @param {ISetGroupMetadata=} [properties] Properties to set
- * @returns {SetGroupMetadata} SetGroupMetadata instance
- */
- SetGroupMetadata.create = function create(properties) {
- return new SetGroupMetadata(properties);
- };
- /**
- * Encodes the specified SetGroupMetadata message. Does not implicitly {@link SetGroupMetadata.verify|verify} messages.
- * @function encode
- * @memberof SetGroupMetadata
- * @static
- * @param {ISetGroupMetadata} message SetGroupMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- SetGroupMetadata.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.newMetadata != null && Object.hasOwnProperty.call(message, "newMetadata"))
- $root.WorkingGroupMetadata.encode(message.newMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- return writer;
- };
- /**
- * Encodes the specified SetGroupMetadata message, length delimited. Does not implicitly {@link SetGroupMetadata.verify|verify} messages.
- * @function encodeDelimited
- * @memberof SetGroupMetadata
- * @static
- * @param {ISetGroupMetadata} message SetGroupMetadata message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- SetGroupMetadata.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
- /**
- * Decodes a SetGroupMetadata message from the specified reader or buffer.
- * @function decode
- * @memberof SetGroupMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {SetGroupMetadata} SetGroupMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- SetGroupMetadata.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.SetGroupMetadata();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.newMetadata = $root.WorkingGroupMetadata.decode(reader, reader.uint32());
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
- /**
- * Decodes a SetGroupMetadata message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof SetGroupMetadata
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {SetGroupMetadata} SetGroupMetadata
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- SetGroupMetadata.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
- /**
- * Verifies a SetGroupMetadata message.
- * @function verify
- * @memberof SetGroupMetadata
- * @static
- * @param {Object.<string,*>} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- SetGroupMetadata.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.newMetadata != null && message.hasOwnProperty("newMetadata")) {
- var error = $root.WorkingGroupMetadata.verify(message.newMetadata);
- if (error)
- return "newMetadata." + error;
- }
- return null;
- };
- /**
- * Creates a SetGroupMetadata message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof SetGroupMetadata
- * @static
- * @param {Object.<string,*>} object Plain object
- * @returns {SetGroupMetadata} SetGroupMetadata
- */
- SetGroupMetadata.fromObject = function fromObject(object) {
- if (object instanceof $root.SetGroupMetadata)
- return object;
- var message = new $root.SetGroupMetadata();
- if (object.newMetadata != null) {
- if (typeof object.newMetadata !== "object")
- throw TypeError(".SetGroupMetadata.newMetadata: object expected");
- message.newMetadata = $root.WorkingGroupMetadata.fromObject(object.newMetadata);
- }
- return message;
- };
- /**
- * Creates a plain object from a SetGroupMetadata message. Also converts values to other types if specified.
- * @function toObject
- * @memberof SetGroupMetadata
- * @static
- * @param {SetGroupMetadata} message SetGroupMetadata
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.<string,*>} Plain object
- */
- SetGroupMetadata.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.newMetadata = null;
- if (message.newMetadata != null && message.hasOwnProperty("newMetadata"))
- object.newMetadata = $root.WorkingGroupMetadata.toObject(message.newMetadata, options);
- return object;
- };
- /**
- * Converts this SetGroupMetadata to JSON.
- * @function toJSON
- * @memberof SetGroupMetadata
- * @instance
- * @returns {Object.<string,*>} JSON object
- */
- SetGroupMetadata.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- return SetGroupMetadata;
- })();
- $root.AddUpcomingOpening = (function() {
- /**
- * Properties of an AddUpcomingOpening.
- * @exports IAddUpcomingOpening
- * @interface IAddUpcomingOpening
- * @property {IUpcomingOpeningMetadata|null} [metadata] AddUpcomingOpening metadata
- */
- /**
- * Constructs a new AddUpcomingOpening.
- * @exports AddUpcomingOpening
- * @classdesc Represents an AddUpcomingOpening.
- * @implements IAddUpcomingOpening
- * @constructor
- * @param {IAddUpcomingOpening=} [properties] Properties to set
- */
- function AddUpcomingOpening(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
- /**
- * AddUpcomingOpening metadata.
- * @member {IUpcomingOpeningMetadata|null|undefined} metadata
- * @memberof AddUpcomingOpening
- * @instance
- */
- AddUpcomingOpening.prototype.metadata = null;
- /**
- * Creates a new AddUpcomingOpening instance using the specified properties.
- * @function create
- * @memberof AddUpcomingOpening
- * @static
- * @param {IAddUpcomingOpening=} [properties] Properties to set
- * @returns {AddUpcomingOpening} AddUpcomingOpening instance
- */
- AddUpcomingOpening.create = function create(properties) {
- return new AddUpcomingOpening(properties);
- };
- /**
- * Encodes the specified AddUpcomingOpening message. Does not implicitly {@link AddUpcomingOpening.verify|verify} messages.
- * @function encode
- * @memberof AddUpcomingOpening
- * @static
- * @param {IAddUpcomingOpening} message AddUpcomingOpening message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- AddUpcomingOpening.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata"))
- $root.UpcomingOpeningMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- return writer;
- };
- /**
- * Encodes the specified AddUpcomingOpening message, length delimited. Does not implicitly {@link AddUpcomingOpening.verify|verify} messages.
- * @function encodeDelimited
- * @memberof AddUpcomingOpening
- * @static
- * @param {IAddUpcomingOpening} message AddUpcomingOpening message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- AddUpcomingOpening.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
- /**
- * Decodes an AddUpcomingOpening message from the specified reader or buffer.
- * @function decode
- * @memberof AddUpcomingOpening
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {AddUpcomingOpening} AddUpcomingOpening
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- AddUpcomingOpening.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.AddUpcomingOpening();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.metadata = $root.UpcomingOpeningMetadata.decode(reader, reader.uint32());
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
- /**
- * Decodes an AddUpcomingOpening message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof AddUpcomingOpening
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {AddUpcomingOpening} AddUpcomingOpening
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- AddUpcomingOpening.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
- /**
- * Verifies an AddUpcomingOpening message.
- * @function verify
- * @memberof AddUpcomingOpening
- * @static
- * @param {Object.<string,*>} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- AddUpcomingOpening.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.metadata != null && message.hasOwnProperty("metadata")) {
- var error = $root.UpcomingOpeningMetadata.verify(message.metadata);
- if (error)
- return "metadata." + error;
- }
- return null;
- };
- /**
- * Creates an AddUpcomingOpening message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof AddUpcomingOpening
- * @static
- * @param {Object.<string,*>} object Plain object
- * @returns {AddUpcomingOpening} AddUpcomingOpening
- */
- AddUpcomingOpening.fromObject = function fromObject(object) {
- if (object instanceof $root.AddUpcomingOpening)
- return object;
- var message = new $root.AddUpcomingOpening();
- if (object.metadata != null) {
- if (typeof object.metadata !== "object")
- throw TypeError(".AddUpcomingOpening.metadata: object expected");
- message.metadata = $root.UpcomingOpeningMetadata.fromObject(object.metadata);
- }
- return message;
- };
- /**
- * Creates a plain object from an AddUpcomingOpening message. Also converts values to other types if specified.
- * @function toObject
- * @memberof AddUpcomingOpening
- * @static
- * @param {AddUpcomingOpening} message AddUpcomingOpening
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.<string,*>} Plain object
- */
- AddUpcomingOpening.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.metadata = null;
- if (message.metadata != null && message.hasOwnProperty("metadata"))
- object.metadata = $root.UpcomingOpeningMetadata.toObject(message.metadata, options);
- return object;
- };
- /**
- * Converts this AddUpcomingOpening to JSON.
- * @function toJSON
- * @memberof AddUpcomingOpening
- * @instance
- * @returns {Object.<string,*>} JSON object
- */
- AddUpcomingOpening.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- return AddUpcomingOpening;
- })();
- $root.RemoveUpcomingOpening = (function() {
- /**
- * Properties of a RemoveUpcomingOpening.
- * @exports IRemoveUpcomingOpening
- * @interface IRemoveUpcomingOpening
- * @property {string|null} [id] RemoveUpcomingOpening id
- */
- /**
- * Constructs a new RemoveUpcomingOpening.
- * @exports RemoveUpcomingOpening
- * @classdesc Represents a RemoveUpcomingOpening.
- * @implements IRemoveUpcomingOpening
- * @constructor
- * @param {IRemoveUpcomingOpening=} [properties] Properties to set
- */
- function RemoveUpcomingOpening(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
- /**
- * RemoveUpcomingOpening id.
- * @member {string} id
- * @memberof RemoveUpcomingOpening
- * @instance
- */
- RemoveUpcomingOpening.prototype.id = "";
- /**
- * Creates a new RemoveUpcomingOpening instance using the specified properties.
- * @function create
- * @memberof RemoveUpcomingOpening
- * @static
- * @param {IRemoveUpcomingOpening=} [properties] Properties to set
- * @returns {RemoveUpcomingOpening} RemoveUpcomingOpening instance
- */
- RemoveUpcomingOpening.create = function create(properties) {
- return new RemoveUpcomingOpening(properties);
- };
- /**
- * Encodes the specified RemoveUpcomingOpening message. Does not implicitly {@link RemoveUpcomingOpening.verify|verify} messages.
- * @function encode
- * @memberof RemoveUpcomingOpening
- * @static
- * @param {IRemoveUpcomingOpening} message RemoveUpcomingOpening message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- RemoveUpcomingOpening.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.id != null && Object.hasOwnProperty.call(message, "id"))
- writer.uint32(/* id 1, wireType 2 =*/10).string(message.id);
- return writer;
- };
- /**
- * Encodes the specified RemoveUpcomingOpening message, length delimited. Does not implicitly {@link RemoveUpcomingOpening.verify|verify} messages.
- * @function encodeDelimited
- * @memberof RemoveUpcomingOpening
- * @static
- * @param {IRemoveUpcomingOpening} message RemoveUpcomingOpening message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- RemoveUpcomingOpening.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
- /**
- * Decodes a RemoveUpcomingOpening message from the specified reader or buffer.
- * @function decode
- * @memberof RemoveUpcomingOpening
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {RemoveUpcomingOpening} RemoveUpcomingOpening
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- RemoveUpcomingOpening.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.RemoveUpcomingOpening();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.id = reader.string();
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
- /**
- * Decodes a RemoveUpcomingOpening message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof RemoveUpcomingOpening
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {RemoveUpcomingOpening} RemoveUpcomingOpening
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- RemoveUpcomingOpening.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
- /**
- * Verifies a RemoveUpcomingOpening message.
- * @function verify
- * @memberof RemoveUpcomingOpening
- * @static
- * @param {Object.<string,*>} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- RemoveUpcomingOpening.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- if (message.id != null && message.hasOwnProperty("id"))
- if (!$util.isString(message.id))
- return "id: string expected";
- return null;
- };
- /**
- * Creates a RemoveUpcomingOpening message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof RemoveUpcomingOpening
- * @static
- * @param {Object.<string,*>} object Plain object
- * @returns {RemoveUpcomingOpening} RemoveUpcomingOpening
- */
- RemoveUpcomingOpening.fromObject = function fromObject(object) {
- if (object instanceof $root.RemoveUpcomingOpening)
- return object;
- var message = new $root.RemoveUpcomingOpening();
- if (object.id != null)
- message.id = String(object.id);
- return message;
- };
- /**
- * Creates a plain object from a RemoveUpcomingOpening message. Also converts values to other types if specified.
- * @function toObject
- * @memberof RemoveUpcomingOpening
- * @static
- * @param {RemoveUpcomingOpening} message RemoveUpcomingOpening
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.<string,*>} Plain object
- */
- RemoveUpcomingOpening.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (options.defaults)
- object.id = "";
- if (message.id != null && message.hasOwnProperty("id"))
- object.id = message.id;
- return object;
- };
- /**
- * Converts this RemoveUpcomingOpening to JSON.
- * @function toJSON
- * @memberof RemoveUpcomingOpening
- * @instance
- * @returns {Object.<string,*>} JSON object
- */
- RemoveUpcomingOpening.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- return RemoveUpcomingOpening;
- })();
- $root.WorkingGroupMetadataAction = (function() {
- /**
- * Properties of a WorkingGroupMetadataAction.
- * @exports IWorkingGroupMetadataAction
- * @interface IWorkingGroupMetadataAction
- * @property {ISetGroupMetadata|null} [setGroupMetadata] WorkingGroupMetadataAction setGroupMetadata
- * @property {IAddUpcomingOpening|null} [addUpcomingOpening] WorkingGroupMetadataAction addUpcomingOpening
- * @property {IRemoveUpcomingOpening|null} [removeUpcomingOpening] WorkingGroupMetadataAction removeUpcomingOpening
- */
- /**
- * Constructs a new WorkingGroupMetadataAction.
- * @exports WorkingGroupMetadataAction
- * @classdesc Represents a WorkingGroupMetadataAction.
- * @implements IWorkingGroupMetadataAction
- * @constructor
- * @param {IWorkingGroupMetadataAction=} [properties] Properties to set
- */
- function WorkingGroupMetadataAction(properties) {
- if (properties)
- for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i)
- if (properties[keys[i]] != null)
- this[keys[i]] = properties[keys[i]];
- }
- /**
- * WorkingGroupMetadataAction setGroupMetadata.
- * @member {ISetGroupMetadata|null|undefined} setGroupMetadata
- * @memberof WorkingGroupMetadataAction
- * @instance
- */
- WorkingGroupMetadataAction.prototype.setGroupMetadata = null;
- /**
- * WorkingGroupMetadataAction addUpcomingOpening.
- * @member {IAddUpcomingOpening|null|undefined} addUpcomingOpening
- * @memberof WorkingGroupMetadataAction
- * @instance
- */
- WorkingGroupMetadataAction.prototype.addUpcomingOpening = null;
- /**
- * WorkingGroupMetadataAction removeUpcomingOpening.
- * @member {IRemoveUpcomingOpening|null|undefined} removeUpcomingOpening
- * @memberof WorkingGroupMetadataAction
- * @instance
- */
- WorkingGroupMetadataAction.prototype.removeUpcomingOpening = null;
- // OneOf field names bound to virtual getters and setters
- var $oneOfFields;
- /**
- * WorkingGroupMetadataAction action.
- * @member {"setGroupMetadata"|"addUpcomingOpening"|"removeUpcomingOpening"|undefined} action
- * @memberof WorkingGroupMetadataAction
- * @instance
- */
- Object.defineProperty(WorkingGroupMetadataAction.prototype, "action", {
- get: $util.oneOfGetter($oneOfFields = ["setGroupMetadata", "addUpcomingOpening", "removeUpcomingOpening"]),
- set: $util.oneOfSetter($oneOfFields)
- });
- /**
- * Creates a new WorkingGroupMetadataAction instance using the specified properties.
- * @function create
- * @memberof WorkingGroupMetadataAction
- * @static
- * @param {IWorkingGroupMetadataAction=} [properties] Properties to set
- * @returns {WorkingGroupMetadataAction} WorkingGroupMetadataAction instance
- */
- WorkingGroupMetadataAction.create = function create(properties) {
- return new WorkingGroupMetadataAction(properties);
- };
- /**
- * Encodes the specified WorkingGroupMetadataAction message. Does not implicitly {@link WorkingGroupMetadataAction.verify|verify} messages.
- * @function encode
- * @memberof WorkingGroupMetadataAction
- * @static
- * @param {IWorkingGroupMetadataAction} message WorkingGroupMetadataAction message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- WorkingGroupMetadataAction.encode = function encode(message, writer) {
- if (!writer)
- writer = $Writer.create();
- if (message.setGroupMetadata != null && Object.hasOwnProperty.call(message, "setGroupMetadata"))
- $root.SetGroupMetadata.encode(message.setGroupMetadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim();
- if (message.addUpcomingOpening != null && Object.hasOwnProperty.call(message, "addUpcomingOpening"))
- $root.AddUpcomingOpening.encode(message.addUpcomingOpening, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim();
- if (message.removeUpcomingOpening != null && Object.hasOwnProperty.call(message, "removeUpcomingOpening"))
- $root.RemoveUpcomingOpening.encode(message.removeUpcomingOpening, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim();
- return writer;
- };
- /**
- * Encodes the specified WorkingGroupMetadataAction message, length delimited. Does not implicitly {@link WorkingGroupMetadataAction.verify|verify} messages.
- * @function encodeDelimited
- * @memberof WorkingGroupMetadataAction
- * @static
- * @param {IWorkingGroupMetadataAction} message WorkingGroupMetadataAction message or plain object to encode
- * @param {$protobuf.Writer} [writer] Writer to encode to
- * @returns {$protobuf.Writer} Writer
- */
- WorkingGroupMetadataAction.encodeDelimited = function encodeDelimited(message, writer) {
- return this.encode(message, writer).ldelim();
- };
- /**
- * Decodes a WorkingGroupMetadataAction message from the specified reader or buffer.
- * @function decode
- * @memberof WorkingGroupMetadataAction
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @param {number} [length] Message length if known beforehand
- * @returns {WorkingGroupMetadataAction} WorkingGroupMetadataAction
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- WorkingGroupMetadataAction.decode = function decode(reader, length) {
- if (!(reader instanceof $Reader))
- reader = $Reader.create(reader);
- var end = length === undefined ? reader.len : reader.pos + length, message = new $root.WorkingGroupMetadataAction();
- while (reader.pos < end) {
- var tag = reader.uint32();
- switch (tag >>> 3) {
- case 1:
- message.setGroupMetadata = $root.SetGroupMetadata.decode(reader, reader.uint32());
- break;
- case 2:
- message.addUpcomingOpening = $root.AddUpcomingOpening.decode(reader, reader.uint32());
- break;
- case 3:
- message.removeUpcomingOpening = $root.RemoveUpcomingOpening.decode(reader, reader.uint32());
- break;
- default:
- reader.skipType(tag & 7);
- break;
- }
- }
- return message;
- };
- /**
- * Decodes a WorkingGroupMetadataAction message from the specified reader or buffer, length delimited.
- * @function decodeDelimited
- * @memberof WorkingGroupMetadataAction
- * @static
- * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from
- * @returns {WorkingGroupMetadataAction} WorkingGroupMetadataAction
- * @throws {Error} If the payload is not a reader or valid buffer
- * @throws {$protobuf.util.ProtocolError} If required fields are missing
- */
- WorkingGroupMetadataAction.decodeDelimited = function decodeDelimited(reader) {
- if (!(reader instanceof $Reader))
- reader = new $Reader(reader);
- return this.decode(reader, reader.uint32());
- };
- /**
- * Verifies a WorkingGroupMetadataAction message.
- * @function verify
- * @memberof WorkingGroupMetadataAction
- * @static
- * @param {Object.<string,*>} message Plain object to verify
- * @returns {string|null} `null` if valid, otherwise the reason why it is not
- */
- WorkingGroupMetadataAction.verify = function verify(message) {
- if (typeof message !== "object" || message === null)
- return "object expected";
- var properties = {};
- if (message.setGroupMetadata != null && message.hasOwnProperty("setGroupMetadata")) {
- properties.action = 1;
- {
- var error = $root.SetGroupMetadata.verify(message.setGroupMetadata);
- if (error)
- return "setGroupMetadata." + error;
- }
- }
- if (message.addUpcomingOpening != null && message.hasOwnProperty("addUpcomingOpening")) {
- if (properties.action === 1)
- return "action: multiple values";
- properties.action = 1;
- {
- var error = $root.AddUpcomingOpening.verify(message.addUpcomingOpening);
- if (error)
- return "addUpcomingOpening." + error;
- }
- }
- if (message.removeUpcomingOpening != null && message.hasOwnProperty("removeUpcomingOpening")) {
- if (properties.action === 1)
- return "action: multiple values";
- properties.action = 1;
- {
- var error = $root.RemoveUpcomingOpening.verify(message.removeUpcomingOpening);
- if (error)
- return "removeUpcomingOpening." + error;
- }
- }
- return null;
- };
- /**
- * Creates a WorkingGroupMetadataAction message from a plain object. Also converts values to their respective internal types.
- * @function fromObject
- * @memberof WorkingGroupMetadataAction
- * @static
- * @param {Object.<string,*>} object Plain object
- * @returns {WorkingGroupMetadataAction} WorkingGroupMetadataAction
- */
- WorkingGroupMetadataAction.fromObject = function fromObject(object) {
- if (object instanceof $root.WorkingGroupMetadataAction)
- return object;
- var message = new $root.WorkingGroupMetadataAction();
- if (object.setGroupMetadata != null) {
- if (typeof object.setGroupMetadata !== "object")
- throw TypeError(".WorkingGroupMetadataAction.setGroupMetadata: object expected");
- message.setGroupMetadata = $root.SetGroupMetadata.fromObject(object.setGroupMetadata);
- }
- if (object.addUpcomingOpening != null) {
- if (typeof object.addUpcomingOpening !== "object")
- throw TypeError(".WorkingGroupMetadataAction.addUpcomingOpening: object expected");
- message.addUpcomingOpening = $root.AddUpcomingOpening.fromObject(object.addUpcomingOpening);
- }
- if (object.removeUpcomingOpening != null) {
- if (typeof object.removeUpcomingOpening !== "object")
- throw TypeError(".WorkingGroupMetadataAction.removeUpcomingOpening: object expected");
- message.removeUpcomingOpening = $root.RemoveUpcomingOpening.fromObject(object.removeUpcomingOpening);
- }
- return message;
- };
- /**
- * Creates a plain object from a WorkingGroupMetadataAction message. Also converts values to other types if specified.
- * @function toObject
- * @memberof WorkingGroupMetadataAction
- * @static
- * @param {WorkingGroupMetadataAction} message WorkingGroupMetadataAction
- * @param {$protobuf.IConversionOptions} [options] Conversion options
- * @returns {Object.<string,*>} Plain object
- */
- WorkingGroupMetadataAction.toObject = function toObject(message, options) {
- if (!options)
- options = {};
- var object = {};
- if (message.setGroupMetadata != null && message.hasOwnProperty("setGroupMetadata")) {
- object.setGroupMetadata = $root.SetGroupMetadata.toObject(message.setGroupMetadata, options);
- if (options.oneofs)
- object.action = "setGroupMetadata";
- }
- if (message.addUpcomingOpening != null && message.hasOwnProperty("addUpcomingOpening")) {
- object.addUpcomingOpening = $root.AddUpcomingOpening.toObject(message.addUpcomingOpening, options);
- if (options.oneofs)
- object.action = "addUpcomingOpening";
- }
- if (message.removeUpcomingOpening != null && message.hasOwnProperty("removeUpcomingOpening")) {
- object.removeUpcomingOpening = $root.RemoveUpcomingOpening.toObject(message.removeUpcomingOpening, options);
- if (options.oneofs)
- object.action = "removeUpcomingOpening";
- }
- return object;
- };
- /**
- * Converts this WorkingGroupMetadataAction to JSON.
- * @function toJSON
- * @memberof WorkingGroupMetadataAction
- * @instance
- * @returns {Object.<string,*>} JSON object
- */
- WorkingGroupMetadataAction.prototype.toJSON = function toJSON() {
- return this.constructor.toObject(this, $protobuf.util.toJSONOptions);
- };
- return WorkingGroupMetadataAction;
- })();
- module.exports = $root;
|