ProtoBuf.Builder.Message.html 70 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: Class: Message</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">Class: Message</h1>
  17. <section>
  18. <header>
  19. <h2>
  20. <span class="ancestors"><a href="ProtoBuf.html">ProtoBuf</a><a href="ProtoBuf.Builder.html">.Builder</a>.</span>
  21. Message
  22. </h2>
  23. <div class="class-description"><p>Barebone of all runtime messages.</p></div>
  24. </header>
  25. <article>
  26. <div class="container-overview">
  27. <h2>Constructor</h2>
  28. <h4 class="name" id="Message"><span class="type-signature"></span>new Message<span class="signature">(values, &hellip;var_args)</span><span class="type-signature"></span></h4>
  29. <div class="description">
  30. <p>Constructs a new runtime Message.</p>
  31. </div>
  32. <h5>Parameters:</h5>
  33. <table class="params">
  34. <thead>
  35. <tr>
  36. <th>Name</th>
  37. <th>Type</th>
  38. <th>Attributes</th>
  39. <th class="last">Description</th>
  40. </tr>
  41. </thead>
  42. <tbody>
  43. <tr>
  44. <td class="name"><code>values</code></td>
  45. <td class="type">
  46. <span class="param-type">!Object.&lt;string, *></span>
  47. |
  48. <span class="param-type">string</span>
  49. </td>
  50. <td class="attributes">
  51. </td>
  52. <td class="description last"><p>Preset values</p></td>
  53. </tr>
  54. <tr>
  55. <td class="name"><code>var_args</code></td>
  56. <td class="type">
  57. <span class="param-type">string</span>
  58. </td>
  59. <td class="attributes">
  60. &lt;repeatable><br>
  61. </td>
  62. <td class="description last"></td>
  63. </tr>
  64. </tbody>
  65. </table>
  66. <dl class="details">
  67. <dt class="tag-source">Source:</dt>
  68. <dd class="tag-source"><ul class="dummy"><li>
  69. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2375">line 2375</a>
  70. </li></ul></dd>
  71. </dl>
  72. <h5>Throws:</h5>
  73. <dl>
  74. <dt>
  75. <div class="param-desc">
  76. <p>If the message cannot be created</p>
  77. </div>
  78. </dt>
  79. <dd></dd>
  80. <dt>
  81. <dl>
  82. <dt>
  83. Type
  84. </dt>
  85. <dd>
  86. <span class="param-type">Error</span>
  87. </dd>
  88. </dl>
  89. </dt>
  90. <dd></dd>
  91. </dl>
  92. </div>
  93. <h3 class="subsection-title">Members</h3>
  94. <h4 class="name" id=".$options"><span class="type-signature">(static) </span>$options<span class="type-signature"> :Object.&lt;string, *></span></h4>
  95. <div class="description">
  96. <p>Message options.</p>
  97. </div>
  98. <h5>Type:</h5>
  99. <ul>
  100. <li>
  101. <span class="param-type">Object.&lt;string, *></span>
  102. </li>
  103. </ul>
  104. <dl class="details">
  105. <dt class="tag-source">Source:</dt>
  106. <dd class="tag-source"><ul class="dummy"><li>
  107. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3052">line 3052</a>
  108. </li></ul></dd>
  109. </dl>
  110. <h4 class="name" id=".$type"><span class="type-signature">(static, non-null) </span>$type<span class="type-signature"> :<a href="ProtoBuf.Reflect.Message.html">ProtoBuf.Reflect.Message</a></span></h4>
  111. <div class="description">
  112. <p>Reflection type.</p>
  113. </div>
  114. <h5>Type:</h5>
  115. <ul>
  116. <li>
  117. <span class="param-type"><a href="ProtoBuf.Reflect.Message.html">ProtoBuf.Reflect.Message</a></span>
  118. </li>
  119. </ul>
  120. <dl class="details">
  121. <dt class="tag-source">Source:</dt>
  122. <dd class="tag-source"><ul class="dummy"><li>
  123. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3068">line 3068</a>
  124. </li></ul></dd>
  125. </dl>
  126. <h4 class="name" id="$options"><span class="type-signature"></span>$options<span class="type-signature"> :Object.&lt;string, *></span></h4>
  127. <div class="description">
  128. <p>Message options.</p>
  129. </div>
  130. <h5>Type:</h5>
  131. <ul>
  132. <li>
  133. <span class="param-type">Object.&lt;string, *></span>
  134. </li>
  135. </ul>
  136. <dl class="details">
  137. <dt class="tag-source">Source:</dt>
  138. <dd class="tag-source"><ul class="dummy"><li>
  139. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3060">line 3060</a>
  140. </li></ul></dd>
  141. </dl>
  142. <h4 class="name" id="$type"><span class="type-signature">(non-null) </span>$type<span class="type-signature"> :<a href="ProtoBuf.Reflect.Message.html">ProtoBuf.Reflect.Message</a></span></h4>
  143. <div class="description">
  144. <p>Reflection type.</p>
  145. </div>
  146. <h5>Type:</h5>
  147. <ul>
  148. <li>
  149. <span class="param-type"><a href="ProtoBuf.Reflect.Message.html">ProtoBuf.Reflect.Message</a></span>
  150. </li>
  151. </ul>
  152. <dl class="details">
  153. <dt class="tag-source">Source:</dt>
  154. <dd class="tag-source"><ul class="dummy"><li>
  155. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3076">line 3076</a>
  156. </li></ul></dd>
  157. </dl>
  158. <h3 class="subsection-title">Methods</h3>
  159. <h4 class="name" id=".decode"><span class="type-signature">(static) </span>decode<span class="signature">(buffer, length<span class="signature-attributes">opt</span>, enc<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
  160. <div class="description">
  161. <p>Decodes a message from the specified buffer or string.</p>
  162. </div>
  163. <h5>Parameters:</h5>
  164. <table class="params">
  165. <thead>
  166. <tr>
  167. <th>Name</th>
  168. <th>Type</th>
  169. <th>Attributes</th>
  170. <th class="last">Description</th>
  171. </tr>
  172. </thead>
  173. <tbody>
  174. <tr>
  175. <td class="name"><code>buffer</code></td>
  176. <td class="type">
  177. <span class="param-type">ByteBuffer</span>
  178. |
  179. <span class="param-type">ArrayBuffer</span>
  180. |
  181. <span class="param-type">Buffer</span>
  182. |
  183. <span class="param-type">string</span>
  184. </td>
  185. <td class="attributes">
  186. </td>
  187. <td class="description last"><p>Buffer to decode from</p></td>
  188. </tr>
  189. <tr>
  190. <td class="name"><code>length</code></td>
  191. <td class="type">
  192. <span class="param-type">number</span>
  193. |
  194. <span class="param-type">string</span>
  195. </td>
  196. <td class="attributes">
  197. &lt;optional><br>
  198. </td>
  199. <td class="description last"><p>Message length. Defaults to decode all the remainig data.</p></td>
  200. </tr>
  201. <tr>
  202. <td class="name"><code>enc</code></td>
  203. <td class="type">
  204. <span class="param-type">string</span>
  205. </td>
  206. <td class="attributes">
  207. &lt;optional><br>
  208. </td>
  209. <td class="description last"><p>Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64</p></td>
  210. </tr>
  211. </tbody>
  212. </table>
  213. <dl class="details">
  214. <dt class="tag-source">Source:</dt>
  215. <dd class="tag-source"><ul class="dummy"><li>
  216. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2928">line 2928</a>
  217. </li></ul></dd>
  218. <dt class="tag-see">See:</dt>
  219. <dd class="tag-see">
  220. <ul>
  221. <li><a href="ProtoBuf.Builder.Message.html#.decode64">ProtoBuf.Builder.Message.decode64</a></li>
  222. <li><a href="ProtoBuf.Builder.Message.html#.decodeHex">ProtoBuf.Builder.Message.decodeHex</a></li>
  223. </ul>
  224. </dd>
  225. </dl>
  226. <h5>Throws:</h5>
  227. <dl>
  228. <dt>
  229. <div class="param-desc">
  230. <p>If the message cannot be decoded or if required fields are missing. The later still
  231. returns the decoded message with missing fields in the <code>decoded</code> property on the error.</p>
  232. </div>
  233. </dt>
  234. <dd></dd>
  235. <dt>
  236. <dl>
  237. <dt>
  238. Type
  239. </dt>
  240. <dd>
  241. <span class="param-type">Error</span>
  242. </dd>
  243. </dl>
  244. </dt>
  245. <dd></dd>
  246. </dl>
  247. <h5>Returns:</h5>
  248. <div class="param-desc">
  249. <p>Decoded message</p>
  250. </div>
  251. <dl>
  252. <dt>
  253. Type
  254. </dt>
  255. <dd>
  256. <span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
  257. </dd>
  258. </dl>
  259. <h4 class="name" id=".decode64"><span class="type-signature">(static) </span>decode64<span class="signature">(str)</span><span class="type-signature"> &rarr; (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
  260. <div class="description">
  261. <p>Decodes the message from the specified base64 encoded string.</p>
  262. </div>
  263. <h5>Parameters:</h5>
  264. <table class="params">
  265. <thead>
  266. <tr>
  267. <th>Name</th>
  268. <th>Type</th>
  269. <th class="last">Description</th>
  270. </tr>
  271. </thead>
  272. <tbody>
  273. <tr>
  274. <td class="name"><code>str</code></td>
  275. <td class="type">
  276. <span class="param-type">string</span>
  277. </td>
  278. <td class="description last"><p>String to decode from</p></td>
  279. </tr>
  280. </tbody>
  281. </table>
  282. <dl class="details">
  283. <dt class="tag-source">Source:</dt>
  284. <dd class="tag-source"><ul class="dummy"><li>
  285. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2995">line 2995</a>
  286. </li></ul></dd>
  287. </dl>
  288. <h5>Throws:</h5>
  289. <dl>
  290. <dt>
  291. <div class="param-desc">
  292. <p>If the message cannot be decoded or if required fields are missing. The later still
  293. returns the decoded message with missing fields in the <code>decoded</code> property on the error.</p>
  294. </div>
  295. </dt>
  296. <dd></dd>
  297. <dt>
  298. <dl>
  299. <dt>
  300. Type
  301. </dt>
  302. <dd>
  303. <span class="param-type">Error</span>
  304. </dd>
  305. </dl>
  306. </dt>
  307. <dd></dd>
  308. </dl>
  309. <h5>Returns:</h5>
  310. <div class="param-desc">
  311. <p>Decoded message</p>
  312. </div>
  313. <dl>
  314. <dt>
  315. Type
  316. </dt>
  317. <dd>
  318. <span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
  319. </dd>
  320. </dl>
  321. <h4 class="name" id=".decodeDelimited"><span class="type-signature">(static) </span>decodeDelimited<span class="signature">(buffer, enc<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
  322. <div class="description">
  323. <p>Decodes a varint32 length-delimited message from the specified buffer or string.</p>
  324. </div>
  325. <h5>Parameters:</h5>
  326. <table class="params">
  327. <thead>
  328. <tr>
  329. <th>Name</th>
  330. <th>Type</th>
  331. <th>Attributes</th>
  332. <th class="last">Description</th>
  333. </tr>
  334. </thead>
  335. <tbody>
  336. <tr>
  337. <td class="name"><code>buffer</code></td>
  338. <td class="type">
  339. <span class="param-type">ByteBuffer</span>
  340. |
  341. <span class="param-type">ArrayBuffer</span>
  342. |
  343. <span class="param-type">Buffer</span>
  344. |
  345. <span class="param-type">string</span>
  346. </td>
  347. <td class="attributes">
  348. </td>
  349. <td class="description last"><p>Buffer to decode from</p></td>
  350. </tr>
  351. <tr>
  352. <td class="name"><code>enc</code></td>
  353. <td class="type">
  354. <span class="param-type">string</span>
  355. </td>
  356. <td class="attributes">
  357. &lt;optional><br>
  358. </td>
  359. <td class="description last"><p>Encoding if buffer is a string: hex, utf8 (not recommended), defaults to base64</p></td>
  360. </tr>
  361. </tbody>
  362. </table>
  363. <dl class="details">
  364. <dt class="tag-source">Source:</dt>
  365. <dd class="tag-source"><ul class="dummy"><li>
  366. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2961">line 2961</a>
  367. </li></ul></dd>
  368. </dl>
  369. <h5>Throws:</h5>
  370. <dl>
  371. <dt>
  372. <div class="param-desc">
  373. <p>If the message cannot be decoded or if required fields are missing. The later still
  374. returns the decoded message with missing fields in the <code>decoded</code> property on the error.</p>
  375. </div>
  376. </dt>
  377. <dd></dd>
  378. <dt>
  379. <dl>
  380. <dt>
  381. Type
  382. </dt>
  383. <dd>
  384. <span class="param-type">Error</span>
  385. </dd>
  386. </dl>
  387. </dt>
  388. <dd></dd>
  389. </dl>
  390. <h5>Returns:</h5>
  391. <div class="param-desc">
  392. <p>Decoded message or <code>null</code> if not enough bytes are available yet</p>
  393. </div>
  394. <dl>
  395. <dt>
  396. Type
  397. </dt>
  398. <dd>
  399. <span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
  400. </dd>
  401. </dl>
  402. <h4 class="name" id=".decodeHex"><span class="type-signature">(static) </span>decodeHex<span class="signature">(str)</span><span class="type-signature"> &rarr; (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
  403. <div class="description">
  404. <p>Decodes the message from the specified hex encoded string.</p>
  405. </div>
  406. <h5>Parameters:</h5>
  407. <table class="params">
  408. <thead>
  409. <tr>
  410. <th>Name</th>
  411. <th>Type</th>
  412. <th class="last">Description</th>
  413. </tr>
  414. </thead>
  415. <tbody>
  416. <tr>
  417. <td class="name"><code>str</code></td>
  418. <td class="type">
  419. <span class="param-type">string</span>
  420. </td>
  421. <td class="description last"><p>String to decode from</p></td>
  422. </tr>
  423. </tbody>
  424. </table>
  425. <dl class="details">
  426. <dt class="tag-source">Source:</dt>
  427. <dd class="tag-source"><ul class="dummy"><li>
  428. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3009">line 3009</a>
  429. </li></ul></dd>
  430. </dl>
  431. <h5>Throws:</h5>
  432. <dl>
  433. <dt>
  434. <div class="param-desc">
  435. <p>If the message cannot be decoded or if required fields are missing. The later still
  436. returns the decoded message with missing fields in the <code>decoded</code> property on the error.</p>
  437. </div>
  438. </dt>
  439. <dd></dd>
  440. <dt>
  441. <dl>
  442. <dt>
  443. Type
  444. </dt>
  445. <dd>
  446. <span class="param-type">Error</span>
  447. </dd>
  448. </dl>
  449. </dt>
  450. <dd></dd>
  451. </dl>
  452. <h5>Returns:</h5>
  453. <div class="param-desc">
  454. <p>Decoded message</p>
  455. </div>
  456. <dl>
  457. <dt>
  458. Type
  459. </dt>
  460. <dd>
  461. <span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
  462. </dd>
  463. </dl>
  464. <h4 class="name" id=".decodeJSON"><span class="type-signature">(static) </span>decodeJSON<span class="signature">(str)</span><span class="type-signature"> &rarr; (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
  465. <div class="description">
  466. <p>Decodes the message from a JSON string.</p>
  467. </div>
  468. <h5>Parameters:</h5>
  469. <table class="params">
  470. <thead>
  471. <tr>
  472. <th>Name</th>
  473. <th>Type</th>
  474. <th class="last">Description</th>
  475. </tr>
  476. </thead>
  477. <tbody>
  478. <tr>
  479. <td class="name"><code>str</code></td>
  480. <td class="type">
  481. <span class="param-type">string</span>
  482. </td>
  483. <td class="description last"><p>String to decode from</p></td>
  484. </tr>
  485. </tbody>
  486. </table>
  487. <dl class="details">
  488. <dt class="tag-source">Source:</dt>
  489. <dd class="tag-source"><ul class="dummy"><li>
  490. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3023">line 3023</a>
  491. </li></ul></dd>
  492. </dl>
  493. <h5>Throws:</h5>
  494. <dl>
  495. <dt>
  496. <div class="param-desc">
  497. <p>If the message cannot be decoded or if required fields are
  498. missing.</p>
  499. </div>
  500. </dt>
  501. <dd></dd>
  502. <dt>
  503. <dl>
  504. <dt>
  505. Type
  506. </dt>
  507. <dd>
  508. <span class="param-type">Error</span>
  509. </dd>
  510. </dl>
  511. </dt>
  512. <dd></dd>
  513. </dl>
  514. <h5>Returns:</h5>
  515. <div class="param-desc">
  516. <p>Decoded message</p>
  517. </div>
  518. <dl>
  519. <dt>
  520. Type
  521. </dt>
  522. <dd>
  523. <span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
  524. </dd>
  525. </dl>
  526. <h4 class="name" id="$add"><span class="type-signature"></span>$add<span class="signature">(key, value, noAssert<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
  527. <div class="description">
  528. <p>Adds a value to a repeated field. This is an alias for <a href="ProtoBuf.Builder.Message.html#add">ProtoBuf.Builder.Message#add</a>.</p>
  529. </div>
  530. <h5>Parameters:</h5>
  531. <table class="params">
  532. <thead>
  533. <tr>
  534. <th>Name</th>
  535. <th>Type</th>
  536. <th>Attributes</th>
  537. <th class="last">Description</th>
  538. </tr>
  539. </thead>
  540. <tbody>
  541. <tr>
  542. <td class="name"><code>key</code></td>
  543. <td class="type">
  544. <span class="param-type">string</span>
  545. </td>
  546. <td class="attributes">
  547. </td>
  548. <td class="description last"><p>Field name</p></td>
  549. </tr>
  550. <tr>
  551. <td class="name"><code>value</code></td>
  552. <td class="type">
  553. <span class="param-type">*</span>
  554. </td>
  555. <td class="attributes">
  556. </td>
  557. <td class="description last"><p>Value to add</p></td>
  558. </tr>
  559. <tr>
  560. <td class="name"><code>noAssert</code></td>
  561. <td class="type">
  562. <span class="param-type">boolean</span>
  563. </td>
  564. <td class="attributes">
  565. &lt;optional><br>
  566. </td>
  567. <td class="description last"><p>Whether to assert the value or not (asserts by default)</p></td>
  568. </tr>
  569. </tbody>
  570. </table>
  571. <dl class="details">
  572. <dt class="tag-source">Source:</dt>
  573. <dd class="tag-source"><ul class="dummy"><li>
  574. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2453">line 2453</a>
  575. </li></ul></dd>
  576. </dl>
  577. <h5>Throws:</h5>
  578. <dl>
  579. <dt>
  580. <div class="param-desc">
  581. <p>If the value cannot be added</p>
  582. </div>
  583. </dt>
  584. <dd></dd>
  585. <dt>
  586. <dl>
  587. <dt>
  588. Type
  589. </dt>
  590. <dd>
  591. <span class="param-type">Error</span>
  592. </dd>
  593. </dl>
  594. </dt>
  595. <dd></dd>
  596. </dl>
  597. <h5>Returns:</h5>
  598. <div class="param-desc">
  599. <p>this</p>
  600. </div>
  601. <dl>
  602. <dt>
  603. Type
  604. </dt>
  605. <dd>
  606. <span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
  607. </dd>
  608. </dl>
  609. <h4 class="name" id="$encode"><span class="type-signature"></span>$encode<span class="signature">(buffer<span class="signature-attributes">opt</span>, noVerify<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; (non-null) {ByteBuffer}</span></h4>
  610. <div class="description">
  611. <p>Encodes the message.</p>
  612. </div>
  613. <h5>Parameters:</h5>
  614. <table class="params">
  615. <thead>
  616. <tr>
  617. <th>Name</th>
  618. <th>Type</th>
  619. <th>Attributes</th>
  620. <th class="last">Description</th>
  621. </tr>
  622. </thead>
  623. <tbody>
  624. <tr>
  625. <td class="name"><code>buffer</code></td>
  626. <td class="type">
  627. <span class="param-type">ByteBuffer</span>
  628. |
  629. <span class="param-type">boolean</span>
  630. </td>
  631. <td class="attributes">
  632. &lt;optional><br>
  633. </td>
  634. <td class="description last"><p>ByteBuffer to encode to. Will create a new one and flip it if omitted.</p></td>
  635. </tr>
  636. <tr>
  637. <td class="name"><code>noVerify</code></td>
  638. <td class="type">
  639. <span class="param-type">boolean</span>
  640. </td>
  641. <td class="attributes">
  642. &lt;optional><br>
  643. </td>
  644. <td class="description last"><p>Whether to not verify field values, defaults to <code>false</code></p></td>
  645. </tr>
  646. </tbody>
  647. </table>
  648. <dl class="details">
  649. <dt class="tag-source">Source:</dt>
  650. <dd class="tag-source"><ul class="dummy"><li>
  651. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2651">line 2651</a>
  652. </li></ul></dd>
  653. <dt class="tag-see">See:</dt>
  654. <dd class="tag-see">
  655. <ul>
  656. <li><a href="ProtoBuf.Builder.Message.html#encode64">ProtoBuf.Builder.Message#encode64</a></li>
  657. <li><a href="ProtoBuf.Builder.Message.html#encodeHex">ProtoBuf.Builder.Message#encodeHex</a></li>
  658. <li><a href="ProtoBuf.Builder.Message.html#encodeAB">ProtoBuf.Builder.Message#encodeAB</a></li>
  659. </ul>
  660. </dd>
  661. </dl>
  662. <h5>Throws:</h5>
  663. <dl>
  664. <dt>
  665. <div class="param-desc">
  666. <p>If the message cannot be encoded or if required fields are missing. The later still
  667. returns the encoded ByteBuffer in the <code>encoded</code> property on the error.</p>
  668. </div>
  669. </dt>
  670. <dd></dd>
  671. <dt>
  672. <dl>
  673. <dt>
  674. Type
  675. </dt>
  676. <dd>
  677. <span class="param-type">Error</span>
  678. </dd>
  679. </dl>
  680. </dt>
  681. <dd></dd>
  682. </dl>
  683. <h5>Returns:</h5>
  684. <div class="param-desc">
  685. <p>Encoded message as a ByteBuffer</p>
  686. </div>
  687. <dl>
  688. <dt>
  689. Type
  690. </dt>
  691. <dd>
  692. <span class="param-type">ByteBuffer</span>
  693. </dd>
  694. </dl>
  695. <h4 class="name" id="$get"><span class="type-signature"></span>$get<span class="signature">(key)</span><span class="type-signature"> &rarr; {*}</span></h4>
  696. <div class="description">
  697. <p>Gets a field's value. This is an alias for <a href="ProtoBuf.Builder.Message.html#$get">ProtoBuf.Builder.Message#$get</a>.</p>
  698. </div>
  699. <h5>Parameters:</h5>
  700. <table class="params">
  701. <thead>
  702. <tr>
  703. <th>Name</th>
  704. <th>Type</th>
  705. <th class="last">Description</th>
  706. </tr>
  707. </thead>
  708. <tbody>
  709. <tr>
  710. <td class="name"><code>key</code></td>
  711. <td class="type">
  712. <span class="param-type">string</span>
  713. </td>
  714. <td class="description last"><p>Key</p></td>
  715. </tr>
  716. </tbody>
  717. </table>
  718. <dl class="details">
  719. <dt class="tag-source">Source:</dt>
  720. <dd class="tag-source"><ul class="dummy"><li>
  721. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2541">line 2541</a>
  722. </li></ul></dd>
  723. </dl>
  724. <h5>Throws:</h5>
  725. <dl>
  726. <dt>
  727. <div class="param-desc">
  728. <p>If there is no such field</p>
  729. </div>
  730. </dt>
  731. <dd></dd>
  732. <dt>
  733. <dl>
  734. <dt>
  735. Type
  736. </dt>
  737. <dd>
  738. <span class="param-type">Error</span>
  739. </dd>
  740. </dl>
  741. </dt>
  742. <dd></dd>
  743. </dl>
  744. <h5>Returns:</h5>
  745. <div class="param-desc">
  746. <p>Value</p>
  747. </div>
  748. <dl>
  749. <dt>
  750. Type
  751. </dt>
  752. <dd>
  753. <span class="param-type">*</span>
  754. </dd>
  755. </dl>
  756. <h4 class="name" id="$set"><span class="type-signature"></span>$set<span class="signature">(keyOrObj, value<span class="signature-attributes">opt</span>, noAssert<span class="signature-attributes">opt</span>)</span><span class="type-signature"></span></h4>
  757. <div class="description">
  758. <p>Sets a field's value. This is an alias for [@link ProtoBuf.Builder.Message#set}.</p>
  759. </div>
  760. <h5>Parameters:</h5>
  761. <table class="params">
  762. <thead>
  763. <tr>
  764. <th>Name</th>
  765. <th>Type</th>
  766. <th>Attributes</th>
  767. <th class="last">Description</th>
  768. </tr>
  769. </thead>
  770. <tbody>
  771. <tr>
  772. <td class="name"><code>keyOrObj</code></td>
  773. <td class="type">
  774. <span class="param-type">string</span>
  775. |
  776. <span class="param-type">!Object.&lt;string, *></span>
  777. </td>
  778. <td class="attributes">
  779. </td>
  780. <td class="description last"><p>String key or plain object holding multiple values</p></td>
  781. </tr>
  782. <tr>
  783. <td class="name"><code>value</code></td>
  784. <td class="type">
  785. <span class="param-type">*</span>
  786. |
  787. <span class="param-type">boolean</span>
  788. </td>
  789. <td class="attributes">
  790. &lt;optional><br>
  791. </td>
  792. <td class="description last"><p>Value to set if key is a string, otherwise omitted</p></td>
  793. </tr>
  794. <tr>
  795. <td class="name"><code>noAssert</code></td>
  796. <td class="type">
  797. <span class="param-type">boolean</span>
  798. </td>
  799. <td class="attributes">
  800. &lt;optional><br>
  801. </td>
  802. <td class="description last"><p>Whether to not assert the value, defaults to <code>false</code></p></td>
  803. </tr>
  804. </tbody>
  805. </table>
  806. <dl class="details">
  807. <dt class="tag-source">Source:</dt>
  808. <dd class="tag-source"><ul class="dummy"><li>
  809. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2508">line 2508</a>
  810. </li></ul></dd>
  811. </dl>
  812. <h5>Throws:</h5>
  813. <dl>
  814. <dt>
  815. <div class="param-desc">
  816. <p>If the value cannot be set</p>
  817. </div>
  818. </dt>
  819. <dd></dd>
  820. <dt>
  821. <dl>
  822. <dt>
  823. Type
  824. </dt>
  825. <dd>
  826. <span class="param-type">Error</span>
  827. </dd>
  828. </dl>
  829. </dt>
  830. <dd></dd>
  831. </dl>
  832. <h4 class="name" id="add"><span class="type-signature"></span>add<span class="signature">(key, value, noAssert<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
  833. <div class="description">
  834. <p>Adds a value to a repeated field.</p>
  835. </div>
  836. <h5>Parameters:</h5>
  837. <table class="params">
  838. <thead>
  839. <tr>
  840. <th>Name</th>
  841. <th>Type</th>
  842. <th>Attributes</th>
  843. <th class="last">Description</th>
  844. </tr>
  845. </thead>
  846. <tbody>
  847. <tr>
  848. <td class="name"><code>key</code></td>
  849. <td class="type">
  850. <span class="param-type">string</span>
  851. </td>
  852. <td class="attributes">
  853. </td>
  854. <td class="description last"><p>Field name</p></td>
  855. </tr>
  856. <tr>
  857. <td class="name"><code>value</code></td>
  858. <td class="type">
  859. <span class="param-type">*</span>
  860. </td>
  861. <td class="attributes">
  862. </td>
  863. <td class="description last"><p>Value to add</p></td>
  864. </tr>
  865. <tr>
  866. <td class="name"><code>noAssert</code></td>
  867. <td class="type">
  868. <span class="param-type">boolean</span>
  869. </td>
  870. <td class="attributes">
  871. &lt;optional><br>
  872. </td>
  873. <td class="description last"><p>Whether to assert the value or not (asserts by default)</p></td>
  874. </tr>
  875. </tbody>
  876. </table>
  877. <dl class="details">
  878. <dt class="tag-source">Source:</dt>
  879. <dd class="tag-source"><ul class="dummy"><li>
  880. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2425">line 2425</a>
  881. </li></ul></dd>
  882. </dl>
  883. <h5>Throws:</h5>
  884. <dl>
  885. <dt>
  886. <div class="param-desc">
  887. <p>If the value cannot be added</p>
  888. </div>
  889. </dt>
  890. <dd></dd>
  891. <dt>
  892. <dl>
  893. <dt>
  894. Type
  895. </dt>
  896. <dd>
  897. <span class="param-type">Error</span>
  898. </dd>
  899. </dl>
  900. </dt>
  901. <dd></dd>
  902. </dl>
  903. <h5>Returns:</h5>
  904. <div class="param-desc">
  905. <p>this</p>
  906. </div>
  907. <dl>
  908. <dt>
  909. Type
  910. </dt>
  911. <dd>
  912. <span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
  913. </dd>
  914. </dl>
  915. <h4 class="name" id="calculate"><span class="type-signature"></span>calculate<span class="signature">()</span><span class="type-signature"> &rarr; {number}</span></h4>
  916. <div class="description">
  917. <p>Calculates the byte length of the message.</p>
  918. </div>
  919. <dl class="details">
  920. <dt class="tag-source">Source:</dt>
  921. <dd class="tag-source"><ul class="dummy"><li>
  922. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2695">line 2695</a>
  923. </li></ul></dd>
  924. </dl>
  925. <h5>Throws:</h5>
  926. <dl>
  927. <dt>
  928. <div class="param-desc">
  929. <p>If the message cannot be calculated or if required fields are missing.</p>
  930. </div>
  931. </dt>
  932. <dd></dd>
  933. <dt>
  934. <dl>
  935. <dt>
  936. Type
  937. </dt>
  938. <dd>
  939. <span class="param-type">Error</span>
  940. </dd>
  941. </dl>
  942. </dt>
  943. <dd></dd>
  944. </dl>
  945. <h5>Returns:</h5>
  946. <div class="param-desc">
  947. <p>Byte length</p>
  948. </div>
  949. <dl>
  950. <dt>
  951. Type
  952. </dt>
  953. <dd>
  954. <span class="param-type">number</span>
  955. </dd>
  956. </dl>
  957. <h4 class="name" id="encode64"><span class="type-signature"></span>encode64<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
  958. <div class="description">
  959. <p>Directly encodes the message to a base64 encoded string.</p>
  960. </div>
  961. <dl class="details">
  962. <dt class="tag-source">Source:</dt>
  963. <dd class="tag-source"><ul class="dummy"><li>
  964. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2788">line 2788</a>
  965. </li></ul></dd>
  966. </dl>
  967. <h5>Throws:</h5>
  968. <dl>
  969. <dt>
  970. <div class="param-desc">
  971. <p>If the underlying buffer cannot be encoded or if required fields are missing. The later
  972. still returns the encoded base64 string in the <code>encoded</code> property on the error.</p>
  973. </div>
  974. </dt>
  975. <dd></dd>
  976. <dt>
  977. <dl>
  978. <dt>
  979. Type
  980. </dt>
  981. <dd>
  982. <span class="param-type">Error</span>
  983. </dd>
  984. </dl>
  985. </dt>
  986. <dd></dd>
  987. </dl>
  988. <h5>Returns:</h5>
  989. <div class="param-desc">
  990. <p>Base64 encoded string</p>
  991. </div>
  992. <dl>
  993. <dt>
  994. Type
  995. </dt>
  996. <dd>
  997. <span class="param-type">string</span>
  998. </dd>
  999. </dl>
  1000. <h4 class="name" id="encodeAB"><span class="type-signature"></span>encodeAB<span class="signature">()</span><span class="type-signature"> &rarr; {ArrayBuffer}</span></h4>
  1001. <div class="description">
  1002. <p>Directly encodes the message to an ArrayBuffer.</p>
  1003. </div>
  1004. <dl class="details">
  1005. <dt class="tag-source">Source:</dt>
  1006. <dd class="tag-source"><ul class="dummy"><li>
  1007. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2730">line 2730</a>
  1008. </li></ul></dd>
  1009. </dl>
  1010. <h5>Throws:</h5>
  1011. <dl>
  1012. <dt>
  1013. <div class="param-desc">
  1014. <p>If the message cannot be encoded or if required fields are missing. The later still
  1015. returns the encoded ArrayBuffer in the <code>encoded</code> property on the error.</p>
  1016. </div>
  1017. </dt>
  1018. <dd></dd>
  1019. <dt>
  1020. <dl>
  1021. <dt>
  1022. Type
  1023. </dt>
  1024. <dd>
  1025. <span class="param-type">Error</span>
  1026. </dd>
  1027. </dl>
  1028. </dt>
  1029. <dd></dd>
  1030. </dl>
  1031. <h5>Returns:</h5>
  1032. <div class="param-desc">
  1033. <p>Encoded message as ArrayBuffer</p>
  1034. </div>
  1035. <dl>
  1036. <dt>
  1037. Type
  1038. </dt>
  1039. <dd>
  1040. <span class="param-type">ArrayBuffer</span>
  1041. </dd>
  1042. </dl>
  1043. <h4 class="name" id="encodeDelimited"><span class="type-signature"></span>encodeDelimited<span class="signature">(buffer<span class="signature-attributes">opt</span>, noVerify<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; (non-null) {ByteBuffer}</span></h4>
  1044. <div class="description">
  1045. <p>Encodes the varint32 length-delimited message.</p>
  1046. </div>
  1047. <h5>Parameters:</h5>
  1048. <table class="params">
  1049. <thead>
  1050. <tr>
  1051. <th>Name</th>
  1052. <th>Type</th>
  1053. <th>Attributes</th>
  1054. <th class="last">Description</th>
  1055. </tr>
  1056. </thead>
  1057. <tbody>
  1058. <tr>
  1059. <td class="name"><code>buffer</code></td>
  1060. <td class="type">
  1061. <span class="param-type">ByteBuffer</span>
  1062. |
  1063. <span class="param-type">boolean</span>
  1064. </td>
  1065. <td class="attributes">
  1066. &lt;optional><br>
  1067. </td>
  1068. <td class="description last"><p>ByteBuffer to encode to. Will create a new one and flip it if omitted.</p></td>
  1069. </tr>
  1070. <tr>
  1071. <td class="name"><code>noVerify</code></td>
  1072. <td class="type">
  1073. <span class="param-type">boolean</span>
  1074. </td>
  1075. <td class="attributes">
  1076. &lt;optional><br>
  1077. </td>
  1078. <td class="description last"><p>Whether to not verify field values, defaults to <code>false</code></p></td>
  1079. </tr>
  1080. </tbody>
  1081. </table>
  1082. <dl class="details">
  1083. <dt class="tag-source">Source:</dt>
  1084. <dd class="tag-source"><ul class="dummy"><li>
  1085. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2707">line 2707</a>
  1086. </li></ul></dd>
  1087. </dl>
  1088. <h5>Throws:</h5>
  1089. <dl>
  1090. <dt>
  1091. <div class="param-desc">
  1092. <p>If the message cannot be encoded or if required fields are missing. The later still
  1093. returns the encoded ByteBuffer in the <code>encoded</code> property on the error.</p>
  1094. </div>
  1095. </dt>
  1096. <dd></dd>
  1097. <dt>
  1098. <dl>
  1099. <dt>
  1100. Type
  1101. </dt>
  1102. <dd>
  1103. <span class="param-type">Error</span>
  1104. </dd>
  1105. </dl>
  1106. </dt>
  1107. <dd></dd>
  1108. </dl>
  1109. <h5>Returns:</h5>
  1110. <div class="param-desc">
  1111. <p>Encoded message as a ByteBuffer</p>
  1112. </div>
  1113. <dl>
  1114. <dt>
  1115. Type
  1116. </dt>
  1117. <dd>
  1118. <span class="param-type">ByteBuffer</span>
  1119. </dd>
  1120. </dl>
  1121. <h4 class="name" id="encodeHex"><span class="type-signature"></span>encodeHex<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
  1122. <div class="description">
  1123. <p>Directly encodes the message to a hex encoded string.</p>
  1124. </div>
  1125. <dl class="details">
  1126. <dt class="tag-source">Source:</dt>
  1127. <dd class="tag-source"><ul class="dummy"><li>
  1128. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2817">line 2817</a>
  1129. </li></ul></dd>
  1130. </dl>
  1131. <h5>Throws:</h5>
  1132. <dl>
  1133. <dt>
  1134. <div class="param-desc">
  1135. <p>If the underlying buffer cannot be encoded or if required fields are missing. The later
  1136. still returns the encoded hex string in the <code>encoded</code> property on the error.</p>
  1137. </div>
  1138. </dt>
  1139. <dd></dd>
  1140. <dt>
  1141. <dl>
  1142. <dt>
  1143. Type
  1144. </dt>
  1145. <dd>
  1146. <span class="param-type">Error</span>
  1147. </dd>
  1148. </dl>
  1149. </dt>
  1150. <dd></dd>
  1151. </dl>
  1152. <h5>Returns:</h5>
  1153. <div class="param-desc">
  1154. <p>Hex encoded string</p>
  1155. </div>
  1156. <dl>
  1157. <dt>
  1158. Type
  1159. </dt>
  1160. <dd>
  1161. <span class="param-type">string</span>
  1162. </dd>
  1163. </dl>
  1164. <h4 class="name" id="encodeJSON"><span class="type-signature"></span>encodeJSON<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
  1165. <div class="description">
  1166. <p>Encodes a message to JSON.</p>
  1167. </div>
  1168. <dl class="details">
  1169. <dt class="tag-source">Source:</dt>
  1170. <dd class="tag-source"><ul class="dummy"><li>
  1171. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2918">line 2918</a>
  1172. </li></ul></dd>
  1173. </dl>
  1174. <h5>Returns:</h5>
  1175. <div class="param-desc">
  1176. <p>JSON string</p>
  1177. </div>
  1178. <dl>
  1179. <dt>
  1180. Type
  1181. </dt>
  1182. <dd>
  1183. <span class="param-type">string</span>
  1184. </dd>
  1185. </dl>
  1186. <h4 class="name" id="encodeNB"><span class="type-signature"></span>encodeNB<span class="signature">()</span><span class="type-signature"> &rarr; (non-null) {Buffer}</span></h4>
  1187. <div class="description">
  1188. <p>Directly encodes the message to a node Buffer.</p>
  1189. </div>
  1190. <dl class="details">
  1191. <dt class="tag-source">Source:</dt>
  1192. <dd class="tag-source"><ul class="dummy"><li>
  1193. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2759">line 2759</a>
  1194. </li></ul></dd>
  1195. </dl>
  1196. <h5>Throws:</h5>
  1197. <dl>
  1198. <dt>
  1199. <div class="param-desc">
  1200. <p>If the message cannot be encoded, not running under node.js or if required fields are
  1201. missing. The later still returns the encoded node Buffer in the <code>encoded</code> property on the error.</p>
  1202. </div>
  1203. </dt>
  1204. <dd></dd>
  1205. <dt>
  1206. <dl>
  1207. <dt>
  1208. Type
  1209. </dt>
  1210. <dd>
  1211. <span class="param-type">Error</span>
  1212. </dd>
  1213. </dl>
  1214. </dt>
  1215. <dd></dd>
  1216. </dl>
  1217. <h5>Returns:</h5>
  1218. <dl>
  1219. <dt>
  1220. Type
  1221. </dt>
  1222. <dd>
  1223. <span class="param-type">Buffer</span>
  1224. </dd>
  1225. </dl>
  1226. <h4 class="name" id="get"><span class="type-signature"></span>get<span class="signature">(key, noAssert<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; {*}</span></h4>
  1227. <div class="description">
  1228. <p>Gets a field's value.</p>
  1229. </div>
  1230. <h5>Parameters:</h5>
  1231. <table class="params">
  1232. <thead>
  1233. <tr>
  1234. <th>Name</th>
  1235. <th>Type</th>
  1236. <th>Attributes</th>
  1237. <th class="last">Description</th>
  1238. </tr>
  1239. </thead>
  1240. <tbody>
  1241. <tr>
  1242. <td class="name"><code>key</code></td>
  1243. <td class="type">
  1244. <span class="param-type">string</span>
  1245. </td>
  1246. <td class="attributes">
  1247. </td>
  1248. <td class="description last"><p>Key</p></td>
  1249. </tr>
  1250. <tr>
  1251. <td class="name"><code>noAssert</code></td>
  1252. <td class="type">
  1253. <span class="param-type">boolean</span>
  1254. </td>
  1255. <td class="attributes">
  1256. &lt;optional><br>
  1257. </td>
  1258. <td class="description last"><p>Whether to not assert for an actual field, defaults to <code>false</code></p></td>
  1259. </tr>
  1260. </tbody>
  1261. </table>
  1262. <dl class="details">
  1263. <dt class="tag-source">Source:</dt>
  1264. <dd class="tag-source"><ul class="dummy"><li>
  1265. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2520">line 2520</a>
  1266. </li></ul></dd>
  1267. </dl>
  1268. <h5>Throws:</h5>
  1269. <dl>
  1270. <dt>
  1271. <div class="param-desc">
  1272. <p>If there is no such field</p>
  1273. </div>
  1274. </dt>
  1275. <dd></dd>
  1276. <dt>
  1277. <dl>
  1278. <dt>
  1279. Type
  1280. </dt>
  1281. <dd>
  1282. <span class="param-type">Error</span>
  1283. </dd>
  1284. </dl>
  1285. </dt>
  1286. <dd></dd>
  1287. </dl>
  1288. <h5>Returns:</h5>
  1289. <div class="param-desc">
  1290. <p>Value</p>
  1291. </div>
  1292. <dl>
  1293. <dt>
  1294. Type
  1295. </dt>
  1296. <dd>
  1297. <span class="param-type">*</span>
  1298. </dd>
  1299. </dl>
  1300. <h4 class="name" id="get%5BSomeField%5D"><span class="type-signature">(abstract) </span>get[SomeField]<span class="signature">()</span><span class="type-signature"> &rarr; {*}</span></h4>
  1301. <div class="description">
  1302. <p>Gets a value. This method is present for each field, but only if there is no name conflict with
  1303. another field.</p>
  1304. </div>
  1305. <dl class="details">
  1306. <dt class="tag-source">Source:</dt>
  1307. <dd class="tag-source"><ul class="dummy"><li>
  1308. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2625">line 2625</a>
  1309. </li></ul></dd>
  1310. </dl>
  1311. <h5>Returns:</h5>
  1312. <div class="param-desc">
  1313. <p>The value</p>
  1314. </div>
  1315. <dl>
  1316. <dt>
  1317. Type
  1318. </dt>
  1319. <dd>
  1320. <span class="param-type">*</span>
  1321. </dd>
  1322. </dl>
  1323. <h4 class="name" id="get_%5Bsome_field%5D"><span class="type-signature">(abstract) </span>get_[some_field]<span class="signature">()</span><span class="type-signature"> &rarr; {*}</span></h4>
  1324. <div class="description">
  1325. <p>Gets a value. This method is present for each field, but only if there is no name conflict with
  1326. another field.</p>
  1327. </div>
  1328. <dl class="details">
  1329. <dt class="tag-source">Source:</dt>
  1330. <dd class="tag-source"><ul class="dummy"><li>
  1331. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2636">line 2636</a>
  1332. </li></ul></dd>
  1333. </dl>
  1334. <h5>Returns:</h5>
  1335. <div class="param-desc">
  1336. <p>The value</p>
  1337. </div>
  1338. <dl>
  1339. <dt>
  1340. Type
  1341. </dt>
  1342. <dd>
  1343. <span class="param-type">*</span>
  1344. </dd>
  1345. </dl>
  1346. <h4 class="name" id="set"><span class="type-signature"></span>set<span class="signature">(keyOrObj, value<span class="signature-attributes">opt</span>, noAssert<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
  1347. <div class="description">
  1348. <p>Sets a field's value.</p>
  1349. </div>
  1350. <h5>Parameters:</h5>
  1351. <table class="params">
  1352. <thead>
  1353. <tr>
  1354. <th>Name</th>
  1355. <th>Type</th>
  1356. <th>Attributes</th>
  1357. <th class="last">Description</th>
  1358. </tr>
  1359. </thead>
  1360. <tbody>
  1361. <tr>
  1362. <td class="name"><code>keyOrObj</code></td>
  1363. <td class="type">
  1364. <span class="param-type">string</span>
  1365. |
  1366. <span class="param-type">!Object.&lt;string, *></span>
  1367. </td>
  1368. <td class="attributes">
  1369. </td>
  1370. <td class="description last"><p>String key or plain object holding multiple values</p></td>
  1371. </tr>
  1372. <tr>
  1373. <td class="name"><code>value</code></td>
  1374. <td class="type">
  1375. <span class="param-type">*</span>
  1376. |
  1377. <span class="param-type">boolean</span>
  1378. </td>
  1379. <td class="attributes">
  1380. &lt;optional><br>
  1381. </td>
  1382. <td class="description last"><p>Value to set if key is a string, otherwise omitted</p></td>
  1383. </tr>
  1384. <tr>
  1385. <td class="name"><code>noAssert</code></td>
  1386. <td class="type">
  1387. <span class="param-type">boolean</span>
  1388. </td>
  1389. <td class="attributes">
  1390. &lt;optional><br>
  1391. </td>
  1392. <td class="description last"><p>Whether to not assert for an actual field / proper value type, defaults to <code>false</code></p></td>
  1393. </tr>
  1394. </tbody>
  1395. </table>
  1396. <dl class="details">
  1397. <dt class="tag-source">Source:</dt>
  1398. <dd class="tag-source"><ul class="dummy"><li>
  1399. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2466">line 2466</a>
  1400. </li></ul></dd>
  1401. </dl>
  1402. <h5>Throws:</h5>
  1403. <dl>
  1404. <dt>
  1405. <div class="param-desc">
  1406. <p>If the value cannot be set</p>
  1407. </div>
  1408. </dt>
  1409. <dd></dd>
  1410. <dt>
  1411. <dl>
  1412. <dt>
  1413. Type
  1414. </dt>
  1415. <dd>
  1416. <span class="param-type">Error</span>
  1417. </dd>
  1418. </dl>
  1419. </dt>
  1420. <dd></dd>
  1421. </dl>
  1422. <h5>Returns:</h5>
  1423. <div class="param-desc">
  1424. <p>this</p>
  1425. </div>
  1426. <dl>
  1427. <dt>
  1428. Type
  1429. </dt>
  1430. <dd>
  1431. <span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
  1432. </dd>
  1433. </dl>
  1434. <h4 class="name" id="set%5BSomeField%5D"><span class="type-signature">(abstract) </span>set[SomeField]<span class="signature">(value, noAssert<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
  1435. <div class="description">
  1436. <p>Sets a value. This method is present for each field, but only if there is no name conflict with
  1437. another field.</p>
  1438. </div>
  1439. <h5>Parameters:</h5>
  1440. <table class="params">
  1441. <thead>
  1442. <tr>
  1443. <th>Name</th>
  1444. <th>Type</th>
  1445. <th>Attributes</th>
  1446. <th class="last">Description</th>
  1447. </tr>
  1448. </thead>
  1449. <tbody>
  1450. <tr>
  1451. <td class="name"><code>value</code></td>
  1452. <td class="type">
  1453. <span class="param-type">*</span>
  1454. </td>
  1455. <td class="attributes">
  1456. </td>
  1457. <td class="description last"><p>Value to set</p></td>
  1458. </tr>
  1459. <tr>
  1460. <td class="name"><code>noAssert</code></td>
  1461. <td class="type">
  1462. <span class="param-type">boolean</span>
  1463. </td>
  1464. <td class="attributes">
  1465. &lt;optional><br>
  1466. </td>
  1467. <td class="description last"><p>Whether to not assert the value, defaults to <code>false</code></p></td>
  1468. </tr>
  1469. </tbody>
  1470. </table>
  1471. <dl class="details">
  1472. <dt class="tag-source">Source:</dt>
  1473. <dd class="tag-source"><ul class="dummy"><li>
  1474. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2597">line 2597</a>
  1475. </li></ul></dd>
  1476. </dl>
  1477. <h5>Throws:</h5>
  1478. <dl>
  1479. <dt>
  1480. <div class="param-desc">
  1481. <p>If the value cannot be set</p>
  1482. </div>
  1483. </dt>
  1484. <dd></dd>
  1485. <dt>
  1486. <dl>
  1487. <dt>
  1488. Type
  1489. </dt>
  1490. <dd>
  1491. <span class="param-type">Error</span>
  1492. </dd>
  1493. </dl>
  1494. </dt>
  1495. <dd></dd>
  1496. </dl>
  1497. <h5>Returns:</h5>
  1498. <div class="param-desc">
  1499. <p>this</p>
  1500. </div>
  1501. <dl>
  1502. <dt>
  1503. Type
  1504. </dt>
  1505. <dd>
  1506. <span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
  1507. </dd>
  1508. </dl>
  1509. <h4 class="name" id="set_%5Bsome_field%5D"><span class="type-signature">(abstract) </span>set_[some_field]<span class="signature">(value, noAssert<span class="signature-attributes">opt</span>)</span><span class="type-signature"> &rarr; (non-null) {<a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a>}</span></h4>
  1510. <div class="description">
  1511. <p>Sets a value. This method is present for each field, but only if there is no name conflict with
  1512. another field.</p>
  1513. </div>
  1514. <h5>Parameters:</h5>
  1515. <table class="params">
  1516. <thead>
  1517. <tr>
  1518. <th>Name</th>
  1519. <th>Type</th>
  1520. <th>Attributes</th>
  1521. <th class="last">Description</th>
  1522. </tr>
  1523. </thead>
  1524. <tbody>
  1525. <tr>
  1526. <td class="name"><code>value</code></td>
  1527. <td class="type">
  1528. <span class="param-type">*</span>
  1529. </td>
  1530. <td class="attributes">
  1531. </td>
  1532. <td class="description last"><p>Value to set</p></td>
  1533. </tr>
  1534. <tr>
  1535. <td class="name"><code>noAssert</code></td>
  1536. <td class="type">
  1537. <span class="param-type">boolean</span>
  1538. </td>
  1539. <td class="attributes">
  1540. &lt;optional><br>
  1541. </td>
  1542. <td class="description last"><p>Whether to not assert the value, defaults to <code>false</code></p></td>
  1543. </tr>
  1544. </tbody>
  1545. </table>
  1546. <dl class="details">
  1547. <dt class="tag-source">Source:</dt>
  1548. <dd class="tag-source"><ul class="dummy"><li>
  1549. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2611">line 2611</a>
  1550. </li></ul></dd>
  1551. </dl>
  1552. <h5>Throws:</h5>
  1553. <dl>
  1554. <dt>
  1555. <div class="param-desc">
  1556. <p>If the value cannot be set</p>
  1557. </div>
  1558. </dt>
  1559. <dd></dd>
  1560. <dt>
  1561. <dl>
  1562. <dt>
  1563. Type
  1564. </dt>
  1565. <dd>
  1566. <span class="param-type">Error</span>
  1567. </dd>
  1568. </dl>
  1569. </dt>
  1570. <dd></dd>
  1571. </dl>
  1572. <h5>Returns:</h5>
  1573. <div class="param-desc">
  1574. <p>this</p>
  1575. </div>
  1576. <dl>
  1577. <dt>
  1578. Type
  1579. </dt>
  1580. <dd>
  1581. <span class="param-type"><a href="ProtoBuf.Builder.Message.html">ProtoBuf.Builder.Message</a></span>
  1582. </dd>
  1583. </dl>
  1584. <h4 class="name" id="toArrayBuffer"><span class="type-signature"></span>toArrayBuffer<span class="signature">()</span><span class="type-signature"> &rarr; {ArrayBuffer}</span></h4>
  1585. <div class="description">
  1586. <p>Returns the message as an ArrayBuffer. This is an alias for <a href="ProtoBuf.Builder.Message.html#encodeAB">ProtoBuf.Builder.Message#encodeAB</a>.</p>
  1587. </div>
  1588. <dl class="details">
  1589. <dt class="tag-source">Source:</dt>
  1590. <dd class="tag-source"><ul class="dummy"><li>
  1591. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2748">line 2748</a>
  1592. </li></ul></dd>
  1593. </dl>
  1594. <h5>Throws:</h5>
  1595. <dl>
  1596. <dt>
  1597. <div class="param-desc">
  1598. <p>If the message cannot be encoded or if required fields are missing. The later still
  1599. returns the encoded ArrayBuffer in the <code>encoded</code> property on the error.</p>
  1600. </div>
  1601. </dt>
  1602. <dd></dd>
  1603. <dt>
  1604. <dl>
  1605. <dt>
  1606. Type
  1607. </dt>
  1608. <dd>
  1609. <span class="param-type">Error</span>
  1610. </dd>
  1611. </dl>
  1612. </dt>
  1613. <dd></dd>
  1614. </dl>
  1615. <h5>Returns:</h5>
  1616. <div class="param-desc">
  1617. <p>Encoded message as ArrayBuffer</p>
  1618. </div>
  1619. <dl>
  1620. <dt>
  1621. Type
  1622. </dt>
  1623. <dd>
  1624. <span class="param-type">ArrayBuffer</span>
  1625. </dd>
  1626. </dl>
  1627. <h4 class="name" id="toBase64"><span class="type-signature"></span>toBase64<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
  1628. <div class="description">
  1629. <p>Returns the message as a base64 encoded string. This is an alias for <a href="ProtoBuf.Builder.Message.html#encode64">ProtoBuf.Builder.Message#encode64</a>.</p>
  1630. </div>
  1631. <dl class="details">
  1632. <dt class="tag-source">Source:</dt>
  1633. <dd class="tag-source"><ul class="dummy"><li>
  1634. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2806">line 2806</a>
  1635. </li></ul></dd>
  1636. </dl>
  1637. <h5>Throws:</h5>
  1638. <dl>
  1639. <dt>
  1640. <div class="param-desc">
  1641. <p>If the message cannot be encoded or if required fields are missing. The later still
  1642. returns the encoded base64 string in the <code>encoded</code> property on the error.</p>
  1643. </div>
  1644. </dt>
  1645. <dd></dd>
  1646. <dt>
  1647. <dl>
  1648. <dt>
  1649. Type
  1650. </dt>
  1651. <dd>
  1652. <span class="param-type">Error</span>
  1653. </dd>
  1654. </dl>
  1655. </dt>
  1656. <dd></dd>
  1657. </dl>
  1658. <h5>Returns:</h5>
  1659. <div class="param-desc">
  1660. <p>Base64 encoded string</p>
  1661. </div>
  1662. <dl>
  1663. <dt>
  1664. Type
  1665. </dt>
  1666. <dd>
  1667. <span class="param-type">string</span>
  1668. </dd>
  1669. </dl>
  1670. <h4 class="name" id="toBuffer"><span class="type-signature"></span>toBuffer<span class="signature">()</span><span class="type-signature"> &rarr; (non-null) {Buffer}</span></h4>
  1671. <div class="description">
  1672. <p>Returns the message as a node Buffer. This is an alias for <a href="ProtoBuf.Builder.Message.html#encodeNB">ProtoBuf.Builder.Message#encodeNB</a>.</p>
  1673. </div>
  1674. <dl class="details">
  1675. <dt class="tag-source">Source:</dt>
  1676. <dd class="tag-source"><ul class="dummy"><li>
  1677. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2777">line 2777</a>
  1678. </li></ul></dd>
  1679. </dl>
  1680. <h5>Throws:</h5>
  1681. <dl>
  1682. <dt>
  1683. <div class="param-desc">
  1684. <p>If the message cannot be encoded or if required fields are missing. The later still
  1685. returns the encoded node Buffer in the <code>encoded</code> property on the error.</p>
  1686. </div>
  1687. </dt>
  1688. <dd></dd>
  1689. <dt>
  1690. <dl>
  1691. <dt>
  1692. Type
  1693. </dt>
  1694. <dd>
  1695. <span class="param-type">Error</span>
  1696. </dd>
  1697. </dl>
  1698. </dt>
  1699. <dd></dd>
  1700. </dl>
  1701. <h5>Returns:</h5>
  1702. <dl>
  1703. <dt>
  1704. Type
  1705. </dt>
  1706. <dd>
  1707. <span class="param-type">Buffer</span>
  1708. </dd>
  1709. </dl>
  1710. <h4 class="name" id="toHex"><span class="type-signature"></span>toHex<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
  1711. <div class="description">
  1712. <p>Returns the message as a hex encoded string. This is an alias for <a href="ProtoBuf.Builder.Message.html#encodeHex">ProtoBuf.Builder.Message#encodeHex</a>.</p>
  1713. </div>
  1714. <dl class="details">
  1715. <dt class="tag-source">Source:</dt>
  1716. <dd class="tag-source"><ul class="dummy"><li>
  1717. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2835">line 2835</a>
  1718. </li></ul></dd>
  1719. </dl>
  1720. <h5>Throws:</h5>
  1721. <dl>
  1722. <dt>
  1723. <div class="param-desc">
  1724. <p>If the message cannot be encoded or if required fields are missing. The later still
  1725. returns the encoded hex string in the <code>encoded</code> property on the error.</p>
  1726. </div>
  1727. </dt>
  1728. <dd></dd>
  1729. <dt>
  1730. <dl>
  1731. <dt>
  1732. Type
  1733. </dt>
  1734. <dd>
  1735. <span class="param-type">Error</span>
  1736. </dd>
  1737. </dl>
  1738. </dt>
  1739. <dd></dd>
  1740. </dl>
  1741. <h5>Returns:</h5>
  1742. <div class="param-desc">
  1743. <p>Hex encoded string</p>
  1744. </div>
  1745. <dl>
  1746. <dt>
  1747. Type
  1748. </dt>
  1749. <dd>
  1750. <span class="param-type">string</span>
  1751. </dd>
  1752. </dl>
  1753. <h4 class="name" id="toRaw"><span class="type-signature"></span>toRaw<span class="signature">(binaryAsBase64<span class="signature-attributes">opt</span>, longsAsStrings)</span><span class="type-signature"> &rarr; {Object.&lt;string, *>}</span></h4>
  1754. <div class="description">
  1755. <p>Returns the message's raw payload.</p>
  1756. </div>
  1757. <h5>Parameters:</h5>
  1758. <table class="params">
  1759. <thead>
  1760. <tr>
  1761. <th>Name</th>
  1762. <th>Type</th>
  1763. <th>Attributes</th>
  1764. <th class="last">Description</th>
  1765. </tr>
  1766. </thead>
  1767. <tbody>
  1768. <tr>
  1769. <td class="name"><code>binaryAsBase64</code></td>
  1770. <td class="type">
  1771. <span class="param-type">boolean</span>
  1772. </td>
  1773. <td class="attributes">
  1774. &lt;optional><br>
  1775. </td>
  1776. <td class="description last"><p>Whether to include binary data as base64 strings instead of Buffers, defaults to <code>false</code></p></td>
  1777. </tr>
  1778. <tr>
  1779. <td class="name"><code>longsAsStrings</code></td>
  1780. <td class="type">
  1781. <span class="param-type">boolean</span>
  1782. </td>
  1783. <td class="attributes">
  1784. </td>
  1785. <td class="description last"><p>Whether to encode longs as strings</p></td>
  1786. </tr>
  1787. </tbody>
  1788. </table>
  1789. <dl class="details">
  1790. <dt class="tag-source">Source:</dt>
  1791. <dd class="tag-source"><ul class="dummy"><li>
  1792. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line2909">line 2909</a>
  1793. </li></ul></dd>
  1794. </dl>
  1795. <h5>Returns:</h5>
  1796. <div class="param-desc">
  1797. <p>Raw payload</p>
  1798. </div>
  1799. <dl>
  1800. <dt>
  1801. Type
  1802. </dt>
  1803. <dd>
  1804. <span class="param-type">Object.&lt;string, *></span>
  1805. </dd>
  1806. </dl>
  1807. <h4 class="name" id="toString"><span class="type-signature"></span>toString<span class="signature">()</span><span class="type-signature"> &rarr; {string}</span></h4>
  1808. <div class="description">
  1809. <p>Returns a string representation of this Message.</p>
  1810. </div>
  1811. <dl class="details">
  1812. <dt class="tag-source">Source:</dt>
  1813. <dd class="tag-source"><ul class="dummy"><li>
  1814. <a href="protobuf.js.html">protobuf.js</a>, <a href="protobuf.js.html#line3039">line 3039</a>
  1815. </li></ul></dd>
  1816. </dl>
  1817. <h5>Returns:</h5>
  1818. <div class="param-desc">
  1819. <p>String representation as of &quot;.Fully.Qualified.MessageName&quot;</p>
  1820. </div>
  1821. <dl>
  1822. <dt>
  1823. Type
  1824. </dt>
  1825. <dd>
  1826. <span class="param-type">string</span>
  1827. </dd>
  1828. </dl>
  1829. </article>
  1830. </section>
  1831. </div>
  1832. <nav>
  1833. <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="ProtoBuf.Builder.html">Builder</a></li><li><a href="ProtoBuf.Builder.Message.html">Message</a></li><li><a href="ProtoBuf.Builder.Service.html">Service</a></li><li><a href="ProtoBuf.DotProto.Parser.html">Parser</a></li><li><a href="ProtoBuf.DotProto.Tokenizer.html">Tokenizer</a></li><li><a href="ProtoBuf.Map.html">Map</a></li><li><a href="ProtoBuf.Reflect.Element.html">Element</a></li><li><a href="ProtoBuf.Reflect.Enum.html">Enum</a></li><li><a href="ProtoBuf.Reflect.Enum.Value.html">Value</a></li><li><a href="ProtoBuf.Reflect.Extension.html">Extension</a></li><li><a href="ProtoBuf.Reflect.Message.html">Message</a></li><li><a href="ProtoBuf.Reflect.Message.ExtensionField.html">ExtensionField</a></li><li><a href="ProtoBuf.Reflect.Message.Field.html">Field</a></li><li><a href="ProtoBuf.Reflect.Message.OneOf.html">OneOf</a></li><li><a href="ProtoBuf.Reflect.Namespace.html">Namespace</a></li><li><a href="ProtoBuf.Reflect.Service.html">Service</a></li><li><a href="ProtoBuf.Reflect.Service.Method.html">Method</a></li><li><a href="ProtoBuf.Reflect.Service.RPCMethod.html">RPCMethod</a></li><li><a href="ProtoBuf.Reflect.T.html">T</a></li></ul><h3>Namespaces</h3><ul><li><a href="ProtoBuf.html">ProtoBuf</a></li><li><a href="ProtoBuf.DotProto.html">DotProto</a></li><li><a href="ProtoBuf.Reflect.html">Reflect</a></li><li><a href="ProtoBuf.Util.html">Util</a></li></ul>
  1834. </nav>
  1835. <br class="clear">
  1836. <footer>
  1837. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.3</a> on Fri Jan 27 2017 17:03:55 GMT+0100 (Mitteleuropäische Zeit)
  1838. </footer>
  1839. <script> prettyPrint(); </script>
  1840. <script src="scripts/linenumber.js"> </script>
  1841. </body>
  1842. </html>