keys.generated.go 99 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219
  1. // ************************************************************
  2. // DO NOT EDIT.
  3. // THIS FILE IS AUTO-GENERATED BY codecgen.
  4. // ************************************************************
  5. package client
  6. import (
  7. "errors"
  8. "fmt"
  9. "reflect"
  10. "runtime"
  11. time "time"
  12. codec1978 "github.com/ugorji/go/codec"
  13. )
  14. const (
  15. // ----- content types ----
  16. codecSelferC_UTF87612 = 1
  17. codecSelferC_RAW7612 = 0
  18. // ----- value types used ----
  19. codecSelferValueTypeArray7612 = 10
  20. codecSelferValueTypeMap7612 = 9
  21. // ----- containerStateValues ----
  22. codecSelfer_containerMapKey7612 = 2
  23. codecSelfer_containerMapValue7612 = 3
  24. codecSelfer_containerMapEnd7612 = 4
  25. codecSelfer_containerArrayElem7612 = 6
  26. codecSelfer_containerArrayEnd7612 = 7
  27. )
  28. var (
  29. codecSelferBitsize7612 = uint8(reflect.TypeOf(uint(0)).Bits())
  30. codecSelferOnlyMapOrArrayEncodeToStructErr7612 = errors.New(`only encoded map or array can be decoded into a struct`)
  31. )
  32. type codecSelfer7612 struct{}
  33. func init() {
  34. if codec1978.GenVersion != 8 {
  35. _, file, _, _ := runtime.Caller(0)
  36. err := fmt.Errorf("codecgen version mismatch: current: %v, need %v. Re-generate file: %v",
  37. 8, codec1978.GenVersion, file)
  38. panic(err)
  39. }
  40. if false { // reference the types, but skip this branch at build/run time
  41. var v0 time.Duration
  42. _ = v0
  43. }
  44. }
  45. func (x *Error) CodecEncodeSelf(e *codec1978.Encoder) {
  46. var h codecSelfer7612
  47. z, r := codec1978.GenHelperEncoder(e)
  48. _, _, _ = h, z, r
  49. if x == nil {
  50. r.EncodeNil()
  51. } else {
  52. yym1 := z.EncBinary()
  53. _ = yym1
  54. if false {
  55. } else if z.HasExtensions() && z.EncExt(x) {
  56. } else {
  57. yysep2 := !z.EncBinary()
  58. yy2arr2 := z.EncBasicHandle().StructToArray
  59. _, _ = yysep2, yy2arr2
  60. const yyr2 bool = false
  61. if yyr2 || yy2arr2 {
  62. r.WriteArrayStart(4)
  63. } else {
  64. r.WriteMapStart(4)
  65. }
  66. if yyr2 || yy2arr2 {
  67. r.WriteArrayElem()
  68. yym4 := z.EncBinary()
  69. _ = yym4
  70. if false {
  71. } else {
  72. r.EncodeInt(int64(x.Code))
  73. }
  74. } else {
  75. r.WriteMapElemKey()
  76. r.EncodeString(codecSelferC_UTF87612, string("errorCode"))
  77. r.WriteMapElemValue()
  78. yym5 := z.EncBinary()
  79. _ = yym5
  80. if false {
  81. } else {
  82. r.EncodeInt(int64(x.Code))
  83. }
  84. }
  85. if yyr2 || yy2arr2 {
  86. r.WriteArrayElem()
  87. yym7 := z.EncBinary()
  88. _ = yym7
  89. if false {
  90. } else {
  91. r.EncodeString(codecSelferC_UTF87612, string(x.Message))
  92. }
  93. } else {
  94. r.WriteMapElemKey()
  95. r.EncodeString(codecSelferC_UTF87612, string("message"))
  96. r.WriteMapElemValue()
  97. yym8 := z.EncBinary()
  98. _ = yym8
  99. if false {
  100. } else {
  101. r.EncodeString(codecSelferC_UTF87612, string(x.Message))
  102. }
  103. }
  104. if yyr2 || yy2arr2 {
  105. r.WriteArrayElem()
  106. yym10 := z.EncBinary()
  107. _ = yym10
  108. if false {
  109. } else {
  110. r.EncodeString(codecSelferC_UTF87612, string(x.Cause))
  111. }
  112. } else {
  113. r.WriteMapElemKey()
  114. r.EncodeString(codecSelferC_UTF87612, string("cause"))
  115. r.WriteMapElemValue()
  116. yym11 := z.EncBinary()
  117. _ = yym11
  118. if false {
  119. } else {
  120. r.EncodeString(codecSelferC_UTF87612, string(x.Cause))
  121. }
  122. }
  123. if yyr2 || yy2arr2 {
  124. r.WriteArrayElem()
  125. yym13 := z.EncBinary()
  126. _ = yym13
  127. if false {
  128. } else {
  129. r.EncodeUint(uint64(x.Index))
  130. }
  131. } else {
  132. r.WriteMapElemKey()
  133. r.EncodeString(codecSelferC_UTF87612, string("index"))
  134. r.WriteMapElemValue()
  135. yym14 := z.EncBinary()
  136. _ = yym14
  137. if false {
  138. } else {
  139. r.EncodeUint(uint64(x.Index))
  140. }
  141. }
  142. if yyr2 || yy2arr2 {
  143. r.WriteArrayEnd()
  144. } else {
  145. r.WriteMapEnd()
  146. }
  147. }
  148. }
  149. }
  150. func (x *Error) CodecDecodeSelf(d *codec1978.Decoder) {
  151. var h codecSelfer7612
  152. z, r := codec1978.GenHelperDecoder(d)
  153. _, _, _ = h, z, r
  154. yym1 := z.DecBinary()
  155. _ = yym1
  156. if false {
  157. } else if z.HasExtensions() && z.DecExt(x) {
  158. } else {
  159. yyct2 := r.ContainerType()
  160. if yyct2 == codecSelferValueTypeMap7612 {
  161. yyl2 := r.ReadMapStart()
  162. if yyl2 == 0 {
  163. r.ReadMapEnd()
  164. } else {
  165. x.codecDecodeSelfFromMap(yyl2, d)
  166. }
  167. } else if yyct2 == codecSelferValueTypeArray7612 {
  168. yyl2 := r.ReadArrayStart()
  169. if yyl2 == 0 {
  170. r.ReadArrayEnd()
  171. } else {
  172. x.codecDecodeSelfFromArray(yyl2, d)
  173. }
  174. } else {
  175. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  176. }
  177. }
  178. }
  179. func (x *Error) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  180. var h codecSelfer7612
  181. z, r := codec1978.GenHelperDecoder(d)
  182. _, _, _ = h, z, r
  183. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  184. _ = yys3Slc
  185. var yyhl3 bool = l >= 0
  186. for yyj3 := 0; ; yyj3++ {
  187. if yyhl3 {
  188. if yyj3 >= l {
  189. break
  190. }
  191. } else {
  192. if r.CheckBreak() {
  193. break
  194. }
  195. }
  196. r.ReadMapElemKey()
  197. yys3Slc = r.DecodeStringAsBytes()
  198. yys3 := string(yys3Slc)
  199. r.ReadMapElemValue()
  200. switch yys3 {
  201. case "errorCode":
  202. if r.TryDecodeAsNil() {
  203. x.Code = 0
  204. } else {
  205. yyv4 := &x.Code
  206. yym5 := z.DecBinary()
  207. _ = yym5
  208. if false {
  209. } else {
  210. *((*int)(yyv4)) = int(r.DecodeInt(codecSelferBitsize7612))
  211. }
  212. }
  213. case "message":
  214. if r.TryDecodeAsNil() {
  215. x.Message = ""
  216. } else {
  217. yyv6 := &x.Message
  218. yym7 := z.DecBinary()
  219. _ = yym7
  220. if false {
  221. } else {
  222. *((*string)(yyv6)) = r.DecodeString()
  223. }
  224. }
  225. case "cause":
  226. if r.TryDecodeAsNil() {
  227. x.Cause = ""
  228. } else {
  229. yyv8 := &x.Cause
  230. yym9 := z.DecBinary()
  231. _ = yym9
  232. if false {
  233. } else {
  234. *((*string)(yyv8)) = r.DecodeString()
  235. }
  236. }
  237. case "index":
  238. if r.TryDecodeAsNil() {
  239. x.Index = 0
  240. } else {
  241. yyv10 := &x.Index
  242. yym11 := z.DecBinary()
  243. _ = yym11
  244. if false {
  245. } else {
  246. *((*uint64)(yyv10)) = uint64(r.DecodeUint(64))
  247. }
  248. }
  249. default:
  250. z.DecStructFieldNotFound(-1, yys3)
  251. } // end switch yys3
  252. } // end for yyj3
  253. r.ReadMapEnd()
  254. }
  255. func (x *Error) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  256. var h codecSelfer7612
  257. z, r := codec1978.GenHelperDecoder(d)
  258. _, _, _ = h, z, r
  259. var yyj12 int
  260. var yyb12 bool
  261. var yyhl12 bool = l >= 0
  262. yyj12++
  263. if yyhl12 {
  264. yyb12 = yyj12 > l
  265. } else {
  266. yyb12 = r.CheckBreak()
  267. }
  268. if yyb12 {
  269. r.ReadArrayEnd()
  270. return
  271. }
  272. r.ReadArrayElem()
  273. if r.TryDecodeAsNil() {
  274. x.Code = 0
  275. } else {
  276. yyv13 := &x.Code
  277. yym14 := z.DecBinary()
  278. _ = yym14
  279. if false {
  280. } else {
  281. *((*int)(yyv13)) = int(r.DecodeInt(codecSelferBitsize7612))
  282. }
  283. }
  284. yyj12++
  285. if yyhl12 {
  286. yyb12 = yyj12 > l
  287. } else {
  288. yyb12 = r.CheckBreak()
  289. }
  290. if yyb12 {
  291. r.ReadArrayEnd()
  292. return
  293. }
  294. r.ReadArrayElem()
  295. if r.TryDecodeAsNil() {
  296. x.Message = ""
  297. } else {
  298. yyv15 := &x.Message
  299. yym16 := z.DecBinary()
  300. _ = yym16
  301. if false {
  302. } else {
  303. *((*string)(yyv15)) = r.DecodeString()
  304. }
  305. }
  306. yyj12++
  307. if yyhl12 {
  308. yyb12 = yyj12 > l
  309. } else {
  310. yyb12 = r.CheckBreak()
  311. }
  312. if yyb12 {
  313. r.ReadArrayEnd()
  314. return
  315. }
  316. r.ReadArrayElem()
  317. if r.TryDecodeAsNil() {
  318. x.Cause = ""
  319. } else {
  320. yyv17 := &x.Cause
  321. yym18 := z.DecBinary()
  322. _ = yym18
  323. if false {
  324. } else {
  325. *((*string)(yyv17)) = r.DecodeString()
  326. }
  327. }
  328. yyj12++
  329. if yyhl12 {
  330. yyb12 = yyj12 > l
  331. } else {
  332. yyb12 = r.CheckBreak()
  333. }
  334. if yyb12 {
  335. r.ReadArrayEnd()
  336. return
  337. }
  338. r.ReadArrayElem()
  339. if r.TryDecodeAsNil() {
  340. x.Index = 0
  341. } else {
  342. yyv19 := &x.Index
  343. yym20 := z.DecBinary()
  344. _ = yym20
  345. if false {
  346. } else {
  347. *((*uint64)(yyv19)) = uint64(r.DecodeUint(64))
  348. }
  349. }
  350. for {
  351. yyj12++
  352. if yyhl12 {
  353. yyb12 = yyj12 > l
  354. } else {
  355. yyb12 = r.CheckBreak()
  356. }
  357. if yyb12 {
  358. break
  359. }
  360. r.ReadArrayElem()
  361. z.DecStructFieldNotFound(yyj12-1, "")
  362. }
  363. r.ReadArrayEnd()
  364. }
  365. func (x PrevExistType) CodecEncodeSelf(e *codec1978.Encoder) {
  366. var h codecSelfer7612
  367. z, r := codec1978.GenHelperEncoder(e)
  368. _, _, _ = h, z, r
  369. yym1 := z.EncBinary()
  370. _ = yym1
  371. if false {
  372. } else if z.HasExtensions() && z.EncExt(x) {
  373. } else {
  374. r.EncodeString(codecSelferC_UTF87612, string(x))
  375. }
  376. }
  377. func (x *PrevExistType) CodecDecodeSelf(d *codec1978.Decoder) {
  378. var h codecSelfer7612
  379. z, r := codec1978.GenHelperDecoder(d)
  380. _, _, _ = h, z, r
  381. yym1 := z.DecBinary()
  382. _ = yym1
  383. if false {
  384. } else if z.HasExtensions() && z.DecExt(x) {
  385. } else {
  386. *((*string)(x)) = r.DecodeString()
  387. }
  388. }
  389. func (x *WatcherOptions) CodecEncodeSelf(e *codec1978.Encoder) {
  390. var h codecSelfer7612
  391. z, r := codec1978.GenHelperEncoder(e)
  392. _, _, _ = h, z, r
  393. if x == nil {
  394. r.EncodeNil()
  395. } else {
  396. yym1 := z.EncBinary()
  397. _ = yym1
  398. if false {
  399. } else if z.HasExtensions() && z.EncExt(x) {
  400. } else {
  401. yysep2 := !z.EncBinary()
  402. yy2arr2 := z.EncBasicHandle().StructToArray
  403. _, _ = yysep2, yy2arr2
  404. const yyr2 bool = false
  405. if yyr2 || yy2arr2 {
  406. r.WriteArrayStart(2)
  407. } else {
  408. r.WriteMapStart(2)
  409. }
  410. if yyr2 || yy2arr2 {
  411. r.WriteArrayElem()
  412. yym4 := z.EncBinary()
  413. _ = yym4
  414. if false {
  415. } else {
  416. r.EncodeUint(uint64(x.AfterIndex))
  417. }
  418. } else {
  419. r.WriteMapElemKey()
  420. r.EncodeString(codecSelferC_UTF87612, string("AfterIndex"))
  421. r.WriteMapElemValue()
  422. yym5 := z.EncBinary()
  423. _ = yym5
  424. if false {
  425. } else {
  426. r.EncodeUint(uint64(x.AfterIndex))
  427. }
  428. }
  429. if yyr2 || yy2arr2 {
  430. r.WriteArrayElem()
  431. yym7 := z.EncBinary()
  432. _ = yym7
  433. if false {
  434. } else {
  435. r.EncodeBool(bool(x.Recursive))
  436. }
  437. } else {
  438. r.WriteMapElemKey()
  439. r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
  440. r.WriteMapElemValue()
  441. yym8 := z.EncBinary()
  442. _ = yym8
  443. if false {
  444. } else {
  445. r.EncodeBool(bool(x.Recursive))
  446. }
  447. }
  448. if yyr2 || yy2arr2 {
  449. r.WriteArrayEnd()
  450. } else {
  451. r.WriteMapEnd()
  452. }
  453. }
  454. }
  455. }
  456. func (x *WatcherOptions) CodecDecodeSelf(d *codec1978.Decoder) {
  457. var h codecSelfer7612
  458. z, r := codec1978.GenHelperDecoder(d)
  459. _, _, _ = h, z, r
  460. yym1 := z.DecBinary()
  461. _ = yym1
  462. if false {
  463. } else if z.HasExtensions() && z.DecExt(x) {
  464. } else {
  465. yyct2 := r.ContainerType()
  466. if yyct2 == codecSelferValueTypeMap7612 {
  467. yyl2 := r.ReadMapStart()
  468. if yyl2 == 0 {
  469. r.ReadMapEnd()
  470. } else {
  471. x.codecDecodeSelfFromMap(yyl2, d)
  472. }
  473. } else if yyct2 == codecSelferValueTypeArray7612 {
  474. yyl2 := r.ReadArrayStart()
  475. if yyl2 == 0 {
  476. r.ReadArrayEnd()
  477. } else {
  478. x.codecDecodeSelfFromArray(yyl2, d)
  479. }
  480. } else {
  481. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  482. }
  483. }
  484. }
  485. func (x *WatcherOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  486. var h codecSelfer7612
  487. z, r := codec1978.GenHelperDecoder(d)
  488. _, _, _ = h, z, r
  489. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  490. _ = yys3Slc
  491. var yyhl3 bool = l >= 0
  492. for yyj3 := 0; ; yyj3++ {
  493. if yyhl3 {
  494. if yyj3 >= l {
  495. break
  496. }
  497. } else {
  498. if r.CheckBreak() {
  499. break
  500. }
  501. }
  502. r.ReadMapElemKey()
  503. yys3Slc = r.DecodeStringAsBytes()
  504. yys3 := string(yys3Slc)
  505. r.ReadMapElemValue()
  506. switch yys3 {
  507. case "AfterIndex":
  508. if r.TryDecodeAsNil() {
  509. x.AfterIndex = 0
  510. } else {
  511. yyv4 := &x.AfterIndex
  512. yym5 := z.DecBinary()
  513. _ = yym5
  514. if false {
  515. } else {
  516. *((*uint64)(yyv4)) = uint64(r.DecodeUint(64))
  517. }
  518. }
  519. case "Recursive":
  520. if r.TryDecodeAsNil() {
  521. x.Recursive = false
  522. } else {
  523. yyv6 := &x.Recursive
  524. yym7 := z.DecBinary()
  525. _ = yym7
  526. if false {
  527. } else {
  528. *((*bool)(yyv6)) = r.DecodeBool()
  529. }
  530. }
  531. default:
  532. z.DecStructFieldNotFound(-1, yys3)
  533. } // end switch yys3
  534. } // end for yyj3
  535. r.ReadMapEnd()
  536. }
  537. func (x *WatcherOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  538. var h codecSelfer7612
  539. z, r := codec1978.GenHelperDecoder(d)
  540. _, _, _ = h, z, r
  541. var yyj8 int
  542. var yyb8 bool
  543. var yyhl8 bool = l >= 0
  544. yyj8++
  545. if yyhl8 {
  546. yyb8 = yyj8 > l
  547. } else {
  548. yyb8 = r.CheckBreak()
  549. }
  550. if yyb8 {
  551. r.ReadArrayEnd()
  552. return
  553. }
  554. r.ReadArrayElem()
  555. if r.TryDecodeAsNil() {
  556. x.AfterIndex = 0
  557. } else {
  558. yyv9 := &x.AfterIndex
  559. yym10 := z.DecBinary()
  560. _ = yym10
  561. if false {
  562. } else {
  563. *((*uint64)(yyv9)) = uint64(r.DecodeUint(64))
  564. }
  565. }
  566. yyj8++
  567. if yyhl8 {
  568. yyb8 = yyj8 > l
  569. } else {
  570. yyb8 = r.CheckBreak()
  571. }
  572. if yyb8 {
  573. r.ReadArrayEnd()
  574. return
  575. }
  576. r.ReadArrayElem()
  577. if r.TryDecodeAsNil() {
  578. x.Recursive = false
  579. } else {
  580. yyv11 := &x.Recursive
  581. yym12 := z.DecBinary()
  582. _ = yym12
  583. if false {
  584. } else {
  585. *((*bool)(yyv11)) = r.DecodeBool()
  586. }
  587. }
  588. for {
  589. yyj8++
  590. if yyhl8 {
  591. yyb8 = yyj8 > l
  592. } else {
  593. yyb8 = r.CheckBreak()
  594. }
  595. if yyb8 {
  596. break
  597. }
  598. r.ReadArrayElem()
  599. z.DecStructFieldNotFound(yyj8-1, "")
  600. }
  601. r.ReadArrayEnd()
  602. }
  603. func (x *CreateInOrderOptions) CodecEncodeSelf(e *codec1978.Encoder) {
  604. var h codecSelfer7612
  605. z, r := codec1978.GenHelperEncoder(e)
  606. _, _, _ = h, z, r
  607. if x == nil {
  608. r.EncodeNil()
  609. } else {
  610. yym1 := z.EncBinary()
  611. _ = yym1
  612. if false {
  613. } else if z.HasExtensions() && z.EncExt(x) {
  614. } else {
  615. yysep2 := !z.EncBinary()
  616. yy2arr2 := z.EncBasicHandle().StructToArray
  617. _, _ = yysep2, yy2arr2
  618. const yyr2 bool = false
  619. if yyr2 || yy2arr2 {
  620. r.WriteArrayStart(1)
  621. } else {
  622. r.WriteMapStart(1)
  623. }
  624. if yyr2 || yy2arr2 {
  625. r.WriteArrayElem()
  626. yym4 := z.EncBinary()
  627. _ = yym4
  628. if false {
  629. } else if z.HasExtensions() && z.EncExt(x.TTL) {
  630. } else {
  631. r.EncodeInt(int64(x.TTL))
  632. }
  633. } else {
  634. r.WriteMapElemKey()
  635. r.EncodeString(codecSelferC_UTF87612, string("TTL"))
  636. r.WriteMapElemValue()
  637. yym5 := z.EncBinary()
  638. _ = yym5
  639. if false {
  640. } else if z.HasExtensions() && z.EncExt(x.TTL) {
  641. } else {
  642. r.EncodeInt(int64(x.TTL))
  643. }
  644. }
  645. if yyr2 || yy2arr2 {
  646. r.WriteArrayEnd()
  647. } else {
  648. r.WriteMapEnd()
  649. }
  650. }
  651. }
  652. }
  653. func (x *CreateInOrderOptions) CodecDecodeSelf(d *codec1978.Decoder) {
  654. var h codecSelfer7612
  655. z, r := codec1978.GenHelperDecoder(d)
  656. _, _, _ = h, z, r
  657. yym1 := z.DecBinary()
  658. _ = yym1
  659. if false {
  660. } else if z.HasExtensions() && z.DecExt(x) {
  661. } else {
  662. yyct2 := r.ContainerType()
  663. if yyct2 == codecSelferValueTypeMap7612 {
  664. yyl2 := r.ReadMapStart()
  665. if yyl2 == 0 {
  666. r.ReadMapEnd()
  667. } else {
  668. x.codecDecodeSelfFromMap(yyl2, d)
  669. }
  670. } else if yyct2 == codecSelferValueTypeArray7612 {
  671. yyl2 := r.ReadArrayStart()
  672. if yyl2 == 0 {
  673. r.ReadArrayEnd()
  674. } else {
  675. x.codecDecodeSelfFromArray(yyl2, d)
  676. }
  677. } else {
  678. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  679. }
  680. }
  681. }
  682. func (x *CreateInOrderOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  683. var h codecSelfer7612
  684. z, r := codec1978.GenHelperDecoder(d)
  685. _, _, _ = h, z, r
  686. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  687. _ = yys3Slc
  688. var yyhl3 bool = l >= 0
  689. for yyj3 := 0; ; yyj3++ {
  690. if yyhl3 {
  691. if yyj3 >= l {
  692. break
  693. }
  694. } else {
  695. if r.CheckBreak() {
  696. break
  697. }
  698. }
  699. r.ReadMapElemKey()
  700. yys3Slc = r.DecodeStringAsBytes()
  701. yys3 := string(yys3Slc)
  702. r.ReadMapElemValue()
  703. switch yys3 {
  704. case "TTL":
  705. if r.TryDecodeAsNil() {
  706. x.TTL = 0
  707. } else {
  708. yyv4 := &x.TTL
  709. yym5 := z.DecBinary()
  710. _ = yym5
  711. if false {
  712. } else if z.HasExtensions() && z.DecExt(yyv4) {
  713. } else {
  714. *((*int64)(yyv4)) = int64(r.DecodeInt(64))
  715. }
  716. }
  717. default:
  718. z.DecStructFieldNotFound(-1, yys3)
  719. } // end switch yys3
  720. } // end for yyj3
  721. r.ReadMapEnd()
  722. }
  723. func (x *CreateInOrderOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  724. var h codecSelfer7612
  725. z, r := codec1978.GenHelperDecoder(d)
  726. _, _, _ = h, z, r
  727. var yyj6 int
  728. var yyb6 bool
  729. var yyhl6 bool = l >= 0
  730. yyj6++
  731. if yyhl6 {
  732. yyb6 = yyj6 > l
  733. } else {
  734. yyb6 = r.CheckBreak()
  735. }
  736. if yyb6 {
  737. r.ReadArrayEnd()
  738. return
  739. }
  740. r.ReadArrayElem()
  741. if r.TryDecodeAsNil() {
  742. x.TTL = 0
  743. } else {
  744. yyv7 := &x.TTL
  745. yym8 := z.DecBinary()
  746. _ = yym8
  747. if false {
  748. } else if z.HasExtensions() && z.DecExt(yyv7) {
  749. } else {
  750. *((*int64)(yyv7)) = int64(r.DecodeInt(64))
  751. }
  752. }
  753. for {
  754. yyj6++
  755. if yyhl6 {
  756. yyb6 = yyj6 > l
  757. } else {
  758. yyb6 = r.CheckBreak()
  759. }
  760. if yyb6 {
  761. break
  762. }
  763. r.ReadArrayElem()
  764. z.DecStructFieldNotFound(yyj6-1, "")
  765. }
  766. r.ReadArrayEnd()
  767. }
  768. func (x *SetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
  769. var h codecSelfer7612
  770. z, r := codec1978.GenHelperEncoder(e)
  771. _, _, _ = h, z, r
  772. if x == nil {
  773. r.EncodeNil()
  774. } else {
  775. yym1 := z.EncBinary()
  776. _ = yym1
  777. if false {
  778. } else if z.HasExtensions() && z.EncExt(x) {
  779. } else {
  780. yysep2 := !z.EncBinary()
  781. yy2arr2 := z.EncBasicHandle().StructToArray
  782. _, _ = yysep2, yy2arr2
  783. const yyr2 bool = false
  784. if yyr2 || yy2arr2 {
  785. r.WriteArrayStart(7)
  786. } else {
  787. r.WriteMapStart(7)
  788. }
  789. if yyr2 || yy2arr2 {
  790. r.WriteArrayElem()
  791. yym4 := z.EncBinary()
  792. _ = yym4
  793. if false {
  794. } else {
  795. r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
  796. }
  797. } else {
  798. r.WriteMapElemKey()
  799. r.EncodeString(codecSelferC_UTF87612, string("PrevValue"))
  800. r.WriteMapElemValue()
  801. yym5 := z.EncBinary()
  802. _ = yym5
  803. if false {
  804. } else {
  805. r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
  806. }
  807. }
  808. if yyr2 || yy2arr2 {
  809. r.WriteArrayElem()
  810. yym7 := z.EncBinary()
  811. _ = yym7
  812. if false {
  813. } else {
  814. r.EncodeUint(uint64(x.PrevIndex))
  815. }
  816. } else {
  817. r.WriteMapElemKey()
  818. r.EncodeString(codecSelferC_UTF87612, string("PrevIndex"))
  819. r.WriteMapElemValue()
  820. yym8 := z.EncBinary()
  821. _ = yym8
  822. if false {
  823. } else {
  824. r.EncodeUint(uint64(x.PrevIndex))
  825. }
  826. }
  827. if yyr2 || yy2arr2 {
  828. r.WriteArrayElem()
  829. x.PrevExist.CodecEncodeSelf(e)
  830. } else {
  831. r.WriteMapElemKey()
  832. r.EncodeString(codecSelferC_UTF87612, string("PrevExist"))
  833. r.WriteMapElemValue()
  834. x.PrevExist.CodecEncodeSelf(e)
  835. }
  836. if yyr2 || yy2arr2 {
  837. r.WriteArrayElem()
  838. yym13 := z.EncBinary()
  839. _ = yym13
  840. if false {
  841. } else if z.HasExtensions() && z.EncExt(x.TTL) {
  842. } else {
  843. r.EncodeInt(int64(x.TTL))
  844. }
  845. } else {
  846. r.WriteMapElemKey()
  847. r.EncodeString(codecSelferC_UTF87612, string("TTL"))
  848. r.WriteMapElemValue()
  849. yym14 := z.EncBinary()
  850. _ = yym14
  851. if false {
  852. } else if z.HasExtensions() && z.EncExt(x.TTL) {
  853. } else {
  854. r.EncodeInt(int64(x.TTL))
  855. }
  856. }
  857. if yyr2 || yy2arr2 {
  858. r.WriteArrayElem()
  859. yym16 := z.EncBinary()
  860. _ = yym16
  861. if false {
  862. } else {
  863. r.EncodeBool(bool(x.Refresh))
  864. }
  865. } else {
  866. r.WriteMapElemKey()
  867. r.EncodeString(codecSelferC_UTF87612, string("Refresh"))
  868. r.WriteMapElemValue()
  869. yym17 := z.EncBinary()
  870. _ = yym17
  871. if false {
  872. } else {
  873. r.EncodeBool(bool(x.Refresh))
  874. }
  875. }
  876. if yyr2 || yy2arr2 {
  877. r.WriteArrayElem()
  878. yym19 := z.EncBinary()
  879. _ = yym19
  880. if false {
  881. } else {
  882. r.EncodeBool(bool(x.Dir))
  883. }
  884. } else {
  885. r.WriteMapElemKey()
  886. r.EncodeString(codecSelferC_UTF87612, string("Dir"))
  887. r.WriteMapElemValue()
  888. yym20 := z.EncBinary()
  889. _ = yym20
  890. if false {
  891. } else {
  892. r.EncodeBool(bool(x.Dir))
  893. }
  894. }
  895. if yyr2 || yy2arr2 {
  896. r.WriteArrayElem()
  897. yym22 := z.EncBinary()
  898. _ = yym22
  899. if false {
  900. } else {
  901. r.EncodeBool(bool(x.NoValueOnSuccess))
  902. }
  903. } else {
  904. r.WriteMapElemKey()
  905. r.EncodeString(codecSelferC_UTF87612, string("NoValueOnSuccess"))
  906. r.WriteMapElemValue()
  907. yym23 := z.EncBinary()
  908. _ = yym23
  909. if false {
  910. } else {
  911. r.EncodeBool(bool(x.NoValueOnSuccess))
  912. }
  913. }
  914. if yyr2 || yy2arr2 {
  915. r.WriteArrayEnd()
  916. } else {
  917. r.WriteMapEnd()
  918. }
  919. }
  920. }
  921. }
  922. func (x *SetOptions) CodecDecodeSelf(d *codec1978.Decoder) {
  923. var h codecSelfer7612
  924. z, r := codec1978.GenHelperDecoder(d)
  925. _, _, _ = h, z, r
  926. yym1 := z.DecBinary()
  927. _ = yym1
  928. if false {
  929. } else if z.HasExtensions() && z.DecExt(x) {
  930. } else {
  931. yyct2 := r.ContainerType()
  932. if yyct2 == codecSelferValueTypeMap7612 {
  933. yyl2 := r.ReadMapStart()
  934. if yyl2 == 0 {
  935. r.ReadMapEnd()
  936. } else {
  937. x.codecDecodeSelfFromMap(yyl2, d)
  938. }
  939. } else if yyct2 == codecSelferValueTypeArray7612 {
  940. yyl2 := r.ReadArrayStart()
  941. if yyl2 == 0 {
  942. r.ReadArrayEnd()
  943. } else {
  944. x.codecDecodeSelfFromArray(yyl2, d)
  945. }
  946. } else {
  947. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  948. }
  949. }
  950. }
  951. func (x *SetOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  952. var h codecSelfer7612
  953. z, r := codec1978.GenHelperDecoder(d)
  954. _, _, _ = h, z, r
  955. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  956. _ = yys3Slc
  957. var yyhl3 bool = l >= 0
  958. for yyj3 := 0; ; yyj3++ {
  959. if yyhl3 {
  960. if yyj3 >= l {
  961. break
  962. }
  963. } else {
  964. if r.CheckBreak() {
  965. break
  966. }
  967. }
  968. r.ReadMapElemKey()
  969. yys3Slc = r.DecodeStringAsBytes()
  970. yys3 := string(yys3Slc)
  971. r.ReadMapElemValue()
  972. switch yys3 {
  973. case "PrevValue":
  974. if r.TryDecodeAsNil() {
  975. x.PrevValue = ""
  976. } else {
  977. yyv4 := &x.PrevValue
  978. yym5 := z.DecBinary()
  979. _ = yym5
  980. if false {
  981. } else {
  982. *((*string)(yyv4)) = r.DecodeString()
  983. }
  984. }
  985. case "PrevIndex":
  986. if r.TryDecodeAsNil() {
  987. x.PrevIndex = 0
  988. } else {
  989. yyv6 := &x.PrevIndex
  990. yym7 := z.DecBinary()
  991. _ = yym7
  992. if false {
  993. } else {
  994. *((*uint64)(yyv6)) = uint64(r.DecodeUint(64))
  995. }
  996. }
  997. case "PrevExist":
  998. if r.TryDecodeAsNil() {
  999. x.PrevExist = ""
  1000. } else {
  1001. yyv8 := &x.PrevExist
  1002. yyv8.CodecDecodeSelf(d)
  1003. }
  1004. case "TTL":
  1005. if r.TryDecodeAsNil() {
  1006. x.TTL = 0
  1007. } else {
  1008. yyv9 := &x.TTL
  1009. yym10 := z.DecBinary()
  1010. _ = yym10
  1011. if false {
  1012. } else if z.HasExtensions() && z.DecExt(yyv9) {
  1013. } else {
  1014. *((*int64)(yyv9)) = int64(r.DecodeInt(64))
  1015. }
  1016. }
  1017. case "Refresh":
  1018. if r.TryDecodeAsNil() {
  1019. x.Refresh = false
  1020. } else {
  1021. yyv11 := &x.Refresh
  1022. yym12 := z.DecBinary()
  1023. _ = yym12
  1024. if false {
  1025. } else {
  1026. *((*bool)(yyv11)) = r.DecodeBool()
  1027. }
  1028. }
  1029. case "Dir":
  1030. if r.TryDecodeAsNil() {
  1031. x.Dir = false
  1032. } else {
  1033. yyv13 := &x.Dir
  1034. yym14 := z.DecBinary()
  1035. _ = yym14
  1036. if false {
  1037. } else {
  1038. *((*bool)(yyv13)) = r.DecodeBool()
  1039. }
  1040. }
  1041. case "NoValueOnSuccess":
  1042. if r.TryDecodeAsNil() {
  1043. x.NoValueOnSuccess = false
  1044. } else {
  1045. yyv15 := &x.NoValueOnSuccess
  1046. yym16 := z.DecBinary()
  1047. _ = yym16
  1048. if false {
  1049. } else {
  1050. *((*bool)(yyv15)) = r.DecodeBool()
  1051. }
  1052. }
  1053. default:
  1054. z.DecStructFieldNotFound(-1, yys3)
  1055. } // end switch yys3
  1056. } // end for yyj3
  1057. r.ReadMapEnd()
  1058. }
  1059. func (x *SetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  1060. var h codecSelfer7612
  1061. z, r := codec1978.GenHelperDecoder(d)
  1062. _, _, _ = h, z, r
  1063. var yyj17 int
  1064. var yyb17 bool
  1065. var yyhl17 bool = l >= 0
  1066. yyj17++
  1067. if yyhl17 {
  1068. yyb17 = yyj17 > l
  1069. } else {
  1070. yyb17 = r.CheckBreak()
  1071. }
  1072. if yyb17 {
  1073. r.ReadArrayEnd()
  1074. return
  1075. }
  1076. r.ReadArrayElem()
  1077. if r.TryDecodeAsNil() {
  1078. x.PrevValue = ""
  1079. } else {
  1080. yyv18 := &x.PrevValue
  1081. yym19 := z.DecBinary()
  1082. _ = yym19
  1083. if false {
  1084. } else {
  1085. *((*string)(yyv18)) = r.DecodeString()
  1086. }
  1087. }
  1088. yyj17++
  1089. if yyhl17 {
  1090. yyb17 = yyj17 > l
  1091. } else {
  1092. yyb17 = r.CheckBreak()
  1093. }
  1094. if yyb17 {
  1095. r.ReadArrayEnd()
  1096. return
  1097. }
  1098. r.ReadArrayElem()
  1099. if r.TryDecodeAsNil() {
  1100. x.PrevIndex = 0
  1101. } else {
  1102. yyv20 := &x.PrevIndex
  1103. yym21 := z.DecBinary()
  1104. _ = yym21
  1105. if false {
  1106. } else {
  1107. *((*uint64)(yyv20)) = uint64(r.DecodeUint(64))
  1108. }
  1109. }
  1110. yyj17++
  1111. if yyhl17 {
  1112. yyb17 = yyj17 > l
  1113. } else {
  1114. yyb17 = r.CheckBreak()
  1115. }
  1116. if yyb17 {
  1117. r.ReadArrayEnd()
  1118. return
  1119. }
  1120. r.ReadArrayElem()
  1121. if r.TryDecodeAsNil() {
  1122. x.PrevExist = ""
  1123. } else {
  1124. yyv22 := &x.PrevExist
  1125. yyv22.CodecDecodeSelf(d)
  1126. }
  1127. yyj17++
  1128. if yyhl17 {
  1129. yyb17 = yyj17 > l
  1130. } else {
  1131. yyb17 = r.CheckBreak()
  1132. }
  1133. if yyb17 {
  1134. r.ReadArrayEnd()
  1135. return
  1136. }
  1137. r.ReadArrayElem()
  1138. if r.TryDecodeAsNil() {
  1139. x.TTL = 0
  1140. } else {
  1141. yyv23 := &x.TTL
  1142. yym24 := z.DecBinary()
  1143. _ = yym24
  1144. if false {
  1145. } else if z.HasExtensions() && z.DecExt(yyv23) {
  1146. } else {
  1147. *((*int64)(yyv23)) = int64(r.DecodeInt(64))
  1148. }
  1149. }
  1150. yyj17++
  1151. if yyhl17 {
  1152. yyb17 = yyj17 > l
  1153. } else {
  1154. yyb17 = r.CheckBreak()
  1155. }
  1156. if yyb17 {
  1157. r.ReadArrayEnd()
  1158. return
  1159. }
  1160. r.ReadArrayElem()
  1161. if r.TryDecodeAsNil() {
  1162. x.Refresh = false
  1163. } else {
  1164. yyv25 := &x.Refresh
  1165. yym26 := z.DecBinary()
  1166. _ = yym26
  1167. if false {
  1168. } else {
  1169. *((*bool)(yyv25)) = r.DecodeBool()
  1170. }
  1171. }
  1172. yyj17++
  1173. if yyhl17 {
  1174. yyb17 = yyj17 > l
  1175. } else {
  1176. yyb17 = r.CheckBreak()
  1177. }
  1178. if yyb17 {
  1179. r.ReadArrayEnd()
  1180. return
  1181. }
  1182. r.ReadArrayElem()
  1183. if r.TryDecodeAsNil() {
  1184. x.Dir = false
  1185. } else {
  1186. yyv27 := &x.Dir
  1187. yym28 := z.DecBinary()
  1188. _ = yym28
  1189. if false {
  1190. } else {
  1191. *((*bool)(yyv27)) = r.DecodeBool()
  1192. }
  1193. }
  1194. yyj17++
  1195. if yyhl17 {
  1196. yyb17 = yyj17 > l
  1197. } else {
  1198. yyb17 = r.CheckBreak()
  1199. }
  1200. if yyb17 {
  1201. r.ReadArrayEnd()
  1202. return
  1203. }
  1204. r.ReadArrayElem()
  1205. if r.TryDecodeAsNil() {
  1206. x.NoValueOnSuccess = false
  1207. } else {
  1208. yyv29 := &x.NoValueOnSuccess
  1209. yym30 := z.DecBinary()
  1210. _ = yym30
  1211. if false {
  1212. } else {
  1213. *((*bool)(yyv29)) = r.DecodeBool()
  1214. }
  1215. }
  1216. for {
  1217. yyj17++
  1218. if yyhl17 {
  1219. yyb17 = yyj17 > l
  1220. } else {
  1221. yyb17 = r.CheckBreak()
  1222. }
  1223. if yyb17 {
  1224. break
  1225. }
  1226. r.ReadArrayElem()
  1227. z.DecStructFieldNotFound(yyj17-1, "")
  1228. }
  1229. r.ReadArrayEnd()
  1230. }
  1231. func (x *GetOptions) CodecEncodeSelf(e *codec1978.Encoder) {
  1232. var h codecSelfer7612
  1233. z, r := codec1978.GenHelperEncoder(e)
  1234. _, _, _ = h, z, r
  1235. if x == nil {
  1236. r.EncodeNil()
  1237. } else {
  1238. yym1 := z.EncBinary()
  1239. _ = yym1
  1240. if false {
  1241. } else if z.HasExtensions() && z.EncExt(x) {
  1242. } else {
  1243. yysep2 := !z.EncBinary()
  1244. yy2arr2 := z.EncBasicHandle().StructToArray
  1245. _, _ = yysep2, yy2arr2
  1246. const yyr2 bool = false
  1247. if yyr2 || yy2arr2 {
  1248. r.WriteArrayStart(3)
  1249. } else {
  1250. r.WriteMapStart(3)
  1251. }
  1252. if yyr2 || yy2arr2 {
  1253. r.WriteArrayElem()
  1254. yym4 := z.EncBinary()
  1255. _ = yym4
  1256. if false {
  1257. } else {
  1258. r.EncodeBool(bool(x.Recursive))
  1259. }
  1260. } else {
  1261. r.WriteMapElemKey()
  1262. r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
  1263. r.WriteMapElemValue()
  1264. yym5 := z.EncBinary()
  1265. _ = yym5
  1266. if false {
  1267. } else {
  1268. r.EncodeBool(bool(x.Recursive))
  1269. }
  1270. }
  1271. if yyr2 || yy2arr2 {
  1272. r.WriteArrayElem()
  1273. yym7 := z.EncBinary()
  1274. _ = yym7
  1275. if false {
  1276. } else {
  1277. r.EncodeBool(bool(x.Sort))
  1278. }
  1279. } else {
  1280. r.WriteMapElemKey()
  1281. r.EncodeString(codecSelferC_UTF87612, string("Sort"))
  1282. r.WriteMapElemValue()
  1283. yym8 := z.EncBinary()
  1284. _ = yym8
  1285. if false {
  1286. } else {
  1287. r.EncodeBool(bool(x.Sort))
  1288. }
  1289. }
  1290. if yyr2 || yy2arr2 {
  1291. r.WriteArrayElem()
  1292. yym10 := z.EncBinary()
  1293. _ = yym10
  1294. if false {
  1295. } else {
  1296. r.EncodeBool(bool(x.Quorum))
  1297. }
  1298. } else {
  1299. r.WriteMapElemKey()
  1300. r.EncodeString(codecSelferC_UTF87612, string("Quorum"))
  1301. r.WriteMapElemValue()
  1302. yym11 := z.EncBinary()
  1303. _ = yym11
  1304. if false {
  1305. } else {
  1306. r.EncodeBool(bool(x.Quorum))
  1307. }
  1308. }
  1309. if yyr2 || yy2arr2 {
  1310. r.WriteArrayEnd()
  1311. } else {
  1312. r.WriteMapEnd()
  1313. }
  1314. }
  1315. }
  1316. }
  1317. func (x *GetOptions) CodecDecodeSelf(d *codec1978.Decoder) {
  1318. var h codecSelfer7612
  1319. z, r := codec1978.GenHelperDecoder(d)
  1320. _, _, _ = h, z, r
  1321. yym1 := z.DecBinary()
  1322. _ = yym1
  1323. if false {
  1324. } else if z.HasExtensions() && z.DecExt(x) {
  1325. } else {
  1326. yyct2 := r.ContainerType()
  1327. if yyct2 == codecSelferValueTypeMap7612 {
  1328. yyl2 := r.ReadMapStart()
  1329. if yyl2 == 0 {
  1330. r.ReadMapEnd()
  1331. } else {
  1332. x.codecDecodeSelfFromMap(yyl2, d)
  1333. }
  1334. } else if yyct2 == codecSelferValueTypeArray7612 {
  1335. yyl2 := r.ReadArrayStart()
  1336. if yyl2 == 0 {
  1337. r.ReadArrayEnd()
  1338. } else {
  1339. x.codecDecodeSelfFromArray(yyl2, d)
  1340. }
  1341. } else {
  1342. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  1343. }
  1344. }
  1345. }
  1346. func (x *GetOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  1347. var h codecSelfer7612
  1348. z, r := codec1978.GenHelperDecoder(d)
  1349. _, _, _ = h, z, r
  1350. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  1351. _ = yys3Slc
  1352. var yyhl3 bool = l >= 0
  1353. for yyj3 := 0; ; yyj3++ {
  1354. if yyhl3 {
  1355. if yyj3 >= l {
  1356. break
  1357. }
  1358. } else {
  1359. if r.CheckBreak() {
  1360. break
  1361. }
  1362. }
  1363. r.ReadMapElemKey()
  1364. yys3Slc = r.DecodeStringAsBytes()
  1365. yys3 := string(yys3Slc)
  1366. r.ReadMapElemValue()
  1367. switch yys3 {
  1368. case "Recursive":
  1369. if r.TryDecodeAsNil() {
  1370. x.Recursive = false
  1371. } else {
  1372. yyv4 := &x.Recursive
  1373. yym5 := z.DecBinary()
  1374. _ = yym5
  1375. if false {
  1376. } else {
  1377. *((*bool)(yyv4)) = r.DecodeBool()
  1378. }
  1379. }
  1380. case "Sort":
  1381. if r.TryDecodeAsNil() {
  1382. x.Sort = false
  1383. } else {
  1384. yyv6 := &x.Sort
  1385. yym7 := z.DecBinary()
  1386. _ = yym7
  1387. if false {
  1388. } else {
  1389. *((*bool)(yyv6)) = r.DecodeBool()
  1390. }
  1391. }
  1392. case "Quorum":
  1393. if r.TryDecodeAsNil() {
  1394. x.Quorum = false
  1395. } else {
  1396. yyv8 := &x.Quorum
  1397. yym9 := z.DecBinary()
  1398. _ = yym9
  1399. if false {
  1400. } else {
  1401. *((*bool)(yyv8)) = r.DecodeBool()
  1402. }
  1403. }
  1404. default:
  1405. z.DecStructFieldNotFound(-1, yys3)
  1406. } // end switch yys3
  1407. } // end for yyj3
  1408. r.ReadMapEnd()
  1409. }
  1410. func (x *GetOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  1411. var h codecSelfer7612
  1412. z, r := codec1978.GenHelperDecoder(d)
  1413. _, _, _ = h, z, r
  1414. var yyj10 int
  1415. var yyb10 bool
  1416. var yyhl10 bool = l >= 0
  1417. yyj10++
  1418. if yyhl10 {
  1419. yyb10 = yyj10 > l
  1420. } else {
  1421. yyb10 = r.CheckBreak()
  1422. }
  1423. if yyb10 {
  1424. r.ReadArrayEnd()
  1425. return
  1426. }
  1427. r.ReadArrayElem()
  1428. if r.TryDecodeAsNil() {
  1429. x.Recursive = false
  1430. } else {
  1431. yyv11 := &x.Recursive
  1432. yym12 := z.DecBinary()
  1433. _ = yym12
  1434. if false {
  1435. } else {
  1436. *((*bool)(yyv11)) = r.DecodeBool()
  1437. }
  1438. }
  1439. yyj10++
  1440. if yyhl10 {
  1441. yyb10 = yyj10 > l
  1442. } else {
  1443. yyb10 = r.CheckBreak()
  1444. }
  1445. if yyb10 {
  1446. r.ReadArrayEnd()
  1447. return
  1448. }
  1449. r.ReadArrayElem()
  1450. if r.TryDecodeAsNil() {
  1451. x.Sort = false
  1452. } else {
  1453. yyv13 := &x.Sort
  1454. yym14 := z.DecBinary()
  1455. _ = yym14
  1456. if false {
  1457. } else {
  1458. *((*bool)(yyv13)) = r.DecodeBool()
  1459. }
  1460. }
  1461. yyj10++
  1462. if yyhl10 {
  1463. yyb10 = yyj10 > l
  1464. } else {
  1465. yyb10 = r.CheckBreak()
  1466. }
  1467. if yyb10 {
  1468. r.ReadArrayEnd()
  1469. return
  1470. }
  1471. r.ReadArrayElem()
  1472. if r.TryDecodeAsNil() {
  1473. x.Quorum = false
  1474. } else {
  1475. yyv15 := &x.Quorum
  1476. yym16 := z.DecBinary()
  1477. _ = yym16
  1478. if false {
  1479. } else {
  1480. *((*bool)(yyv15)) = r.DecodeBool()
  1481. }
  1482. }
  1483. for {
  1484. yyj10++
  1485. if yyhl10 {
  1486. yyb10 = yyj10 > l
  1487. } else {
  1488. yyb10 = r.CheckBreak()
  1489. }
  1490. if yyb10 {
  1491. break
  1492. }
  1493. r.ReadArrayElem()
  1494. z.DecStructFieldNotFound(yyj10-1, "")
  1495. }
  1496. r.ReadArrayEnd()
  1497. }
  1498. func (x *DeleteOptions) CodecEncodeSelf(e *codec1978.Encoder) {
  1499. var h codecSelfer7612
  1500. z, r := codec1978.GenHelperEncoder(e)
  1501. _, _, _ = h, z, r
  1502. if x == nil {
  1503. r.EncodeNil()
  1504. } else {
  1505. yym1 := z.EncBinary()
  1506. _ = yym1
  1507. if false {
  1508. } else if z.HasExtensions() && z.EncExt(x) {
  1509. } else {
  1510. yysep2 := !z.EncBinary()
  1511. yy2arr2 := z.EncBasicHandle().StructToArray
  1512. _, _ = yysep2, yy2arr2
  1513. const yyr2 bool = false
  1514. if yyr2 || yy2arr2 {
  1515. r.WriteArrayStart(4)
  1516. } else {
  1517. r.WriteMapStart(4)
  1518. }
  1519. if yyr2 || yy2arr2 {
  1520. r.WriteArrayElem()
  1521. yym4 := z.EncBinary()
  1522. _ = yym4
  1523. if false {
  1524. } else {
  1525. r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
  1526. }
  1527. } else {
  1528. r.WriteMapElemKey()
  1529. r.EncodeString(codecSelferC_UTF87612, string("PrevValue"))
  1530. r.WriteMapElemValue()
  1531. yym5 := z.EncBinary()
  1532. _ = yym5
  1533. if false {
  1534. } else {
  1535. r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
  1536. }
  1537. }
  1538. if yyr2 || yy2arr2 {
  1539. r.WriteArrayElem()
  1540. yym7 := z.EncBinary()
  1541. _ = yym7
  1542. if false {
  1543. } else {
  1544. r.EncodeUint(uint64(x.PrevIndex))
  1545. }
  1546. } else {
  1547. r.WriteMapElemKey()
  1548. r.EncodeString(codecSelferC_UTF87612, string("PrevIndex"))
  1549. r.WriteMapElemValue()
  1550. yym8 := z.EncBinary()
  1551. _ = yym8
  1552. if false {
  1553. } else {
  1554. r.EncodeUint(uint64(x.PrevIndex))
  1555. }
  1556. }
  1557. if yyr2 || yy2arr2 {
  1558. r.WriteArrayElem()
  1559. yym10 := z.EncBinary()
  1560. _ = yym10
  1561. if false {
  1562. } else {
  1563. r.EncodeBool(bool(x.Recursive))
  1564. }
  1565. } else {
  1566. r.WriteMapElemKey()
  1567. r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
  1568. r.WriteMapElemValue()
  1569. yym11 := z.EncBinary()
  1570. _ = yym11
  1571. if false {
  1572. } else {
  1573. r.EncodeBool(bool(x.Recursive))
  1574. }
  1575. }
  1576. if yyr2 || yy2arr2 {
  1577. r.WriteArrayElem()
  1578. yym13 := z.EncBinary()
  1579. _ = yym13
  1580. if false {
  1581. } else {
  1582. r.EncodeBool(bool(x.Dir))
  1583. }
  1584. } else {
  1585. r.WriteMapElemKey()
  1586. r.EncodeString(codecSelferC_UTF87612, string("Dir"))
  1587. r.WriteMapElemValue()
  1588. yym14 := z.EncBinary()
  1589. _ = yym14
  1590. if false {
  1591. } else {
  1592. r.EncodeBool(bool(x.Dir))
  1593. }
  1594. }
  1595. if yyr2 || yy2arr2 {
  1596. r.WriteArrayEnd()
  1597. } else {
  1598. r.WriteMapEnd()
  1599. }
  1600. }
  1601. }
  1602. }
  1603. func (x *DeleteOptions) CodecDecodeSelf(d *codec1978.Decoder) {
  1604. var h codecSelfer7612
  1605. z, r := codec1978.GenHelperDecoder(d)
  1606. _, _, _ = h, z, r
  1607. yym1 := z.DecBinary()
  1608. _ = yym1
  1609. if false {
  1610. } else if z.HasExtensions() && z.DecExt(x) {
  1611. } else {
  1612. yyct2 := r.ContainerType()
  1613. if yyct2 == codecSelferValueTypeMap7612 {
  1614. yyl2 := r.ReadMapStart()
  1615. if yyl2 == 0 {
  1616. r.ReadMapEnd()
  1617. } else {
  1618. x.codecDecodeSelfFromMap(yyl2, d)
  1619. }
  1620. } else if yyct2 == codecSelferValueTypeArray7612 {
  1621. yyl2 := r.ReadArrayStart()
  1622. if yyl2 == 0 {
  1623. r.ReadArrayEnd()
  1624. } else {
  1625. x.codecDecodeSelfFromArray(yyl2, d)
  1626. }
  1627. } else {
  1628. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  1629. }
  1630. }
  1631. }
  1632. func (x *DeleteOptions) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  1633. var h codecSelfer7612
  1634. z, r := codec1978.GenHelperDecoder(d)
  1635. _, _, _ = h, z, r
  1636. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  1637. _ = yys3Slc
  1638. var yyhl3 bool = l >= 0
  1639. for yyj3 := 0; ; yyj3++ {
  1640. if yyhl3 {
  1641. if yyj3 >= l {
  1642. break
  1643. }
  1644. } else {
  1645. if r.CheckBreak() {
  1646. break
  1647. }
  1648. }
  1649. r.ReadMapElemKey()
  1650. yys3Slc = r.DecodeStringAsBytes()
  1651. yys3 := string(yys3Slc)
  1652. r.ReadMapElemValue()
  1653. switch yys3 {
  1654. case "PrevValue":
  1655. if r.TryDecodeAsNil() {
  1656. x.PrevValue = ""
  1657. } else {
  1658. yyv4 := &x.PrevValue
  1659. yym5 := z.DecBinary()
  1660. _ = yym5
  1661. if false {
  1662. } else {
  1663. *((*string)(yyv4)) = r.DecodeString()
  1664. }
  1665. }
  1666. case "PrevIndex":
  1667. if r.TryDecodeAsNil() {
  1668. x.PrevIndex = 0
  1669. } else {
  1670. yyv6 := &x.PrevIndex
  1671. yym7 := z.DecBinary()
  1672. _ = yym7
  1673. if false {
  1674. } else {
  1675. *((*uint64)(yyv6)) = uint64(r.DecodeUint(64))
  1676. }
  1677. }
  1678. case "Recursive":
  1679. if r.TryDecodeAsNil() {
  1680. x.Recursive = false
  1681. } else {
  1682. yyv8 := &x.Recursive
  1683. yym9 := z.DecBinary()
  1684. _ = yym9
  1685. if false {
  1686. } else {
  1687. *((*bool)(yyv8)) = r.DecodeBool()
  1688. }
  1689. }
  1690. case "Dir":
  1691. if r.TryDecodeAsNil() {
  1692. x.Dir = false
  1693. } else {
  1694. yyv10 := &x.Dir
  1695. yym11 := z.DecBinary()
  1696. _ = yym11
  1697. if false {
  1698. } else {
  1699. *((*bool)(yyv10)) = r.DecodeBool()
  1700. }
  1701. }
  1702. default:
  1703. z.DecStructFieldNotFound(-1, yys3)
  1704. } // end switch yys3
  1705. } // end for yyj3
  1706. r.ReadMapEnd()
  1707. }
  1708. func (x *DeleteOptions) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  1709. var h codecSelfer7612
  1710. z, r := codec1978.GenHelperDecoder(d)
  1711. _, _, _ = h, z, r
  1712. var yyj12 int
  1713. var yyb12 bool
  1714. var yyhl12 bool = l >= 0
  1715. yyj12++
  1716. if yyhl12 {
  1717. yyb12 = yyj12 > l
  1718. } else {
  1719. yyb12 = r.CheckBreak()
  1720. }
  1721. if yyb12 {
  1722. r.ReadArrayEnd()
  1723. return
  1724. }
  1725. r.ReadArrayElem()
  1726. if r.TryDecodeAsNil() {
  1727. x.PrevValue = ""
  1728. } else {
  1729. yyv13 := &x.PrevValue
  1730. yym14 := z.DecBinary()
  1731. _ = yym14
  1732. if false {
  1733. } else {
  1734. *((*string)(yyv13)) = r.DecodeString()
  1735. }
  1736. }
  1737. yyj12++
  1738. if yyhl12 {
  1739. yyb12 = yyj12 > l
  1740. } else {
  1741. yyb12 = r.CheckBreak()
  1742. }
  1743. if yyb12 {
  1744. r.ReadArrayEnd()
  1745. return
  1746. }
  1747. r.ReadArrayElem()
  1748. if r.TryDecodeAsNil() {
  1749. x.PrevIndex = 0
  1750. } else {
  1751. yyv15 := &x.PrevIndex
  1752. yym16 := z.DecBinary()
  1753. _ = yym16
  1754. if false {
  1755. } else {
  1756. *((*uint64)(yyv15)) = uint64(r.DecodeUint(64))
  1757. }
  1758. }
  1759. yyj12++
  1760. if yyhl12 {
  1761. yyb12 = yyj12 > l
  1762. } else {
  1763. yyb12 = r.CheckBreak()
  1764. }
  1765. if yyb12 {
  1766. r.ReadArrayEnd()
  1767. return
  1768. }
  1769. r.ReadArrayElem()
  1770. if r.TryDecodeAsNil() {
  1771. x.Recursive = false
  1772. } else {
  1773. yyv17 := &x.Recursive
  1774. yym18 := z.DecBinary()
  1775. _ = yym18
  1776. if false {
  1777. } else {
  1778. *((*bool)(yyv17)) = r.DecodeBool()
  1779. }
  1780. }
  1781. yyj12++
  1782. if yyhl12 {
  1783. yyb12 = yyj12 > l
  1784. } else {
  1785. yyb12 = r.CheckBreak()
  1786. }
  1787. if yyb12 {
  1788. r.ReadArrayEnd()
  1789. return
  1790. }
  1791. r.ReadArrayElem()
  1792. if r.TryDecodeAsNil() {
  1793. x.Dir = false
  1794. } else {
  1795. yyv19 := &x.Dir
  1796. yym20 := z.DecBinary()
  1797. _ = yym20
  1798. if false {
  1799. } else {
  1800. *((*bool)(yyv19)) = r.DecodeBool()
  1801. }
  1802. }
  1803. for {
  1804. yyj12++
  1805. if yyhl12 {
  1806. yyb12 = yyj12 > l
  1807. } else {
  1808. yyb12 = r.CheckBreak()
  1809. }
  1810. if yyb12 {
  1811. break
  1812. }
  1813. r.ReadArrayElem()
  1814. z.DecStructFieldNotFound(yyj12-1, "")
  1815. }
  1816. r.ReadArrayEnd()
  1817. }
  1818. func (x *Response) CodecEncodeSelf(e *codec1978.Encoder) {
  1819. var h codecSelfer7612
  1820. z, r := codec1978.GenHelperEncoder(e)
  1821. _, _, _ = h, z, r
  1822. if x == nil {
  1823. r.EncodeNil()
  1824. } else {
  1825. yym1 := z.EncBinary()
  1826. _ = yym1
  1827. if false {
  1828. } else if z.HasExtensions() && z.EncExt(x) {
  1829. } else {
  1830. yysep2 := !z.EncBinary()
  1831. yy2arr2 := z.EncBasicHandle().StructToArray
  1832. _, _ = yysep2, yy2arr2
  1833. const yyr2 bool = false
  1834. if yyr2 || yy2arr2 {
  1835. r.WriteArrayStart(3)
  1836. } else {
  1837. r.WriteMapStart(3)
  1838. }
  1839. if yyr2 || yy2arr2 {
  1840. r.WriteArrayElem()
  1841. yym4 := z.EncBinary()
  1842. _ = yym4
  1843. if false {
  1844. } else {
  1845. r.EncodeString(codecSelferC_UTF87612, string(x.Action))
  1846. }
  1847. } else {
  1848. r.WriteMapElemKey()
  1849. r.EncodeString(codecSelferC_UTF87612, string("action"))
  1850. r.WriteMapElemValue()
  1851. yym5 := z.EncBinary()
  1852. _ = yym5
  1853. if false {
  1854. } else {
  1855. r.EncodeString(codecSelferC_UTF87612, string(x.Action))
  1856. }
  1857. }
  1858. var yyn6 bool
  1859. if x.Node == nil {
  1860. yyn6 = true
  1861. goto LABEL6
  1862. }
  1863. LABEL6:
  1864. if yyr2 || yy2arr2 {
  1865. if yyn6 {
  1866. r.WriteArrayElem()
  1867. r.EncodeNil()
  1868. } else {
  1869. r.WriteArrayElem()
  1870. if x.Node == nil {
  1871. r.EncodeNil()
  1872. } else {
  1873. x.Node.CodecEncodeSelf(e)
  1874. }
  1875. }
  1876. } else {
  1877. r.WriteMapElemKey()
  1878. r.EncodeString(codecSelferC_UTF87612, string("node"))
  1879. r.WriteMapElemValue()
  1880. if yyn6 {
  1881. r.EncodeNil()
  1882. } else {
  1883. if x.Node == nil {
  1884. r.EncodeNil()
  1885. } else {
  1886. x.Node.CodecEncodeSelf(e)
  1887. }
  1888. }
  1889. }
  1890. var yyn9 bool
  1891. if x.PrevNode == nil {
  1892. yyn9 = true
  1893. goto LABEL9
  1894. }
  1895. LABEL9:
  1896. if yyr2 || yy2arr2 {
  1897. if yyn9 {
  1898. r.WriteArrayElem()
  1899. r.EncodeNil()
  1900. } else {
  1901. r.WriteArrayElem()
  1902. if x.PrevNode == nil {
  1903. r.EncodeNil()
  1904. } else {
  1905. x.PrevNode.CodecEncodeSelf(e)
  1906. }
  1907. }
  1908. } else {
  1909. r.WriteMapElemKey()
  1910. r.EncodeString(codecSelferC_UTF87612, string("prevNode"))
  1911. r.WriteMapElemValue()
  1912. if yyn9 {
  1913. r.EncodeNil()
  1914. } else {
  1915. if x.PrevNode == nil {
  1916. r.EncodeNil()
  1917. } else {
  1918. x.PrevNode.CodecEncodeSelf(e)
  1919. }
  1920. }
  1921. }
  1922. if yyr2 || yy2arr2 {
  1923. r.WriteArrayEnd()
  1924. } else {
  1925. r.WriteMapEnd()
  1926. }
  1927. }
  1928. }
  1929. }
  1930. func (x *Response) CodecDecodeSelf(d *codec1978.Decoder) {
  1931. var h codecSelfer7612
  1932. z, r := codec1978.GenHelperDecoder(d)
  1933. _, _, _ = h, z, r
  1934. yym1 := z.DecBinary()
  1935. _ = yym1
  1936. if false {
  1937. } else if z.HasExtensions() && z.DecExt(x) {
  1938. } else {
  1939. yyct2 := r.ContainerType()
  1940. if yyct2 == codecSelferValueTypeMap7612 {
  1941. yyl2 := r.ReadMapStart()
  1942. if yyl2 == 0 {
  1943. r.ReadMapEnd()
  1944. } else {
  1945. x.codecDecodeSelfFromMap(yyl2, d)
  1946. }
  1947. } else if yyct2 == codecSelferValueTypeArray7612 {
  1948. yyl2 := r.ReadArrayStart()
  1949. if yyl2 == 0 {
  1950. r.ReadArrayEnd()
  1951. } else {
  1952. x.codecDecodeSelfFromArray(yyl2, d)
  1953. }
  1954. } else {
  1955. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  1956. }
  1957. }
  1958. }
  1959. func (x *Response) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  1960. var h codecSelfer7612
  1961. z, r := codec1978.GenHelperDecoder(d)
  1962. _, _, _ = h, z, r
  1963. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  1964. _ = yys3Slc
  1965. var yyhl3 bool = l >= 0
  1966. for yyj3 := 0; ; yyj3++ {
  1967. if yyhl3 {
  1968. if yyj3 >= l {
  1969. break
  1970. }
  1971. } else {
  1972. if r.CheckBreak() {
  1973. break
  1974. }
  1975. }
  1976. r.ReadMapElemKey()
  1977. yys3Slc = r.DecodeStringAsBytes()
  1978. yys3 := string(yys3Slc)
  1979. r.ReadMapElemValue()
  1980. switch yys3 {
  1981. case "action":
  1982. if r.TryDecodeAsNil() {
  1983. x.Action = ""
  1984. } else {
  1985. yyv4 := &x.Action
  1986. yym5 := z.DecBinary()
  1987. _ = yym5
  1988. if false {
  1989. } else {
  1990. *((*string)(yyv4)) = r.DecodeString()
  1991. }
  1992. }
  1993. case "node":
  1994. if x.Node == nil {
  1995. x.Node = new(Node)
  1996. }
  1997. if r.TryDecodeAsNil() {
  1998. if x.Node != nil {
  1999. x.Node = nil
  2000. }
  2001. } else {
  2002. if x.Node == nil {
  2003. x.Node = new(Node)
  2004. }
  2005. x.Node.CodecDecodeSelf(d)
  2006. }
  2007. case "prevNode":
  2008. if x.PrevNode == nil {
  2009. x.PrevNode = new(Node)
  2010. }
  2011. if r.TryDecodeAsNil() {
  2012. if x.PrevNode != nil {
  2013. x.PrevNode = nil
  2014. }
  2015. } else {
  2016. if x.PrevNode == nil {
  2017. x.PrevNode = new(Node)
  2018. }
  2019. x.PrevNode.CodecDecodeSelf(d)
  2020. }
  2021. default:
  2022. z.DecStructFieldNotFound(-1, yys3)
  2023. } // end switch yys3
  2024. } // end for yyj3
  2025. r.ReadMapEnd()
  2026. }
  2027. func (x *Response) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  2028. var h codecSelfer7612
  2029. z, r := codec1978.GenHelperDecoder(d)
  2030. _, _, _ = h, z, r
  2031. var yyj8 int
  2032. var yyb8 bool
  2033. var yyhl8 bool = l >= 0
  2034. yyj8++
  2035. if yyhl8 {
  2036. yyb8 = yyj8 > l
  2037. } else {
  2038. yyb8 = r.CheckBreak()
  2039. }
  2040. if yyb8 {
  2041. r.ReadArrayEnd()
  2042. return
  2043. }
  2044. r.ReadArrayElem()
  2045. if r.TryDecodeAsNil() {
  2046. x.Action = ""
  2047. } else {
  2048. yyv9 := &x.Action
  2049. yym10 := z.DecBinary()
  2050. _ = yym10
  2051. if false {
  2052. } else {
  2053. *((*string)(yyv9)) = r.DecodeString()
  2054. }
  2055. }
  2056. if x.Node == nil {
  2057. x.Node = new(Node)
  2058. }
  2059. yyj8++
  2060. if yyhl8 {
  2061. yyb8 = yyj8 > l
  2062. } else {
  2063. yyb8 = r.CheckBreak()
  2064. }
  2065. if yyb8 {
  2066. r.ReadArrayEnd()
  2067. return
  2068. }
  2069. r.ReadArrayElem()
  2070. if r.TryDecodeAsNil() {
  2071. if x.Node != nil {
  2072. x.Node = nil
  2073. }
  2074. } else {
  2075. if x.Node == nil {
  2076. x.Node = new(Node)
  2077. }
  2078. x.Node.CodecDecodeSelf(d)
  2079. }
  2080. if x.PrevNode == nil {
  2081. x.PrevNode = new(Node)
  2082. }
  2083. yyj8++
  2084. if yyhl8 {
  2085. yyb8 = yyj8 > l
  2086. } else {
  2087. yyb8 = r.CheckBreak()
  2088. }
  2089. if yyb8 {
  2090. r.ReadArrayEnd()
  2091. return
  2092. }
  2093. r.ReadArrayElem()
  2094. if r.TryDecodeAsNil() {
  2095. if x.PrevNode != nil {
  2096. x.PrevNode = nil
  2097. }
  2098. } else {
  2099. if x.PrevNode == nil {
  2100. x.PrevNode = new(Node)
  2101. }
  2102. x.PrevNode.CodecDecodeSelf(d)
  2103. }
  2104. for {
  2105. yyj8++
  2106. if yyhl8 {
  2107. yyb8 = yyj8 > l
  2108. } else {
  2109. yyb8 = r.CheckBreak()
  2110. }
  2111. if yyb8 {
  2112. break
  2113. }
  2114. r.ReadArrayElem()
  2115. z.DecStructFieldNotFound(yyj8-1, "")
  2116. }
  2117. r.ReadArrayEnd()
  2118. }
  2119. func (x *Node) CodecEncodeSelf(e *codec1978.Encoder) {
  2120. var h codecSelfer7612
  2121. z, r := codec1978.GenHelperEncoder(e)
  2122. _, _, _ = h, z, r
  2123. if x == nil {
  2124. r.EncodeNil()
  2125. } else {
  2126. yym1 := z.EncBinary()
  2127. _ = yym1
  2128. if false {
  2129. } else if z.HasExtensions() && z.EncExt(x) {
  2130. } else {
  2131. yysep2 := !z.EncBinary()
  2132. yy2arr2 := z.EncBasicHandle().StructToArray
  2133. var yyq2 [8]bool
  2134. _ = yyq2
  2135. _, _ = yysep2, yy2arr2
  2136. const yyr2 bool = false
  2137. yyq2[1] = x.Dir != false
  2138. yyq2[6] = x.Expiration != nil
  2139. yyq2[7] = x.TTL != 0
  2140. if yyr2 || yy2arr2 {
  2141. r.WriteArrayStart(8)
  2142. } else {
  2143. var yynn2 = 5
  2144. for _, b := range yyq2 {
  2145. if b {
  2146. yynn2++
  2147. }
  2148. }
  2149. r.WriteMapStart(yynn2)
  2150. yynn2 = 0
  2151. }
  2152. if yyr2 || yy2arr2 {
  2153. r.WriteArrayElem()
  2154. yym4 := z.EncBinary()
  2155. _ = yym4
  2156. if false {
  2157. } else {
  2158. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  2159. }
  2160. } else {
  2161. r.WriteMapElemKey()
  2162. r.EncodeString(codecSelferC_UTF87612, string("key"))
  2163. r.WriteMapElemValue()
  2164. yym5 := z.EncBinary()
  2165. _ = yym5
  2166. if false {
  2167. } else {
  2168. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  2169. }
  2170. }
  2171. if yyr2 || yy2arr2 {
  2172. r.WriteArrayElem()
  2173. if yyq2[1] {
  2174. yym7 := z.EncBinary()
  2175. _ = yym7
  2176. if false {
  2177. } else {
  2178. r.EncodeBool(bool(x.Dir))
  2179. }
  2180. } else {
  2181. r.EncodeBool(false)
  2182. }
  2183. } else {
  2184. if yyq2[1] {
  2185. r.WriteMapElemKey()
  2186. r.EncodeString(codecSelferC_UTF87612, string("dir"))
  2187. r.WriteMapElemValue()
  2188. yym8 := z.EncBinary()
  2189. _ = yym8
  2190. if false {
  2191. } else {
  2192. r.EncodeBool(bool(x.Dir))
  2193. }
  2194. }
  2195. }
  2196. if yyr2 || yy2arr2 {
  2197. r.WriteArrayElem()
  2198. yym10 := z.EncBinary()
  2199. _ = yym10
  2200. if false {
  2201. } else {
  2202. r.EncodeString(codecSelferC_UTF87612, string(x.Value))
  2203. }
  2204. } else {
  2205. r.WriteMapElemKey()
  2206. r.EncodeString(codecSelferC_UTF87612, string("value"))
  2207. r.WriteMapElemValue()
  2208. yym11 := z.EncBinary()
  2209. _ = yym11
  2210. if false {
  2211. } else {
  2212. r.EncodeString(codecSelferC_UTF87612, string(x.Value))
  2213. }
  2214. }
  2215. if yyr2 || yy2arr2 {
  2216. r.WriteArrayElem()
  2217. if x.Nodes == nil {
  2218. r.EncodeNil()
  2219. } else {
  2220. x.Nodes.CodecEncodeSelf(e)
  2221. }
  2222. } else {
  2223. r.WriteMapElemKey()
  2224. r.EncodeString(codecSelferC_UTF87612, string("nodes"))
  2225. r.WriteMapElemValue()
  2226. if x.Nodes == nil {
  2227. r.EncodeNil()
  2228. } else {
  2229. x.Nodes.CodecEncodeSelf(e)
  2230. }
  2231. }
  2232. if yyr2 || yy2arr2 {
  2233. r.WriteArrayElem()
  2234. yym16 := z.EncBinary()
  2235. _ = yym16
  2236. if false {
  2237. } else {
  2238. r.EncodeUint(uint64(x.CreatedIndex))
  2239. }
  2240. } else {
  2241. r.WriteMapElemKey()
  2242. r.EncodeString(codecSelferC_UTF87612, string("createdIndex"))
  2243. r.WriteMapElemValue()
  2244. yym17 := z.EncBinary()
  2245. _ = yym17
  2246. if false {
  2247. } else {
  2248. r.EncodeUint(uint64(x.CreatedIndex))
  2249. }
  2250. }
  2251. if yyr2 || yy2arr2 {
  2252. r.WriteArrayElem()
  2253. yym19 := z.EncBinary()
  2254. _ = yym19
  2255. if false {
  2256. } else {
  2257. r.EncodeUint(uint64(x.ModifiedIndex))
  2258. }
  2259. } else {
  2260. r.WriteMapElemKey()
  2261. r.EncodeString(codecSelferC_UTF87612, string("modifiedIndex"))
  2262. r.WriteMapElemValue()
  2263. yym20 := z.EncBinary()
  2264. _ = yym20
  2265. if false {
  2266. } else {
  2267. r.EncodeUint(uint64(x.ModifiedIndex))
  2268. }
  2269. }
  2270. var yyn21 bool
  2271. if x.Expiration == nil {
  2272. yyn21 = true
  2273. goto LABEL21
  2274. }
  2275. LABEL21:
  2276. if yyr2 || yy2arr2 {
  2277. if yyn21 {
  2278. r.WriteArrayElem()
  2279. r.EncodeNil()
  2280. } else {
  2281. r.WriteArrayElem()
  2282. if yyq2[6] {
  2283. if x.Expiration == nil {
  2284. r.EncodeNil()
  2285. } else {
  2286. yym22 := z.EncBinary()
  2287. _ = yym22
  2288. if false {
  2289. } else if yym23 := z.TimeRtidIfBinc(); yym23 != 0 {
  2290. r.EncodeBuiltin(yym23, x.Expiration)
  2291. } else if z.HasExtensions() && z.EncExt(x.Expiration) {
  2292. } else if yym22 {
  2293. z.EncBinaryMarshal(x.Expiration)
  2294. } else if !yym22 && z.IsJSONHandle() {
  2295. z.EncJSONMarshal(x.Expiration)
  2296. } else {
  2297. z.EncFallback(x.Expiration)
  2298. }
  2299. }
  2300. } else {
  2301. r.EncodeNil()
  2302. }
  2303. }
  2304. } else {
  2305. if yyq2[6] {
  2306. r.WriteMapElemKey()
  2307. r.EncodeString(codecSelferC_UTF87612, string("expiration"))
  2308. r.WriteMapElemValue()
  2309. if yyn21 {
  2310. r.EncodeNil()
  2311. } else {
  2312. if x.Expiration == nil {
  2313. r.EncodeNil()
  2314. } else {
  2315. yym24 := z.EncBinary()
  2316. _ = yym24
  2317. if false {
  2318. } else if yym25 := z.TimeRtidIfBinc(); yym25 != 0 {
  2319. r.EncodeBuiltin(yym25, x.Expiration)
  2320. } else if z.HasExtensions() && z.EncExt(x.Expiration) {
  2321. } else if yym24 {
  2322. z.EncBinaryMarshal(x.Expiration)
  2323. } else if !yym24 && z.IsJSONHandle() {
  2324. z.EncJSONMarshal(x.Expiration)
  2325. } else {
  2326. z.EncFallback(x.Expiration)
  2327. }
  2328. }
  2329. }
  2330. }
  2331. }
  2332. if yyr2 || yy2arr2 {
  2333. r.WriteArrayElem()
  2334. if yyq2[7] {
  2335. yym27 := z.EncBinary()
  2336. _ = yym27
  2337. if false {
  2338. } else {
  2339. r.EncodeInt(int64(x.TTL))
  2340. }
  2341. } else {
  2342. r.EncodeInt(0)
  2343. }
  2344. } else {
  2345. if yyq2[7] {
  2346. r.WriteMapElemKey()
  2347. r.EncodeString(codecSelferC_UTF87612, string("ttl"))
  2348. r.WriteMapElemValue()
  2349. yym28 := z.EncBinary()
  2350. _ = yym28
  2351. if false {
  2352. } else {
  2353. r.EncodeInt(int64(x.TTL))
  2354. }
  2355. }
  2356. }
  2357. if yyr2 || yy2arr2 {
  2358. r.WriteArrayEnd()
  2359. } else {
  2360. r.WriteMapEnd()
  2361. }
  2362. }
  2363. }
  2364. }
  2365. func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) {
  2366. var h codecSelfer7612
  2367. z, r := codec1978.GenHelperDecoder(d)
  2368. _, _, _ = h, z, r
  2369. yym1 := z.DecBinary()
  2370. _ = yym1
  2371. if false {
  2372. } else if z.HasExtensions() && z.DecExt(x) {
  2373. } else {
  2374. yyct2 := r.ContainerType()
  2375. if yyct2 == codecSelferValueTypeMap7612 {
  2376. yyl2 := r.ReadMapStart()
  2377. if yyl2 == 0 {
  2378. r.ReadMapEnd()
  2379. } else {
  2380. x.codecDecodeSelfFromMap(yyl2, d)
  2381. }
  2382. } else if yyct2 == codecSelferValueTypeArray7612 {
  2383. yyl2 := r.ReadArrayStart()
  2384. if yyl2 == 0 {
  2385. r.ReadArrayEnd()
  2386. } else {
  2387. x.codecDecodeSelfFromArray(yyl2, d)
  2388. }
  2389. } else {
  2390. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  2391. }
  2392. }
  2393. }
  2394. func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  2395. var h codecSelfer7612
  2396. z, r := codec1978.GenHelperDecoder(d)
  2397. _, _, _ = h, z, r
  2398. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  2399. _ = yys3Slc
  2400. var yyhl3 bool = l >= 0
  2401. for yyj3 := 0; ; yyj3++ {
  2402. if yyhl3 {
  2403. if yyj3 >= l {
  2404. break
  2405. }
  2406. } else {
  2407. if r.CheckBreak() {
  2408. break
  2409. }
  2410. }
  2411. r.ReadMapElemKey()
  2412. yys3Slc = r.DecodeStringAsBytes()
  2413. yys3 := string(yys3Slc)
  2414. r.ReadMapElemValue()
  2415. switch yys3 {
  2416. case "key":
  2417. if r.TryDecodeAsNil() {
  2418. x.Key = ""
  2419. } else {
  2420. yyv4 := &x.Key
  2421. yym5 := z.DecBinary()
  2422. _ = yym5
  2423. if false {
  2424. } else {
  2425. *((*string)(yyv4)) = r.DecodeString()
  2426. }
  2427. }
  2428. case "dir":
  2429. if r.TryDecodeAsNil() {
  2430. x.Dir = false
  2431. } else {
  2432. yyv6 := &x.Dir
  2433. yym7 := z.DecBinary()
  2434. _ = yym7
  2435. if false {
  2436. } else {
  2437. *((*bool)(yyv6)) = r.DecodeBool()
  2438. }
  2439. }
  2440. case "value":
  2441. if r.TryDecodeAsNil() {
  2442. x.Value = ""
  2443. } else {
  2444. yyv8 := &x.Value
  2445. yym9 := z.DecBinary()
  2446. _ = yym9
  2447. if false {
  2448. } else {
  2449. *((*string)(yyv8)) = r.DecodeString()
  2450. }
  2451. }
  2452. case "nodes":
  2453. if r.TryDecodeAsNil() {
  2454. x.Nodes = nil
  2455. } else {
  2456. yyv10 := &x.Nodes
  2457. yyv10.CodecDecodeSelf(d)
  2458. }
  2459. case "createdIndex":
  2460. if r.TryDecodeAsNil() {
  2461. x.CreatedIndex = 0
  2462. } else {
  2463. yyv11 := &x.CreatedIndex
  2464. yym12 := z.DecBinary()
  2465. _ = yym12
  2466. if false {
  2467. } else {
  2468. *((*uint64)(yyv11)) = uint64(r.DecodeUint(64))
  2469. }
  2470. }
  2471. case "modifiedIndex":
  2472. if r.TryDecodeAsNil() {
  2473. x.ModifiedIndex = 0
  2474. } else {
  2475. yyv13 := &x.ModifiedIndex
  2476. yym14 := z.DecBinary()
  2477. _ = yym14
  2478. if false {
  2479. } else {
  2480. *((*uint64)(yyv13)) = uint64(r.DecodeUint(64))
  2481. }
  2482. }
  2483. case "expiration":
  2484. if x.Expiration == nil {
  2485. x.Expiration = new(time.Time)
  2486. }
  2487. if r.TryDecodeAsNil() {
  2488. if x.Expiration != nil {
  2489. x.Expiration = nil
  2490. }
  2491. } else {
  2492. if x.Expiration == nil {
  2493. x.Expiration = new(time.Time)
  2494. }
  2495. yym16 := z.DecBinary()
  2496. _ = yym16
  2497. if false {
  2498. } else if yym17 := z.TimeRtidIfBinc(); yym17 != 0 {
  2499. r.DecodeBuiltin(yym17, x.Expiration)
  2500. } else if z.HasExtensions() && z.DecExt(x.Expiration) {
  2501. } else if yym16 {
  2502. z.DecBinaryUnmarshal(x.Expiration)
  2503. } else if !yym16 && z.IsJSONHandle() {
  2504. z.DecJSONUnmarshal(x.Expiration)
  2505. } else {
  2506. z.DecFallback(x.Expiration, false)
  2507. }
  2508. }
  2509. case "ttl":
  2510. if r.TryDecodeAsNil() {
  2511. x.TTL = 0
  2512. } else {
  2513. yyv18 := &x.TTL
  2514. yym19 := z.DecBinary()
  2515. _ = yym19
  2516. if false {
  2517. } else {
  2518. *((*int64)(yyv18)) = int64(r.DecodeInt(64))
  2519. }
  2520. }
  2521. default:
  2522. z.DecStructFieldNotFound(-1, yys3)
  2523. } // end switch yys3
  2524. } // end for yyj3
  2525. r.ReadMapEnd()
  2526. }
  2527. func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  2528. var h codecSelfer7612
  2529. z, r := codec1978.GenHelperDecoder(d)
  2530. _, _, _ = h, z, r
  2531. var yyj20 int
  2532. var yyb20 bool
  2533. var yyhl20 bool = l >= 0
  2534. yyj20++
  2535. if yyhl20 {
  2536. yyb20 = yyj20 > l
  2537. } else {
  2538. yyb20 = r.CheckBreak()
  2539. }
  2540. if yyb20 {
  2541. r.ReadArrayEnd()
  2542. return
  2543. }
  2544. r.ReadArrayElem()
  2545. if r.TryDecodeAsNil() {
  2546. x.Key = ""
  2547. } else {
  2548. yyv21 := &x.Key
  2549. yym22 := z.DecBinary()
  2550. _ = yym22
  2551. if false {
  2552. } else {
  2553. *((*string)(yyv21)) = r.DecodeString()
  2554. }
  2555. }
  2556. yyj20++
  2557. if yyhl20 {
  2558. yyb20 = yyj20 > l
  2559. } else {
  2560. yyb20 = r.CheckBreak()
  2561. }
  2562. if yyb20 {
  2563. r.ReadArrayEnd()
  2564. return
  2565. }
  2566. r.ReadArrayElem()
  2567. if r.TryDecodeAsNil() {
  2568. x.Dir = false
  2569. } else {
  2570. yyv23 := &x.Dir
  2571. yym24 := z.DecBinary()
  2572. _ = yym24
  2573. if false {
  2574. } else {
  2575. *((*bool)(yyv23)) = r.DecodeBool()
  2576. }
  2577. }
  2578. yyj20++
  2579. if yyhl20 {
  2580. yyb20 = yyj20 > l
  2581. } else {
  2582. yyb20 = r.CheckBreak()
  2583. }
  2584. if yyb20 {
  2585. r.ReadArrayEnd()
  2586. return
  2587. }
  2588. r.ReadArrayElem()
  2589. if r.TryDecodeAsNil() {
  2590. x.Value = ""
  2591. } else {
  2592. yyv25 := &x.Value
  2593. yym26 := z.DecBinary()
  2594. _ = yym26
  2595. if false {
  2596. } else {
  2597. *((*string)(yyv25)) = r.DecodeString()
  2598. }
  2599. }
  2600. yyj20++
  2601. if yyhl20 {
  2602. yyb20 = yyj20 > l
  2603. } else {
  2604. yyb20 = r.CheckBreak()
  2605. }
  2606. if yyb20 {
  2607. r.ReadArrayEnd()
  2608. return
  2609. }
  2610. r.ReadArrayElem()
  2611. if r.TryDecodeAsNil() {
  2612. x.Nodes = nil
  2613. } else {
  2614. yyv27 := &x.Nodes
  2615. yyv27.CodecDecodeSelf(d)
  2616. }
  2617. yyj20++
  2618. if yyhl20 {
  2619. yyb20 = yyj20 > l
  2620. } else {
  2621. yyb20 = r.CheckBreak()
  2622. }
  2623. if yyb20 {
  2624. r.ReadArrayEnd()
  2625. return
  2626. }
  2627. r.ReadArrayElem()
  2628. if r.TryDecodeAsNil() {
  2629. x.CreatedIndex = 0
  2630. } else {
  2631. yyv28 := &x.CreatedIndex
  2632. yym29 := z.DecBinary()
  2633. _ = yym29
  2634. if false {
  2635. } else {
  2636. *((*uint64)(yyv28)) = uint64(r.DecodeUint(64))
  2637. }
  2638. }
  2639. yyj20++
  2640. if yyhl20 {
  2641. yyb20 = yyj20 > l
  2642. } else {
  2643. yyb20 = r.CheckBreak()
  2644. }
  2645. if yyb20 {
  2646. r.ReadArrayEnd()
  2647. return
  2648. }
  2649. r.ReadArrayElem()
  2650. if r.TryDecodeAsNil() {
  2651. x.ModifiedIndex = 0
  2652. } else {
  2653. yyv30 := &x.ModifiedIndex
  2654. yym31 := z.DecBinary()
  2655. _ = yym31
  2656. if false {
  2657. } else {
  2658. *((*uint64)(yyv30)) = uint64(r.DecodeUint(64))
  2659. }
  2660. }
  2661. if x.Expiration == nil {
  2662. x.Expiration = new(time.Time)
  2663. }
  2664. yyj20++
  2665. if yyhl20 {
  2666. yyb20 = yyj20 > l
  2667. } else {
  2668. yyb20 = r.CheckBreak()
  2669. }
  2670. if yyb20 {
  2671. r.ReadArrayEnd()
  2672. return
  2673. }
  2674. r.ReadArrayElem()
  2675. if r.TryDecodeAsNil() {
  2676. if x.Expiration != nil {
  2677. x.Expiration = nil
  2678. }
  2679. } else {
  2680. if x.Expiration == nil {
  2681. x.Expiration = new(time.Time)
  2682. }
  2683. yym33 := z.DecBinary()
  2684. _ = yym33
  2685. if false {
  2686. } else if yym34 := z.TimeRtidIfBinc(); yym34 != 0 {
  2687. r.DecodeBuiltin(yym34, x.Expiration)
  2688. } else if z.HasExtensions() && z.DecExt(x.Expiration) {
  2689. } else if yym33 {
  2690. z.DecBinaryUnmarshal(x.Expiration)
  2691. } else if !yym33 && z.IsJSONHandle() {
  2692. z.DecJSONUnmarshal(x.Expiration)
  2693. } else {
  2694. z.DecFallback(x.Expiration, false)
  2695. }
  2696. }
  2697. yyj20++
  2698. if yyhl20 {
  2699. yyb20 = yyj20 > l
  2700. } else {
  2701. yyb20 = r.CheckBreak()
  2702. }
  2703. if yyb20 {
  2704. r.ReadArrayEnd()
  2705. return
  2706. }
  2707. r.ReadArrayElem()
  2708. if r.TryDecodeAsNil() {
  2709. x.TTL = 0
  2710. } else {
  2711. yyv35 := &x.TTL
  2712. yym36 := z.DecBinary()
  2713. _ = yym36
  2714. if false {
  2715. } else {
  2716. *((*int64)(yyv35)) = int64(r.DecodeInt(64))
  2717. }
  2718. }
  2719. for {
  2720. yyj20++
  2721. if yyhl20 {
  2722. yyb20 = yyj20 > l
  2723. } else {
  2724. yyb20 = r.CheckBreak()
  2725. }
  2726. if yyb20 {
  2727. break
  2728. }
  2729. r.ReadArrayElem()
  2730. z.DecStructFieldNotFound(yyj20-1, "")
  2731. }
  2732. r.ReadArrayEnd()
  2733. }
  2734. func (x Nodes) CodecEncodeSelf(e *codec1978.Encoder) {
  2735. var h codecSelfer7612
  2736. z, r := codec1978.GenHelperEncoder(e)
  2737. _, _, _ = h, z, r
  2738. if x == nil {
  2739. r.EncodeNil()
  2740. } else {
  2741. yym1 := z.EncBinary()
  2742. _ = yym1
  2743. if false {
  2744. } else if z.HasExtensions() && z.EncExt(x) {
  2745. } else {
  2746. h.encNodes((Nodes)(x), e)
  2747. }
  2748. }
  2749. }
  2750. func (x *Nodes) CodecDecodeSelf(d *codec1978.Decoder) {
  2751. var h codecSelfer7612
  2752. z, r := codec1978.GenHelperDecoder(d)
  2753. _, _, _ = h, z, r
  2754. yym1 := z.DecBinary()
  2755. _ = yym1
  2756. if false {
  2757. } else if z.HasExtensions() && z.DecExt(x) {
  2758. } else {
  2759. h.decNodes((*Nodes)(x), d)
  2760. }
  2761. }
  2762. func (x *httpKeysAPI) CodecEncodeSelf(e *codec1978.Encoder) {
  2763. var h codecSelfer7612
  2764. z, r := codec1978.GenHelperEncoder(e)
  2765. _, _, _ = h, z, r
  2766. if x == nil {
  2767. r.EncodeNil()
  2768. } else {
  2769. yym1 := z.EncBinary()
  2770. _ = yym1
  2771. if false {
  2772. } else if z.HasExtensions() && z.EncExt(x) {
  2773. } else {
  2774. yysep2 := !z.EncBinary()
  2775. yy2arr2 := z.EncBasicHandle().StructToArray
  2776. _, _ = yysep2, yy2arr2
  2777. const yyr2 bool = false
  2778. if yyr2 || yy2arr2 {
  2779. r.WriteArrayStart(0)
  2780. } else {
  2781. r.WriteMapStart(0)
  2782. }
  2783. if yyr2 || yy2arr2 {
  2784. r.WriteArrayEnd()
  2785. } else {
  2786. r.WriteMapEnd()
  2787. }
  2788. }
  2789. }
  2790. }
  2791. func (x *httpKeysAPI) CodecDecodeSelf(d *codec1978.Decoder) {
  2792. var h codecSelfer7612
  2793. z, r := codec1978.GenHelperDecoder(d)
  2794. _, _, _ = h, z, r
  2795. yym1 := z.DecBinary()
  2796. _ = yym1
  2797. if false {
  2798. } else if z.HasExtensions() && z.DecExt(x) {
  2799. } else {
  2800. yyct2 := r.ContainerType()
  2801. if yyct2 == codecSelferValueTypeMap7612 {
  2802. yyl2 := r.ReadMapStart()
  2803. if yyl2 == 0 {
  2804. r.ReadMapEnd()
  2805. } else {
  2806. x.codecDecodeSelfFromMap(yyl2, d)
  2807. }
  2808. } else if yyct2 == codecSelferValueTypeArray7612 {
  2809. yyl2 := r.ReadArrayStart()
  2810. if yyl2 == 0 {
  2811. r.ReadArrayEnd()
  2812. } else {
  2813. x.codecDecodeSelfFromArray(yyl2, d)
  2814. }
  2815. } else {
  2816. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  2817. }
  2818. }
  2819. }
  2820. func (x *httpKeysAPI) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  2821. var h codecSelfer7612
  2822. z, r := codec1978.GenHelperDecoder(d)
  2823. _, _, _ = h, z, r
  2824. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  2825. _ = yys3Slc
  2826. var yyhl3 bool = l >= 0
  2827. for yyj3 := 0; ; yyj3++ {
  2828. if yyhl3 {
  2829. if yyj3 >= l {
  2830. break
  2831. }
  2832. } else {
  2833. if r.CheckBreak() {
  2834. break
  2835. }
  2836. }
  2837. r.ReadMapElemKey()
  2838. yys3Slc = r.DecodeStringAsBytes()
  2839. yys3 := string(yys3Slc)
  2840. r.ReadMapElemValue()
  2841. switch yys3 {
  2842. default:
  2843. z.DecStructFieldNotFound(-1, yys3)
  2844. } // end switch yys3
  2845. } // end for yyj3
  2846. r.ReadMapEnd()
  2847. }
  2848. func (x *httpKeysAPI) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  2849. var h codecSelfer7612
  2850. z, r := codec1978.GenHelperDecoder(d)
  2851. _, _, _ = h, z, r
  2852. var yyj4 int
  2853. var yyb4 bool
  2854. var yyhl4 bool = l >= 0
  2855. for {
  2856. yyj4++
  2857. if yyhl4 {
  2858. yyb4 = yyj4 > l
  2859. } else {
  2860. yyb4 = r.CheckBreak()
  2861. }
  2862. if yyb4 {
  2863. break
  2864. }
  2865. r.ReadArrayElem()
  2866. z.DecStructFieldNotFound(yyj4-1, "")
  2867. }
  2868. r.ReadArrayEnd()
  2869. }
  2870. func (x *httpWatcher) CodecEncodeSelf(e *codec1978.Encoder) {
  2871. var h codecSelfer7612
  2872. z, r := codec1978.GenHelperEncoder(e)
  2873. _, _, _ = h, z, r
  2874. if x == nil {
  2875. r.EncodeNil()
  2876. } else {
  2877. yym1 := z.EncBinary()
  2878. _ = yym1
  2879. if false {
  2880. } else if z.HasExtensions() && z.EncExt(x) {
  2881. } else {
  2882. yysep2 := !z.EncBinary()
  2883. yy2arr2 := z.EncBasicHandle().StructToArray
  2884. _, _ = yysep2, yy2arr2
  2885. const yyr2 bool = false
  2886. if yyr2 || yy2arr2 {
  2887. r.WriteArrayStart(0)
  2888. } else {
  2889. r.WriteMapStart(0)
  2890. }
  2891. if yyr2 || yy2arr2 {
  2892. r.WriteArrayEnd()
  2893. } else {
  2894. r.WriteMapEnd()
  2895. }
  2896. }
  2897. }
  2898. }
  2899. func (x *httpWatcher) CodecDecodeSelf(d *codec1978.Decoder) {
  2900. var h codecSelfer7612
  2901. z, r := codec1978.GenHelperDecoder(d)
  2902. _, _, _ = h, z, r
  2903. yym1 := z.DecBinary()
  2904. _ = yym1
  2905. if false {
  2906. } else if z.HasExtensions() && z.DecExt(x) {
  2907. } else {
  2908. yyct2 := r.ContainerType()
  2909. if yyct2 == codecSelferValueTypeMap7612 {
  2910. yyl2 := r.ReadMapStart()
  2911. if yyl2 == 0 {
  2912. r.ReadMapEnd()
  2913. } else {
  2914. x.codecDecodeSelfFromMap(yyl2, d)
  2915. }
  2916. } else if yyct2 == codecSelferValueTypeArray7612 {
  2917. yyl2 := r.ReadArrayStart()
  2918. if yyl2 == 0 {
  2919. r.ReadArrayEnd()
  2920. } else {
  2921. x.codecDecodeSelfFromArray(yyl2, d)
  2922. }
  2923. } else {
  2924. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  2925. }
  2926. }
  2927. }
  2928. func (x *httpWatcher) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  2929. var h codecSelfer7612
  2930. z, r := codec1978.GenHelperDecoder(d)
  2931. _, _, _ = h, z, r
  2932. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  2933. _ = yys3Slc
  2934. var yyhl3 bool = l >= 0
  2935. for yyj3 := 0; ; yyj3++ {
  2936. if yyhl3 {
  2937. if yyj3 >= l {
  2938. break
  2939. }
  2940. } else {
  2941. if r.CheckBreak() {
  2942. break
  2943. }
  2944. }
  2945. r.ReadMapElemKey()
  2946. yys3Slc = r.DecodeStringAsBytes()
  2947. yys3 := string(yys3Slc)
  2948. r.ReadMapElemValue()
  2949. switch yys3 {
  2950. default:
  2951. z.DecStructFieldNotFound(-1, yys3)
  2952. } // end switch yys3
  2953. } // end for yyj3
  2954. r.ReadMapEnd()
  2955. }
  2956. func (x *httpWatcher) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  2957. var h codecSelfer7612
  2958. z, r := codec1978.GenHelperDecoder(d)
  2959. _, _, _ = h, z, r
  2960. var yyj4 int
  2961. var yyb4 bool
  2962. var yyhl4 bool = l >= 0
  2963. for {
  2964. yyj4++
  2965. if yyhl4 {
  2966. yyb4 = yyj4 > l
  2967. } else {
  2968. yyb4 = r.CheckBreak()
  2969. }
  2970. if yyb4 {
  2971. break
  2972. }
  2973. r.ReadArrayElem()
  2974. z.DecStructFieldNotFound(yyj4-1, "")
  2975. }
  2976. r.ReadArrayEnd()
  2977. }
  2978. func (x *getAction) CodecEncodeSelf(e *codec1978.Encoder) {
  2979. var h codecSelfer7612
  2980. z, r := codec1978.GenHelperEncoder(e)
  2981. _, _, _ = h, z, r
  2982. if x == nil {
  2983. r.EncodeNil()
  2984. } else {
  2985. yym1 := z.EncBinary()
  2986. _ = yym1
  2987. if false {
  2988. } else if z.HasExtensions() && z.EncExt(x) {
  2989. } else {
  2990. yysep2 := !z.EncBinary()
  2991. yy2arr2 := z.EncBasicHandle().StructToArray
  2992. _, _ = yysep2, yy2arr2
  2993. const yyr2 bool = false
  2994. if yyr2 || yy2arr2 {
  2995. r.WriteArrayStart(5)
  2996. } else {
  2997. r.WriteMapStart(5)
  2998. }
  2999. if yyr2 || yy2arr2 {
  3000. r.WriteArrayElem()
  3001. yym4 := z.EncBinary()
  3002. _ = yym4
  3003. if false {
  3004. } else {
  3005. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  3006. }
  3007. } else {
  3008. r.WriteMapElemKey()
  3009. r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
  3010. r.WriteMapElemValue()
  3011. yym5 := z.EncBinary()
  3012. _ = yym5
  3013. if false {
  3014. } else {
  3015. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  3016. }
  3017. }
  3018. if yyr2 || yy2arr2 {
  3019. r.WriteArrayElem()
  3020. yym7 := z.EncBinary()
  3021. _ = yym7
  3022. if false {
  3023. } else {
  3024. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  3025. }
  3026. } else {
  3027. r.WriteMapElemKey()
  3028. r.EncodeString(codecSelferC_UTF87612, string("Key"))
  3029. r.WriteMapElemValue()
  3030. yym8 := z.EncBinary()
  3031. _ = yym8
  3032. if false {
  3033. } else {
  3034. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  3035. }
  3036. }
  3037. if yyr2 || yy2arr2 {
  3038. r.WriteArrayElem()
  3039. yym10 := z.EncBinary()
  3040. _ = yym10
  3041. if false {
  3042. } else {
  3043. r.EncodeBool(bool(x.Recursive))
  3044. }
  3045. } else {
  3046. r.WriteMapElemKey()
  3047. r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
  3048. r.WriteMapElemValue()
  3049. yym11 := z.EncBinary()
  3050. _ = yym11
  3051. if false {
  3052. } else {
  3053. r.EncodeBool(bool(x.Recursive))
  3054. }
  3055. }
  3056. if yyr2 || yy2arr2 {
  3057. r.WriteArrayElem()
  3058. yym13 := z.EncBinary()
  3059. _ = yym13
  3060. if false {
  3061. } else {
  3062. r.EncodeBool(bool(x.Sorted))
  3063. }
  3064. } else {
  3065. r.WriteMapElemKey()
  3066. r.EncodeString(codecSelferC_UTF87612, string("Sorted"))
  3067. r.WriteMapElemValue()
  3068. yym14 := z.EncBinary()
  3069. _ = yym14
  3070. if false {
  3071. } else {
  3072. r.EncodeBool(bool(x.Sorted))
  3073. }
  3074. }
  3075. if yyr2 || yy2arr2 {
  3076. r.WriteArrayElem()
  3077. yym16 := z.EncBinary()
  3078. _ = yym16
  3079. if false {
  3080. } else {
  3081. r.EncodeBool(bool(x.Quorum))
  3082. }
  3083. } else {
  3084. r.WriteMapElemKey()
  3085. r.EncodeString(codecSelferC_UTF87612, string("Quorum"))
  3086. r.WriteMapElemValue()
  3087. yym17 := z.EncBinary()
  3088. _ = yym17
  3089. if false {
  3090. } else {
  3091. r.EncodeBool(bool(x.Quorum))
  3092. }
  3093. }
  3094. if yyr2 || yy2arr2 {
  3095. r.WriteArrayEnd()
  3096. } else {
  3097. r.WriteMapEnd()
  3098. }
  3099. }
  3100. }
  3101. }
  3102. func (x *getAction) CodecDecodeSelf(d *codec1978.Decoder) {
  3103. var h codecSelfer7612
  3104. z, r := codec1978.GenHelperDecoder(d)
  3105. _, _, _ = h, z, r
  3106. yym1 := z.DecBinary()
  3107. _ = yym1
  3108. if false {
  3109. } else if z.HasExtensions() && z.DecExt(x) {
  3110. } else {
  3111. yyct2 := r.ContainerType()
  3112. if yyct2 == codecSelferValueTypeMap7612 {
  3113. yyl2 := r.ReadMapStart()
  3114. if yyl2 == 0 {
  3115. r.ReadMapEnd()
  3116. } else {
  3117. x.codecDecodeSelfFromMap(yyl2, d)
  3118. }
  3119. } else if yyct2 == codecSelferValueTypeArray7612 {
  3120. yyl2 := r.ReadArrayStart()
  3121. if yyl2 == 0 {
  3122. r.ReadArrayEnd()
  3123. } else {
  3124. x.codecDecodeSelfFromArray(yyl2, d)
  3125. }
  3126. } else {
  3127. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  3128. }
  3129. }
  3130. }
  3131. func (x *getAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  3132. var h codecSelfer7612
  3133. z, r := codec1978.GenHelperDecoder(d)
  3134. _, _, _ = h, z, r
  3135. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  3136. _ = yys3Slc
  3137. var yyhl3 bool = l >= 0
  3138. for yyj3 := 0; ; yyj3++ {
  3139. if yyhl3 {
  3140. if yyj3 >= l {
  3141. break
  3142. }
  3143. } else {
  3144. if r.CheckBreak() {
  3145. break
  3146. }
  3147. }
  3148. r.ReadMapElemKey()
  3149. yys3Slc = r.DecodeStringAsBytes()
  3150. yys3 := string(yys3Slc)
  3151. r.ReadMapElemValue()
  3152. switch yys3 {
  3153. case "Prefix":
  3154. if r.TryDecodeAsNil() {
  3155. x.Prefix = ""
  3156. } else {
  3157. yyv4 := &x.Prefix
  3158. yym5 := z.DecBinary()
  3159. _ = yym5
  3160. if false {
  3161. } else {
  3162. *((*string)(yyv4)) = r.DecodeString()
  3163. }
  3164. }
  3165. case "Key":
  3166. if r.TryDecodeAsNil() {
  3167. x.Key = ""
  3168. } else {
  3169. yyv6 := &x.Key
  3170. yym7 := z.DecBinary()
  3171. _ = yym7
  3172. if false {
  3173. } else {
  3174. *((*string)(yyv6)) = r.DecodeString()
  3175. }
  3176. }
  3177. case "Recursive":
  3178. if r.TryDecodeAsNil() {
  3179. x.Recursive = false
  3180. } else {
  3181. yyv8 := &x.Recursive
  3182. yym9 := z.DecBinary()
  3183. _ = yym9
  3184. if false {
  3185. } else {
  3186. *((*bool)(yyv8)) = r.DecodeBool()
  3187. }
  3188. }
  3189. case "Sorted":
  3190. if r.TryDecodeAsNil() {
  3191. x.Sorted = false
  3192. } else {
  3193. yyv10 := &x.Sorted
  3194. yym11 := z.DecBinary()
  3195. _ = yym11
  3196. if false {
  3197. } else {
  3198. *((*bool)(yyv10)) = r.DecodeBool()
  3199. }
  3200. }
  3201. case "Quorum":
  3202. if r.TryDecodeAsNil() {
  3203. x.Quorum = false
  3204. } else {
  3205. yyv12 := &x.Quorum
  3206. yym13 := z.DecBinary()
  3207. _ = yym13
  3208. if false {
  3209. } else {
  3210. *((*bool)(yyv12)) = r.DecodeBool()
  3211. }
  3212. }
  3213. default:
  3214. z.DecStructFieldNotFound(-1, yys3)
  3215. } // end switch yys3
  3216. } // end for yyj3
  3217. r.ReadMapEnd()
  3218. }
  3219. func (x *getAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  3220. var h codecSelfer7612
  3221. z, r := codec1978.GenHelperDecoder(d)
  3222. _, _, _ = h, z, r
  3223. var yyj14 int
  3224. var yyb14 bool
  3225. var yyhl14 bool = l >= 0
  3226. yyj14++
  3227. if yyhl14 {
  3228. yyb14 = yyj14 > l
  3229. } else {
  3230. yyb14 = r.CheckBreak()
  3231. }
  3232. if yyb14 {
  3233. r.ReadArrayEnd()
  3234. return
  3235. }
  3236. r.ReadArrayElem()
  3237. if r.TryDecodeAsNil() {
  3238. x.Prefix = ""
  3239. } else {
  3240. yyv15 := &x.Prefix
  3241. yym16 := z.DecBinary()
  3242. _ = yym16
  3243. if false {
  3244. } else {
  3245. *((*string)(yyv15)) = r.DecodeString()
  3246. }
  3247. }
  3248. yyj14++
  3249. if yyhl14 {
  3250. yyb14 = yyj14 > l
  3251. } else {
  3252. yyb14 = r.CheckBreak()
  3253. }
  3254. if yyb14 {
  3255. r.ReadArrayEnd()
  3256. return
  3257. }
  3258. r.ReadArrayElem()
  3259. if r.TryDecodeAsNil() {
  3260. x.Key = ""
  3261. } else {
  3262. yyv17 := &x.Key
  3263. yym18 := z.DecBinary()
  3264. _ = yym18
  3265. if false {
  3266. } else {
  3267. *((*string)(yyv17)) = r.DecodeString()
  3268. }
  3269. }
  3270. yyj14++
  3271. if yyhl14 {
  3272. yyb14 = yyj14 > l
  3273. } else {
  3274. yyb14 = r.CheckBreak()
  3275. }
  3276. if yyb14 {
  3277. r.ReadArrayEnd()
  3278. return
  3279. }
  3280. r.ReadArrayElem()
  3281. if r.TryDecodeAsNil() {
  3282. x.Recursive = false
  3283. } else {
  3284. yyv19 := &x.Recursive
  3285. yym20 := z.DecBinary()
  3286. _ = yym20
  3287. if false {
  3288. } else {
  3289. *((*bool)(yyv19)) = r.DecodeBool()
  3290. }
  3291. }
  3292. yyj14++
  3293. if yyhl14 {
  3294. yyb14 = yyj14 > l
  3295. } else {
  3296. yyb14 = r.CheckBreak()
  3297. }
  3298. if yyb14 {
  3299. r.ReadArrayEnd()
  3300. return
  3301. }
  3302. r.ReadArrayElem()
  3303. if r.TryDecodeAsNil() {
  3304. x.Sorted = false
  3305. } else {
  3306. yyv21 := &x.Sorted
  3307. yym22 := z.DecBinary()
  3308. _ = yym22
  3309. if false {
  3310. } else {
  3311. *((*bool)(yyv21)) = r.DecodeBool()
  3312. }
  3313. }
  3314. yyj14++
  3315. if yyhl14 {
  3316. yyb14 = yyj14 > l
  3317. } else {
  3318. yyb14 = r.CheckBreak()
  3319. }
  3320. if yyb14 {
  3321. r.ReadArrayEnd()
  3322. return
  3323. }
  3324. r.ReadArrayElem()
  3325. if r.TryDecodeAsNil() {
  3326. x.Quorum = false
  3327. } else {
  3328. yyv23 := &x.Quorum
  3329. yym24 := z.DecBinary()
  3330. _ = yym24
  3331. if false {
  3332. } else {
  3333. *((*bool)(yyv23)) = r.DecodeBool()
  3334. }
  3335. }
  3336. for {
  3337. yyj14++
  3338. if yyhl14 {
  3339. yyb14 = yyj14 > l
  3340. } else {
  3341. yyb14 = r.CheckBreak()
  3342. }
  3343. if yyb14 {
  3344. break
  3345. }
  3346. r.ReadArrayElem()
  3347. z.DecStructFieldNotFound(yyj14-1, "")
  3348. }
  3349. r.ReadArrayEnd()
  3350. }
  3351. func (x *waitAction) CodecEncodeSelf(e *codec1978.Encoder) {
  3352. var h codecSelfer7612
  3353. z, r := codec1978.GenHelperEncoder(e)
  3354. _, _, _ = h, z, r
  3355. if x == nil {
  3356. r.EncodeNil()
  3357. } else {
  3358. yym1 := z.EncBinary()
  3359. _ = yym1
  3360. if false {
  3361. } else if z.HasExtensions() && z.EncExt(x) {
  3362. } else {
  3363. yysep2 := !z.EncBinary()
  3364. yy2arr2 := z.EncBasicHandle().StructToArray
  3365. _, _ = yysep2, yy2arr2
  3366. const yyr2 bool = false
  3367. if yyr2 || yy2arr2 {
  3368. r.WriteArrayStart(4)
  3369. } else {
  3370. r.WriteMapStart(4)
  3371. }
  3372. if yyr2 || yy2arr2 {
  3373. r.WriteArrayElem()
  3374. yym4 := z.EncBinary()
  3375. _ = yym4
  3376. if false {
  3377. } else {
  3378. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  3379. }
  3380. } else {
  3381. r.WriteMapElemKey()
  3382. r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
  3383. r.WriteMapElemValue()
  3384. yym5 := z.EncBinary()
  3385. _ = yym5
  3386. if false {
  3387. } else {
  3388. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  3389. }
  3390. }
  3391. if yyr2 || yy2arr2 {
  3392. r.WriteArrayElem()
  3393. yym7 := z.EncBinary()
  3394. _ = yym7
  3395. if false {
  3396. } else {
  3397. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  3398. }
  3399. } else {
  3400. r.WriteMapElemKey()
  3401. r.EncodeString(codecSelferC_UTF87612, string("Key"))
  3402. r.WriteMapElemValue()
  3403. yym8 := z.EncBinary()
  3404. _ = yym8
  3405. if false {
  3406. } else {
  3407. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  3408. }
  3409. }
  3410. if yyr2 || yy2arr2 {
  3411. r.WriteArrayElem()
  3412. yym10 := z.EncBinary()
  3413. _ = yym10
  3414. if false {
  3415. } else {
  3416. r.EncodeUint(uint64(x.WaitIndex))
  3417. }
  3418. } else {
  3419. r.WriteMapElemKey()
  3420. r.EncodeString(codecSelferC_UTF87612, string("WaitIndex"))
  3421. r.WriteMapElemValue()
  3422. yym11 := z.EncBinary()
  3423. _ = yym11
  3424. if false {
  3425. } else {
  3426. r.EncodeUint(uint64(x.WaitIndex))
  3427. }
  3428. }
  3429. if yyr2 || yy2arr2 {
  3430. r.WriteArrayElem()
  3431. yym13 := z.EncBinary()
  3432. _ = yym13
  3433. if false {
  3434. } else {
  3435. r.EncodeBool(bool(x.Recursive))
  3436. }
  3437. } else {
  3438. r.WriteMapElemKey()
  3439. r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
  3440. r.WriteMapElemValue()
  3441. yym14 := z.EncBinary()
  3442. _ = yym14
  3443. if false {
  3444. } else {
  3445. r.EncodeBool(bool(x.Recursive))
  3446. }
  3447. }
  3448. if yyr2 || yy2arr2 {
  3449. r.WriteArrayEnd()
  3450. } else {
  3451. r.WriteMapEnd()
  3452. }
  3453. }
  3454. }
  3455. }
  3456. func (x *waitAction) CodecDecodeSelf(d *codec1978.Decoder) {
  3457. var h codecSelfer7612
  3458. z, r := codec1978.GenHelperDecoder(d)
  3459. _, _, _ = h, z, r
  3460. yym1 := z.DecBinary()
  3461. _ = yym1
  3462. if false {
  3463. } else if z.HasExtensions() && z.DecExt(x) {
  3464. } else {
  3465. yyct2 := r.ContainerType()
  3466. if yyct2 == codecSelferValueTypeMap7612 {
  3467. yyl2 := r.ReadMapStart()
  3468. if yyl2 == 0 {
  3469. r.ReadMapEnd()
  3470. } else {
  3471. x.codecDecodeSelfFromMap(yyl2, d)
  3472. }
  3473. } else if yyct2 == codecSelferValueTypeArray7612 {
  3474. yyl2 := r.ReadArrayStart()
  3475. if yyl2 == 0 {
  3476. r.ReadArrayEnd()
  3477. } else {
  3478. x.codecDecodeSelfFromArray(yyl2, d)
  3479. }
  3480. } else {
  3481. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  3482. }
  3483. }
  3484. }
  3485. func (x *waitAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  3486. var h codecSelfer7612
  3487. z, r := codec1978.GenHelperDecoder(d)
  3488. _, _, _ = h, z, r
  3489. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  3490. _ = yys3Slc
  3491. var yyhl3 bool = l >= 0
  3492. for yyj3 := 0; ; yyj3++ {
  3493. if yyhl3 {
  3494. if yyj3 >= l {
  3495. break
  3496. }
  3497. } else {
  3498. if r.CheckBreak() {
  3499. break
  3500. }
  3501. }
  3502. r.ReadMapElemKey()
  3503. yys3Slc = r.DecodeStringAsBytes()
  3504. yys3 := string(yys3Slc)
  3505. r.ReadMapElemValue()
  3506. switch yys3 {
  3507. case "Prefix":
  3508. if r.TryDecodeAsNil() {
  3509. x.Prefix = ""
  3510. } else {
  3511. yyv4 := &x.Prefix
  3512. yym5 := z.DecBinary()
  3513. _ = yym5
  3514. if false {
  3515. } else {
  3516. *((*string)(yyv4)) = r.DecodeString()
  3517. }
  3518. }
  3519. case "Key":
  3520. if r.TryDecodeAsNil() {
  3521. x.Key = ""
  3522. } else {
  3523. yyv6 := &x.Key
  3524. yym7 := z.DecBinary()
  3525. _ = yym7
  3526. if false {
  3527. } else {
  3528. *((*string)(yyv6)) = r.DecodeString()
  3529. }
  3530. }
  3531. case "WaitIndex":
  3532. if r.TryDecodeAsNil() {
  3533. x.WaitIndex = 0
  3534. } else {
  3535. yyv8 := &x.WaitIndex
  3536. yym9 := z.DecBinary()
  3537. _ = yym9
  3538. if false {
  3539. } else {
  3540. *((*uint64)(yyv8)) = uint64(r.DecodeUint(64))
  3541. }
  3542. }
  3543. case "Recursive":
  3544. if r.TryDecodeAsNil() {
  3545. x.Recursive = false
  3546. } else {
  3547. yyv10 := &x.Recursive
  3548. yym11 := z.DecBinary()
  3549. _ = yym11
  3550. if false {
  3551. } else {
  3552. *((*bool)(yyv10)) = r.DecodeBool()
  3553. }
  3554. }
  3555. default:
  3556. z.DecStructFieldNotFound(-1, yys3)
  3557. } // end switch yys3
  3558. } // end for yyj3
  3559. r.ReadMapEnd()
  3560. }
  3561. func (x *waitAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  3562. var h codecSelfer7612
  3563. z, r := codec1978.GenHelperDecoder(d)
  3564. _, _, _ = h, z, r
  3565. var yyj12 int
  3566. var yyb12 bool
  3567. var yyhl12 bool = l >= 0
  3568. yyj12++
  3569. if yyhl12 {
  3570. yyb12 = yyj12 > l
  3571. } else {
  3572. yyb12 = r.CheckBreak()
  3573. }
  3574. if yyb12 {
  3575. r.ReadArrayEnd()
  3576. return
  3577. }
  3578. r.ReadArrayElem()
  3579. if r.TryDecodeAsNil() {
  3580. x.Prefix = ""
  3581. } else {
  3582. yyv13 := &x.Prefix
  3583. yym14 := z.DecBinary()
  3584. _ = yym14
  3585. if false {
  3586. } else {
  3587. *((*string)(yyv13)) = r.DecodeString()
  3588. }
  3589. }
  3590. yyj12++
  3591. if yyhl12 {
  3592. yyb12 = yyj12 > l
  3593. } else {
  3594. yyb12 = r.CheckBreak()
  3595. }
  3596. if yyb12 {
  3597. r.ReadArrayEnd()
  3598. return
  3599. }
  3600. r.ReadArrayElem()
  3601. if r.TryDecodeAsNil() {
  3602. x.Key = ""
  3603. } else {
  3604. yyv15 := &x.Key
  3605. yym16 := z.DecBinary()
  3606. _ = yym16
  3607. if false {
  3608. } else {
  3609. *((*string)(yyv15)) = r.DecodeString()
  3610. }
  3611. }
  3612. yyj12++
  3613. if yyhl12 {
  3614. yyb12 = yyj12 > l
  3615. } else {
  3616. yyb12 = r.CheckBreak()
  3617. }
  3618. if yyb12 {
  3619. r.ReadArrayEnd()
  3620. return
  3621. }
  3622. r.ReadArrayElem()
  3623. if r.TryDecodeAsNil() {
  3624. x.WaitIndex = 0
  3625. } else {
  3626. yyv17 := &x.WaitIndex
  3627. yym18 := z.DecBinary()
  3628. _ = yym18
  3629. if false {
  3630. } else {
  3631. *((*uint64)(yyv17)) = uint64(r.DecodeUint(64))
  3632. }
  3633. }
  3634. yyj12++
  3635. if yyhl12 {
  3636. yyb12 = yyj12 > l
  3637. } else {
  3638. yyb12 = r.CheckBreak()
  3639. }
  3640. if yyb12 {
  3641. r.ReadArrayEnd()
  3642. return
  3643. }
  3644. r.ReadArrayElem()
  3645. if r.TryDecodeAsNil() {
  3646. x.Recursive = false
  3647. } else {
  3648. yyv19 := &x.Recursive
  3649. yym20 := z.DecBinary()
  3650. _ = yym20
  3651. if false {
  3652. } else {
  3653. *((*bool)(yyv19)) = r.DecodeBool()
  3654. }
  3655. }
  3656. for {
  3657. yyj12++
  3658. if yyhl12 {
  3659. yyb12 = yyj12 > l
  3660. } else {
  3661. yyb12 = r.CheckBreak()
  3662. }
  3663. if yyb12 {
  3664. break
  3665. }
  3666. r.ReadArrayElem()
  3667. z.DecStructFieldNotFound(yyj12-1, "")
  3668. }
  3669. r.ReadArrayEnd()
  3670. }
  3671. func (x *setAction) CodecEncodeSelf(e *codec1978.Encoder) {
  3672. var h codecSelfer7612
  3673. z, r := codec1978.GenHelperEncoder(e)
  3674. _, _, _ = h, z, r
  3675. if x == nil {
  3676. r.EncodeNil()
  3677. } else {
  3678. yym1 := z.EncBinary()
  3679. _ = yym1
  3680. if false {
  3681. } else if z.HasExtensions() && z.EncExt(x) {
  3682. } else {
  3683. yysep2 := !z.EncBinary()
  3684. yy2arr2 := z.EncBasicHandle().StructToArray
  3685. _, _ = yysep2, yy2arr2
  3686. const yyr2 bool = false
  3687. if yyr2 || yy2arr2 {
  3688. r.WriteArrayStart(10)
  3689. } else {
  3690. r.WriteMapStart(10)
  3691. }
  3692. if yyr2 || yy2arr2 {
  3693. r.WriteArrayElem()
  3694. yym4 := z.EncBinary()
  3695. _ = yym4
  3696. if false {
  3697. } else {
  3698. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  3699. }
  3700. } else {
  3701. r.WriteMapElemKey()
  3702. r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
  3703. r.WriteMapElemValue()
  3704. yym5 := z.EncBinary()
  3705. _ = yym5
  3706. if false {
  3707. } else {
  3708. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  3709. }
  3710. }
  3711. if yyr2 || yy2arr2 {
  3712. r.WriteArrayElem()
  3713. yym7 := z.EncBinary()
  3714. _ = yym7
  3715. if false {
  3716. } else {
  3717. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  3718. }
  3719. } else {
  3720. r.WriteMapElemKey()
  3721. r.EncodeString(codecSelferC_UTF87612, string("Key"))
  3722. r.WriteMapElemValue()
  3723. yym8 := z.EncBinary()
  3724. _ = yym8
  3725. if false {
  3726. } else {
  3727. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  3728. }
  3729. }
  3730. if yyr2 || yy2arr2 {
  3731. r.WriteArrayElem()
  3732. yym10 := z.EncBinary()
  3733. _ = yym10
  3734. if false {
  3735. } else {
  3736. r.EncodeString(codecSelferC_UTF87612, string(x.Value))
  3737. }
  3738. } else {
  3739. r.WriteMapElemKey()
  3740. r.EncodeString(codecSelferC_UTF87612, string("Value"))
  3741. r.WriteMapElemValue()
  3742. yym11 := z.EncBinary()
  3743. _ = yym11
  3744. if false {
  3745. } else {
  3746. r.EncodeString(codecSelferC_UTF87612, string(x.Value))
  3747. }
  3748. }
  3749. if yyr2 || yy2arr2 {
  3750. r.WriteArrayElem()
  3751. yym13 := z.EncBinary()
  3752. _ = yym13
  3753. if false {
  3754. } else {
  3755. r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
  3756. }
  3757. } else {
  3758. r.WriteMapElemKey()
  3759. r.EncodeString(codecSelferC_UTF87612, string("PrevValue"))
  3760. r.WriteMapElemValue()
  3761. yym14 := z.EncBinary()
  3762. _ = yym14
  3763. if false {
  3764. } else {
  3765. r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
  3766. }
  3767. }
  3768. if yyr2 || yy2arr2 {
  3769. r.WriteArrayElem()
  3770. yym16 := z.EncBinary()
  3771. _ = yym16
  3772. if false {
  3773. } else {
  3774. r.EncodeUint(uint64(x.PrevIndex))
  3775. }
  3776. } else {
  3777. r.WriteMapElemKey()
  3778. r.EncodeString(codecSelferC_UTF87612, string("PrevIndex"))
  3779. r.WriteMapElemValue()
  3780. yym17 := z.EncBinary()
  3781. _ = yym17
  3782. if false {
  3783. } else {
  3784. r.EncodeUint(uint64(x.PrevIndex))
  3785. }
  3786. }
  3787. if yyr2 || yy2arr2 {
  3788. r.WriteArrayElem()
  3789. x.PrevExist.CodecEncodeSelf(e)
  3790. } else {
  3791. r.WriteMapElemKey()
  3792. r.EncodeString(codecSelferC_UTF87612, string("PrevExist"))
  3793. r.WriteMapElemValue()
  3794. x.PrevExist.CodecEncodeSelf(e)
  3795. }
  3796. if yyr2 || yy2arr2 {
  3797. r.WriteArrayElem()
  3798. yym22 := z.EncBinary()
  3799. _ = yym22
  3800. if false {
  3801. } else if z.HasExtensions() && z.EncExt(x.TTL) {
  3802. } else {
  3803. r.EncodeInt(int64(x.TTL))
  3804. }
  3805. } else {
  3806. r.WriteMapElemKey()
  3807. r.EncodeString(codecSelferC_UTF87612, string("TTL"))
  3808. r.WriteMapElemValue()
  3809. yym23 := z.EncBinary()
  3810. _ = yym23
  3811. if false {
  3812. } else if z.HasExtensions() && z.EncExt(x.TTL) {
  3813. } else {
  3814. r.EncodeInt(int64(x.TTL))
  3815. }
  3816. }
  3817. if yyr2 || yy2arr2 {
  3818. r.WriteArrayElem()
  3819. yym25 := z.EncBinary()
  3820. _ = yym25
  3821. if false {
  3822. } else {
  3823. r.EncodeBool(bool(x.Refresh))
  3824. }
  3825. } else {
  3826. r.WriteMapElemKey()
  3827. r.EncodeString(codecSelferC_UTF87612, string("Refresh"))
  3828. r.WriteMapElemValue()
  3829. yym26 := z.EncBinary()
  3830. _ = yym26
  3831. if false {
  3832. } else {
  3833. r.EncodeBool(bool(x.Refresh))
  3834. }
  3835. }
  3836. if yyr2 || yy2arr2 {
  3837. r.WriteArrayElem()
  3838. yym28 := z.EncBinary()
  3839. _ = yym28
  3840. if false {
  3841. } else {
  3842. r.EncodeBool(bool(x.Dir))
  3843. }
  3844. } else {
  3845. r.WriteMapElemKey()
  3846. r.EncodeString(codecSelferC_UTF87612, string("Dir"))
  3847. r.WriteMapElemValue()
  3848. yym29 := z.EncBinary()
  3849. _ = yym29
  3850. if false {
  3851. } else {
  3852. r.EncodeBool(bool(x.Dir))
  3853. }
  3854. }
  3855. if yyr2 || yy2arr2 {
  3856. r.WriteArrayElem()
  3857. yym31 := z.EncBinary()
  3858. _ = yym31
  3859. if false {
  3860. } else {
  3861. r.EncodeBool(bool(x.NoValueOnSuccess))
  3862. }
  3863. } else {
  3864. r.WriteMapElemKey()
  3865. r.EncodeString(codecSelferC_UTF87612, string("NoValueOnSuccess"))
  3866. r.WriteMapElemValue()
  3867. yym32 := z.EncBinary()
  3868. _ = yym32
  3869. if false {
  3870. } else {
  3871. r.EncodeBool(bool(x.NoValueOnSuccess))
  3872. }
  3873. }
  3874. if yyr2 || yy2arr2 {
  3875. r.WriteArrayEnd()
  3876. } else {
  3877. r.WriteMapEnd()
  3878. }
  3879. }
  3880. }
  3881. }
  3882. func (x *setAction) CodecDecodeSelf(d *codec1978.Decoder) {
  3883. var h codecSelfer7612
  3884. z, r := codec1978.GenHelperDecoder(d)
  3885. _, _, _ = h, z, r
  3886. yym1 := z.DecBinary()
  3887. _ = yym1
  3888. if false {
  3889. } else if z.HasExtensions() && z.DecExt(x) {
  3890. } else {
  3891. yyct2 := r.ContainerType()
  3892. if yyct2 == codecSelferValueTypeMap7612 {
  3893. yyl2 := r.ReadMapStart()
  3894. if yyl2 == 0 {
  3895. r.ReadMapEnd()
  3896. } else {
  3897. x.codecDecodeSelfFromMap(yyl2, d)
  3898. }
  3899. } else if yyct2 == codecSelferValueTypeArray7612 {
  3900. yyl2 := r.ReadArrayStart()
  3901. if yyl2 == 0 {
  3902. r.ReadArrayEnd()
  3903. } else {
  3904. x.codecDecodeSelfFromArray(yyl2, d)
  3905. }
  3906. } else {
  3907. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  3908. }
  3909. }
  3910. }
  3911. func (x *setAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  3912. var h codecSelfer7612
  3913. z, r := codec1978.GenHelperDecoder(d)
  3914. _, _, _ = h, z, r
  3915. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  3916. _ = yys3Slc
  3917. var yyhl3 bool = l >= 0
  3918. for yyj3 := 0; ; yyj3++ {
  3919. if yyhl3 {
  3920. if yyj3 >= l {
  3921. break
  3922. }
  3923. } else {
  3924. if r.CheckBreak() {
  3925. break
  3926. }
  3927. }
  3928. r.ReadMapElemKey()
  3929. yys3Slc = r.DecodeStringAsBytes()
  3930. yys3 := string(yys3Slc)
  3931. r.ReadMapElemValue()
  3932. switch yys3 {
  3933. case "Prefix":
  3934. if r.TryDecodeAsNil() {
  3935. x.Prefix = ""
  3936. } else {
  3937. yyv4 := &x.Prefix
  3938. yym5 := z.DecBinary()
  3939. _ = yym5
  3940. if false {
  3941. } else {
  3942. *((*string)(yyv4)) = r.DecodeString()
  3943. }
  3944. }
  3945. case "Key":
  3946. if r.TryDecodeAsNil() {
  3947. x.Key = ""
  3948. } else {
  3949. yyv6 := &x.Key
  3950. yym7 := z.DecBinary()
  3951. _ = yym7
  3952. if false {
  3953. } else {
  3954. *((*string)(yyv6)) = r.DecodeString()
  3955. }
  3956. }
  3957. case "Value":
  3958. if r.TryDecodeAsNil() {
  3959. x.Value = ""
  3960. } else {
  3961. yyv8 := &x.Value
  3962. yym9 := z.DecBinary()
  3963. _ = yym9
  3964. if false {
  3965. } else {
  3966. *((*string)(yyv8)) = r.DecodeString()
  3967. }
  3968. }
  3969. case "PrevValue":
  3970. if r.TryDecodeAsNil() {
  3971. x.PrevValue = ""
  3972. } else {
  3973. yyv10 := &x.PrevValue
  3974. yym11 := z.DecBinary()
  3975. _ = yym11
  3976. if false {
  3977. } else {
  3978. *((*string)(yyv10)) = r.DecodeString()
  3979. }
  3980. }
  3981. case "PrevIndex":
  3982. if r.TryDecodeAsNil() {
  3983. x.PrevIndex = 0
  3984. } else {
  3985. yyv12 := &x.PrevIndex
  3986. yym13 := z.DecBinary()
  3987. _ = yym13
  3988. if false {
  3989. } else {
  3990. *((*uint64)(yyv12)) = uint64(r.DecodeUint(64))
  3991. }
  3992. }
  3993. case "PrevExist":
  3994. if r.TryDecodeAsNil() {
  3995. x.PrevExist = ""
  3996. } else {
  3997. yyv14 := &x.PrevExist
  3998. yyv14.CodecDecodeSelf(d)
  3999. }
  4000. case "TTL":
  4001. if r.TryDecodeAsNil() {
  4002. x.TTL = 0
  4003. } else {
  4004. yyv15 := &x.TTL
  4005. yym16 := z.DecBinary()
  4006. _ = yym16
  4007. if false {
  4008. } else if z.HasExtensions() && z.DecExt(yyv15) {
  4009. } else {
  4010. *((*int64)(yyv15)) = int64(r.DecodeInt(64))
  4011. }
  4012. }
  4013. case "Refresh":
  4014. if r.TryDecodeAsNil() {
  4015. x.Refresh = false
  4016. } else {
  4017. yyv17 := &x.Refresh
  4018. yym18 := z.DecBinary()
  4019. _ = yym18
  4020. if false {
  4021. } else {
  4022. *((*bool)(yyv17)) = r.DecodeBool()
  4023. }
  4024. }
  4025. case "Dir":
  4026. if r.TryDecodeAsNil() {
  4027. x.Dir = false
  4028. } else {
  4029. yyv19 := &x.Dir
  4030. yym20 := z.DecBinary()
  4031. _ = yym20
  4032. if false {
  4033. } else {
  4034. *((*bool)(yyv19)) = r.DecodeBool()
  4035. }
  4036. }
  4037. case "NoValueOnSuccess":
  4038. if r.TryDecodeAsNil() {
  4039. x.NoValueOnSuccess = false
  4040. } else {
  4041. yyv21 := &x.NoValueOnSuccess
  4042. yym22 := z.DecBinary()
  4043. _ = yym22
  4044. if false {
  4045. } else {
  4046. *((*bool)(yyv21)) = r.DecodeBool()
  4047. }
  4048. }
  4049. default:
  4050. z.DecStructFieldNotFound(-1, yys3)
  4051. } // end switch yys3
  4052. } // end for yyj3
  4053. r.ReadMapEnd()
  4054. }
  4055. func (x *setAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  4056. var h codecSelfer7612
  4057. z, r := codec1978.GenHelperDecoder(d)
  4058. _, _, _ = h, z, r
  4059. var yyj23 int
  4060. var yyb23 bool
  4061. var yyhl23 bool = l >= 0
  4062. yyj23++
  4063. if yyhl23 {
  4064. yyb23 = yyj23 > l
  4065. } else {
  4066. yyb23 = r.CheckBreak()
  4067. }
  4068. if yyb23 {
  4069. r.ReadArrayEnd()
  4070. return
  4071. }
  4072. r.ReadArrayElem()
  4073. if r.TryDecodeAsNil() {
  4074. x.Prefix = ""
  4075. } else {
  4076. yyv24 := &x.Prefix
  4077. yym25 := z.DecBinary()
  4078. _ = yym25
  4079. if false {
  4080. } else {
  4081. *((*string)(yyv24)) = r.DecodeString()
  4082. }
  4083. }
  4084. yyj23++
  4085. if yyhl23 {
  4086. yyb23 = yyj23 > l
  4087. } else {
  4088. yyb23 = r.CheckBreak()
  4089. }
  4090. if yyb23 {
  4091. r.ReadArrayEnd()
  4092. return
  4093. }
  4094. r.ReadArrayElem()
  4095. if r.TryDecodeAsNil() {
  4096. x.Key = ""
  4097. } else {
  4098. yyv26 := &x.Key
  4099. yym27 := z.DecBinary()
  4100. _ = yym27
  4101. if false {
  4102. } else {
  4103. *((*string)(yyv26)) = r.DecodeString()
  4104. }
  4105. }
  4106. yyj23++
  4107. if yyhl23 {
  4108. yyb23 = yyj23 > l
  4109. } else {
  4110. yyb23 = r.CheckBreak()
  4111. }
  4112. if yyb23 {
  4113. r.ReadArrayEnd()
  4114. return
  4115. }
  4116. r.ReadArrayElem()
  4117. if r.TryDecodeAsNil() {
  4118. x.Value = ""
  4119. } else {
  4120. yyv28 := &x.Value
  4121. yym29 := z.DecBinary()
  4122. _ = yym29
  4123. if false {
  4124. } else {
  4125. *((*string)(yyv28)) = r.DecodeString()
  4126. }
  4127. }
  4128. yyj23++
  4129. if yyhl23 {
  4130. yyb23 = yyj23 > l
  4131. } else {
  4132. yyb23 = r.CheckBreak()
  4133. }
  4134. if yyb23 {
  4135. r.ReadArrayEnd()
  4136. return
  4137. }
  4138. r.ReadArrayElem()
  4139. if r.TryDecodeAsNil() {
  4140. x.PrevValue = ""
  4141. } else {
  4142. yyv30 := &x.PrevValue
  4143. yym31 := z.DecBinary()
  4144. _ = yym31
  4145. if false {
  4146. } else {
  4147. *((*string)(yyv30)) = r.DecodeString()
  4148. }
  4149. }
  4150. yyj23++
  4151. if yyhl23 {
  4152. yyb23 = yyj23 > l
  4153. } else {
  4154. yyb23 = r.CheckBreak()
  4155. }
  4156. if yyb23 {
  4157. r.ReadArrayEnd()
  4158. return
  4159. }
  4160. r.ReadArrayElem()
  4161. if r.TryDecodeAsNil() {
  4162. x.PrevIndex = 0
  4163. } else {
  4164. yyv32 := &x.PrevIndex
  4165. yym33 := z.DecBinary()
  4166. _ = yym33
  4167. if false {
  4168. } else {
  4169. *((*uint64)(yyv32)) = uint64(r.DecodeUint(64))
  4170. }
  4171. }
  4172. yyj23++
  4173. if yyhl23 {
  4174. yyb23 = yyj23 > l
  4175. } else {
  4176. yyb23 = r.CheckBreak()
  4177. }
  4178. if yyb23 {
  4179. r.ReadArrayEnd()
  4180. return
  4181. }
  4182. r.ReadArrayElem()
  4183. if r.TryDecodeAsNil() {
  4184. x.PrevExist = ""
  4185. } else {
  4186. yyv34 := &x.PrevExist
  4187. yyv34.CodecDecodeSelf(d)
  4188. }
  4189. yyj23++
  4190. if yyhl23 {
  4191. yyb23 = yyj23 > l
  4192. } else {
  4193. yyb23 = r.CheckBreak()
  4194. }
  4195. if yyb23 {
  4196. r.ReadArrayEnd()
  4197. return
  4198. }
  4199. r.ReadArrayElem()
  4200. if r.TryDecodeAsNil() {
  4201. x.TTL = 0
  4202. } else {
  4203. yyv35 := &x.TTL
  4204. yym36 := z.DecBinary()
  4205. _ = yym36
  4206. if false {
  4207. } else if z.HasExtensions() && z.DecExt(yyv35) {
  4208. } else {
  4209. *((*int64)(yyv35)) = int64(r.DecodeInt(64))
  4210. }
  4211. }
  4212. yyj23++
  4213. if yyhl23 {
  4214. yyb23 = yyj23 > l
  4215. } else {
  4216. yyb23 = r.CheckBreak()
  4217. }
  4218. if yyb23 {
  4219. r.ReadArrayEnd()
  4220. return
  4221. }
  4222. r.ReadArrayElem()
  4223. if r.TryDecodeAsNil() {
  4224. x.Refresh = false
  4225. } else {
  4226. yyv37 := &x.Refresh
  4227. yym38 := z.DecBinary()
  4228. _ = yym38
  4229. if false {
  4230. } else {
  4231. *((*bool)(yyv37)) = r.DecodeBool()
  4232. }
  4233. }
  4234. yyj23++
  4235. if yyhl23 {
  4236. yyb23 = yyj23 > l
  4237. } else {
  4238. yyb23 = r.CheckBreak()
  4239. }
  4240. if yyb23 {
  4241. r.ReadArrayEnd()
  4242. return
  4243. }
  4244. r.ReadArrayElem()
  4245. if r.TryDecodeAsNil() {
  4246. x.Dir = false
  4247. } else {
  4248. yyv39 := &x.Dir
  4249. yym40 := z.DecBinary()
  4250. _ = yym40
  4251. if false {
  4252. } else {
  4253. *((*bool)(yyv39)) = r.DecodeBool()
  4254. }
  4255. }
  4256. yyj23++
  4257. if yyhl23 {
  4258. yyb23 = yyj23 > l
  4259. } else {
  4260. yyb23 = r.CheckBreak()
  4261. }
  4262. if yyb23 {
  4263. r.ReadArrayEnd()
  4264. return
  4265. }
  4266. r.ReadArrayElem()
  4267. if r.TryDecodeAsNil() {
  4268. x.NoValueOnSuccess = false
  4269. } else {
  4270. yyv41 := &x.NoValueOnSuccess
  4271. yym42 := z.DecBinary()
  4272. _ = yym42
  4273. if false {
  4274. } else {
  4275. *((*bool)(yyv41)) = r.DecodeBool()
  4276. }
  4277. }
  4278. for {
  4279. yyj23++
  4280. if yyhl23 {
  4281. yyb23 = yyj23 > l
  4282. } else {
  4283. yyb23 = r.CheckBreak()
  4284. }
  4285. if yyb23 {
  4286. break
  4287. }
  4288. r.ReadArrayElem()
  4289. z.DecStructFieldNotFound(yyj23-1, "")
  4290. }
  4291. r.ReadArrayEnd()
  4292. }
  4293. func (x *deleteAction) CodecEncodeSelf(e *codec1978.Encoder) {
  4294. var h codecSelfer7612
  4295. z, r := codec1978.GenHelperEncoder(e)
  4296. _, _, _ = h, z, r
  4297. if x == nil {
  4298. r.EncodeNil()
  4299. } else {
  4300. yym1 := z.EncBinary()
  4301. _ = yym1
  4302. if false {
  4303. } else if z.HasExtensions() && z.EncExt(x) {
  4304. } else {
  4305. yysep2 := !z.EncBinary()
  4306. yy2arr2 := z.EncBasicHandle().StructToArray
  4307. _, _ = yysep2, yy2arr2
  4308. const yyr2 bool = false
  4309. if yyr2 || yy2arr2 {
  4310. r.WriteArrayStart(6)
  4311. } else {
  4312. r.WriteMapStart(6)
  4313. }
  4314. if yyr2 || yy2arr2 {
  4315. r.WriteArrayElem()
  4316. yym4 := z.EncBinary()
  4317. _ = yym4
  4318. if false {
  4319. } else {
  4320. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  4321. }
  4322. } else {
  4323. r.WriteMapElemKey()
  4324. r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
  4325. r.WriteMapElemValue()
  4326. yym5 := z.EncBinary()
  4327. _ = yym5
  4328. if false {
  4329. } else {
  4330. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  4331. }
  4332. }
  4333. if yyr2 || yy2arr2 {
  4334. r.WriteArrayElem()
  4335. yym7 := z.EncBinary()
  4336. _ = yym7
  4337. if false {
  4338. } else {
  4339. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  4340. }
  4341. } else {
  4342. r.WriteMapElemKey()
  4343. r.EncodeString(codecSelferC_UTF87612, string("Key"))
  4344. r.WriteMapElemValue()
  4345. yym8 := z.EncBinary()
  4346. _ = yym8
  4347. if false {
  4348. } else {
  4349. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  4350. }
  4351. }
  4352. if yyr2 || yy2arr2 {
  4353. r.WriteArrayElem()
  4354. yym10 := z.EncBinary()
  4355. _ = yym10
  4356. if false {
  4357. } else {
  4358. r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
  4359. }
  4360. } else {
  4361. r.WriteMapElemKey()
  4362. r.EncodeString(codecSelferC_UTF87612, string("PrevValue"))
  4363. r.WriteMapElemValue()
  4364. yym11 := z.EncBinary()
  4365. _ = yym11
  4366. if false {
  4367. } else {
  4368. r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
  4369. }
  4370. }
  4371. if yyr2 || yy2arr2 {
  4372. r.WriteArrayElem()
  4373. yym13 := z.EncBinary()
  4374. _ = yym13
  4375. if false {
  4376. } else {
  4377. r.EncodeUint(uint64(x.PrevIndex))
  4378. }
  4379. } else {
  4380. r.WriteMapElemKey()
  4381. r.EncodeString(codecSelferC_UTF87612, string("PrevIndex"))
  4382. r.WriteMapElemValue()
  4383. yym14 := z.EncBinary()
  4384. _ = yym14
  4385. if false {
  4386. } else {
  4387. r.EncodeUint(uint64(x.PrevIndex))
  4388. }
  4389. }
  4390. if yyr2 || yy2arr2 {
  4391. r.WriteArrayElem()
  4392. yym16 := z.EncBinary()
  4393. _ = yym16
  4394. if false {
  4395. } else {
  4396. r.EncodeBool(bool(x.Dir))
  4397. }
  4398. } else {
  4399. r.WriteMapElemKey()
  4400. r.EncodeString(codecSelferC_UTF87612, string("Dir"))
  4401. r.WriteMapElemValue()
  4402. yym17 := z.EncBinary()
  4403. _ = yym17
  4404. if false {
  4405. } else {
  4406. r.EncodeBool(bool(x.Dir))
  4407. }
  4408. }
  4409. if yyr2 || yy2arr2 {
  4410. r.WriteArrayElem()
  4411. yym19 := z.EncBinary()
  4412. _ = yym19
  4413. if false {
  4414. } else {
  4415. r.EncodeBool(bool(x.Recursive))
  4416. }
  4417. } else {
  4418. r.WriteMapElemKey()
  4419. r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
  4420. r.WriteMapElemValue()
  4421. yym20 := z.EncBinary()
  4422. _ = yym20
  4423. if false {
  4424. } else {
  4425. r.EncodeBool(bool(x.Recursive))
  4426. }
  4427. }
  4428. if yyr2 || yy2arr2 {
  4429. r.WriteArrayEnd()
  4430. } else {
  4431. r.WriteMapEnd()
  4432. }
  4433. }
  4434. }
  4435. }
  4436. func (x *deleteAction) CodecDecodeSelf(d *codec1978.Decoder) {
  4437. var h codecSelfer7612
  4438. z, r := codec1978.GenHelperDecoder(d)
  4439. _, _, _ = h, z, r
  4440. yym1 := z.DecBinary()
  4441. _ = yym1
  4442. if false {
  4443. } else if z.HasExtensions() && z.DecExt(x) {
  4444. } else {
  4445. yyct2 := r.ContainerType()
  4446. if yyct2 == codecSelferValueTypeMap7612 {
  4447. yyl2 := r.ReadMapStart()
  4448. if yyl2 == 0 {
  4449. r.ReadMapEnd()
  4450. } else {
  4451. x.codecDecodeSelfFromMap(yyl2, d)
  4452. }
  4453. } else if yyct2 == codecSelferValueTypeArray7612 {
  4454. yyl2 := r.ReadArrayStart()
  4455. if yyl2 == 0 {
  4456. r.ReadArrayEnd()
  4457. } else {
  4458. x.codecDecodeSelfFromArray(yyl2, d)
  4459. }
  4460. } else {
  4461. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  4462. }
  4463. }
  4464. }
  4465. func (x *deleteAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  4466. var h codecSelfer7612
  4467. z, r := codec1978.GenHelperDecoder(d)
  4468. _, _, _ = h, z, r
  4469. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  4470. _ = yys3Slc
  4471. var yyhl3 bool = l >= 0
  4472. for yyj3 := 0; ; yyj3++ {
  4473. if yyhl3 {
  4474. if yyj3 >= l {
  4475. break
  4476. }
  4477. } else {
  4478. if r.CheckBreak() {
  4479. break
  4480. }
  4481. }
  4482. r.ReadMapElemKey()
  4483. yys3Slc = r.DecodeStringAsBytes()
  4484. yys3 := string(yys3Slc)
  4485. r.ReadMapElemValue()
  4486. switch yys3 {
  4487. case "Prefix":
  4488. if r.TryDecodeAsNil() {
  4489. x.Prefix = ""
  4490. } else {
  4491. yyv4 := &x.Prefix
  4492. yym5 := z.DecBinary()
  4493. _ = yym5
  4494. if false {
  4495. } else {
  4496. *((*string)(yyv4)) = r.DecodeString()
  4497. }
  4498. }
  4499. case "Key":
  4500. if r.TryDecodeAsNil() {
  4501. x.Key = ""
  4502. } else {
  4503. yyv6 := &x.Key
  4504. yym7 := z.DecBinary()
  4505. _ = yym7
  4506. if false {
  4507. } else {
  4508. *((*string)(yyv6)) = r.DecodeString()
  4509. }
  4510. }
  4511. case "PrevValue":
  4512. if r.TryDecodeAsNil() {
  4513. x.PrevValue = ""
  4514. } else {
  4515. yyv8 := &x.PrevValue
  4516. yym9 := z.DecBinary()
  4517. _ = yym9
  4518. if false {
  4519. } else {
  4520. *((*string)(yyv8)) = r.DecodeString()
  4521. }
  4522. }
  4523. case "PrevIndex":
  4524. if r.TryDecodeAsNil() {
  4525. x.PrevIndex = 0
  4526. } else {
  4527. yyv10 := &x.PrevIndex
  4528. yym11 := z.DecBinary()
  4529. _ = yym11
  4530. if false {
  4531. } else {
  4532. *((*uint64)(yyv10)) = uint64(r.DecodeUint(64))
  4533. }
  4534. }
  4535. case "Dir":
  4536. if r.TryDecodeAsNil() {
  4537. x.Dir = false
  4538. } else {
  4539. yyv12 := &x.Dir
  4540. yym13 := z.DecBinary()
  4541. _ = yym13
  4542. if false {
  4543. } else {
  4544. *((*bool)(yyv12)) = r.DecodeBool()
  4545. }
  4546. }
  4547. case "Recursive":
  4548. if r.TryDecodeAsNil() {
  4549. x.Recursive = false
  4550. } else {
  4551. yyv14 := &x.Recursive
  4552. yym15 := z.DecBinary()
  4553. _ = yym15
  4554. if false {
  4555. } else {
  4556. *((*bool)(yyv14)) = r.DecodeBool()
  4557. }
  4558. }
  4559. default:
  4560. z.DecStructFieldNotFound(-1, yys3)
  4561. } // end switch yys3
  4562. } // end for yyj3
  4563. r.ReadMapEnd()
  4564. }
  4565. func (x *deleteAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  4566. var h codecSelfer7612
  4567. z, r := codec1978.GenHelperDecoder(d)
  4568. _, _, _ = h, z, r
  4569. var yyj16 int
  4570. var yyb16 bool
  4571. var yyhl16 bool = l >= 0
  4572. yyj16++
  4573. if yyhl16 {
  4574. yyb16 = yyj16 > l
  4575. } else {
  4576. yyb16 = r.CheckBreak()
  4577. }
  4578. if yyb16 {
  4579. r.ReadArrayEnd()
  4580. return
  4581. }
  4582. r.ReadArrayElem()
  4583. if r.TryDecodeAsNil() {
  4584. x.Prefix = ""
  4585. } else {
  4586. yyv17 := &x.Prefix
  4587. yym18 := z.DecBinary()
  4588. _ = yym18
  4589. if false {
  4590. } else {
  4591. *((*string)(yyv17)) = r.DecodeString()
  4592. }
  4593. }
  4594. yyj16++
  4595. if yyhl16 {
  4596. yyb16 = yyj16 > l
  4597. } else {
  4598. yyb16 = r.CheckBreak()
  4599. }
  4600. if yyb16 {
  4601. r.ReadArrayEnd()
  4602. return
  4603. }
  4604. r.ReadArrayElem()
  4605. if r.TryDecodeAsNil() {
  4606. x.Key = ""
  4607. } else {
  4608. yyv19 := &x.Key
  4609. yym20 := z.DecBinary()
  4610. _ = yym20
  4611. if false {
  4612. } else {
  4613. *((*string)(yyv19)) = r.DecodeString()
  4614. }
  4615. }
  4616. yyj16++
  4617. if yyhl16 {
  4618. yyb16 = yyj16 > l
  4619. } else {
  4620. yyb16 = r.CheckBreak()
  4621. }
  4622. if yyb16 {
  4623. r.ReadArrayEnd()
  4624. return
  4625. }
  4626. r.ReadArrayElem()
  4627. if r.TryDecodeAsNil() {
  4628. x.PrevValue = ""
  4629. } else {
  4630. yyv21 := &x.PrevValue
  4631. yym22 := z.DecBinary()
  4632. _ = yym22
  4633. if false {
  4634. } else {
  4635. *((*string)(yyv21)) = r.DecodeString()
  4636. }
  4637. }
  4638. yyj16++
  4639. if yyhl16 {
  4640. yyb16 = yyj16 > l
  4641. } else {
  4642. yyb16 = r.CheckBreak()
  4643. }
  4644. if yyb16 {
  4645. r.ReadArrayEnd()
  4646. return
  4647. }
  4648. r.ReadArrayElem()
  4649. if r.TryDecodeAsNil() {
  4650. x.PrevIndex = 0
  4651. } else {
  4652. yyv23 := &x.PrevIndex
  4653. yym24 := z.DecBinary()
  4654. _ = yym24
  4655. if false {
  4656. } else {
  4657. *((*uint64)(yyv23)) = uint64(r.DecodeUint(64))
  4658. }
  4659. }
  4660. yyj16++
  4661. if yyhl16 {
  4662. yyb16 = yyj16 > l
  4663. } else {
  4664. yyb16 = r.CheckBreak()
  4665. }
  4666. if yyb16 {
  4667. r.ReadArrayEnd()
  4668. return
  4669. }
  4670. r.ReadArrayElem()
  4671. if r.TryDecodeAsNil() {
  4672. x.Dir = false
  4673. } else {
  4674. yyv25 := &x.Dir
  4675. yym26 := z.DecBinary()
  4676. _ = yym26
  4677. if false {
  4678. } else {
  4679. *((*bool)(yyv25)) = r.DecodeBool()
  4680. }
  4681. }
  4682. yyj16++
  4683. if yyhl16 {
  4684. yyb16 = yyj16 > l
  4685. } else {
  4686. yyb16 = r.CheckBreak()
  4687. }
  4688. if yyb16 {
  4689. r.ReadArrayEnd()
  4690. return
  4691. }
  4692. r.ReadArrayElem()
  4693. if r.TryDecodeAsNil() {
  4694. x.Recursive = false
  4695. } else {
  4696. yyv27 := &x.Recursive
  4697. yym28 := z.DecBinary()
  4698. _ = yym28
  4699. if false {
  4700. } else {
  4701. *((*bool)(yyv27)) = r.DecodeBool()
  4702. }
  4703. }
  4704. for {
  4705. yyj16++
  4706. if yyhl16 {
  4707. yyb16 = yyj16 > l
  4708. } else {
  4709. yyb16 = r.CheckBreak()
  4710. }
  4711. if yyb16 {
  4712. break
  4713. }
  4714. r.ReadArrayElem()
  4715. z.DecStructFieldNotFound(yyj16-1, "")
  4716. }
  4717. r.ReadArrayEnd()
  4718. }
  4719. func (x *createInOrderAction) CodecEncodeSelf(e *codec1978.Encoder) {
  4720. var h codecSelfer7612
  4721. z, r := codec1978.GenHelperEncoder(e)
  4722. _, _, _ = h, z, r
  4723. if x == nil {
  4724. r.EncodeNil()
  4725. } else {
  4726. yym1 := z.EncBinary()
  4727. _ = yym1
  4728. if false {
  4729. } else if z.HasExtensions() && z.EncExt(x) {
  4730. } else {
  4731. yysep2 := !z.EncBinary()
  4732. yy2arr2 := z.EncBasicHandle().StructToArray
  4733. _, _ = yysep2, yy2arr2
  4734. const yyr2 bool = false
  4735. if yyr2 || yy2arr2 {
  4736. r.WriteArrayStart(4)
  4737. } else {
  4738. r.WriteMapStart(4)
  4739. }
  4740. if yyr2 || yy2arr2 {
  4741. r.WriteArrayElem()
  4742. yym4 := z.EncBinary()
  4743. _ = yym4
  4744. if false {
  4745. } else {
  4746. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  4747. }
  4748. } else {
  4749. r.WriteMapElemKey()
  4750. r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
  4751. r.WriteMapElemValue()
  4752. yym5 := z.EncBinary()
  4753. _ = yym5
  4754. if false {
  4755. } else {
  4756. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  4757. }
  4758. }
  4759. if yyr2 || yy2arr2 {
  4760. r.WriteArrayElem()
  4761. yym7 := z.EncBinary()
  4762. _ = yym7
  4763. if false {
  4764. } else {
  4765. r.EncodeString(codecSelferC_UTF87612, string(x.Dir))
  4766. }
  4767. } else {
  4768. r.WriteMapElemKey()
  4769. r.EncodeString(codecSelferC_UTF87612, string("Dir"))
  4770. r.WriteMapElemValue()
  4771. yym8 := z.EncBinary()
  4772. _ = yym8
  4773. if false {
  4774. } else {
  4775. r.EncodeString(codecSelferC_UTF87612, string(x.Dir))
  4776. }
  4777. }
  4778. if yyr2 || yy2arr2 {
  4779. r.WriteArrayElem()
  4780. yym10 := z.EncBinary()
  4781. _ = yym10
  4782. if false {
  4783. } else {
  4784. r.EncodeString(codecSelferC_UTF87612, string(x.Value))
  4785. }
  4786. } else {
  4787. r.WriteMapElemKey()
  4788. r.EncodeString(codecSelferC_UTF87612, string("Value"))
  4789. r.WriteMapElemValue()
  4790. yym11 := z.EncBinary()
  4791. _ = yym11
  4792. if false {
  4793. } else {
  4794. r.EncodeString(codecSelferC_UTF87612, string(x.Value))
  4795. }
  4796. }
  4797. if yyr2 || yy2arr2 {
  4798. r.WriteArrayElem()
  4799. yym13 := z.EncBinary()
  4800. _ = yym13
  4801. if false {
  4802. } else if z.HasExtensions() && z.EncExt(x.TTL) {
  4803. } else {
  4804. r.EncodeInt(int64(x.TTL))
  4805. }
  4806. } else {
  4807. r.WriteMapElemKey()
  4808. r.EncodeString(codecSelferC_UTF87612, string("TTL"))
  4809. r.WriteMapElemValue()
  4810. yym14 := z.EncBinary()
  4811. _ = yym14
  4812. if false {
  4813. } else if z.HasExtensions() && z.EncExt(x.TTL) {
  4814. } else {
  4815. r.EncodeInt(int64(x.TTL))
  4816. }
  4817. }
  4818. if yyr2 || yy2arr2 {
  4819. r.WriteArrayEnd()
  4820. } else {
  4821. r.WriteMapEnd()
  4822. }
  4823. }
  4824. }
  4825. }
  4826. func (x *createInOrderAction) CodecDecodeSelf(d *codec1978.Decoder) {
  4827. var h codecSelfer7612
  4828. z, r := codec1978.GenHelperDecoder(d)
  4829. _, _, _ = h, z, r
  4830. yym1 := z.DecBinary()
  4831. _ = yym1
  4832. if false {
  4833. } else if z.HasExtensions() && z.DecExt(x) {
  4834. } else {
  4835. yyct2 := r.ContainerType()
  4836. if yyct2 == codecSelferValueTypeMap7612 {
  4837. yyl2 := r.ReadMapStart()
  4838. if yyl2 == 0 {
  4839. r.ReadMapEnd()
  4840. } else {
  4841. x.codecDecodeSelfFromMap(yyl2, d)
  4842. }
  4843. } else if yyct2 == codecSelferValueTypeArray7612 {
  4844. yyl2 := r.ReadArrayStart()
  4845. if yyl2 == 0 {
  4846. r.ReadArrayEnd()
  4847. } else {
  4848. x.codecDecodeSelfFromArray(yyl2, d)
  4849. }
  4850. } else {
  4851. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  4852. }
  4853. }
  4854. }
  4855. func (x *createInOrderAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  4856. var h codecSelfer7612
  4857. z, r := codec1978.GenHelperDecoder(d)
  4858. _, _, _ = h, z, r
  4859. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  4860. _ = yys3Slc
  4861. var yyhl3 bool = l >= 0
  4862. for yyj3 := 0; ; yyj3++ {
  4863. if yyhl3 {
  4864. if yyj3 >= l {
  4865. break
  4866. }
  4867. } else {
  4868. if r.CheckBreak() {
  4869. break
  4870. }
  4871. }
  4872. r.ReadMapElemKey()
  4873. yys3Slc = r.DecodeStringAsBytes()
  4874. yys3 := string(yys3Slc)
  4875. r.ReadMapElemValue()
  4876. switch yys3 {
  4877. case "Prefix":
  4878. if r.TryDecodeAsNil() {
  4879. x.Prefix = ""
  4880. } else {
  4881. yyv4 := &x.Prefix
  4882. yym5 := z.DecBinary()
  4883. _ = yym5
  4884. if false {
  4885. } else {
  4886. *((*string)(yyv4)) = r.DecodeString()
  4887. }
  4888. }
  4889. case "Dir":
  4890. if r.TryDecodeAsNil() {
  4891. x.Dir = ""
  4892. } else {
  4893. yyv6 := &x.Dir
  4894. yym7 := z.DecBinary()
  4895. _ = yym7
  4896. if false {
  4897. } else {
  4898. *((*string)(yyv6)) = r.DecodeString()
  4899. }
  4900. }
  4901. case "Value":
  4902. if r.TryDecodeAsNil() {
  4903. x.Value = ""
  4904. } else {
  4905. yyv8 := &x.Value
  4906. yym9 := z.DecBinary()
  4907. _ = yym9
  4908. if false {
  4909. } else {
  4910. *((*string)(yyv8)) = r.DecodeString()
  4911. }
  4912. }
  4913. case "TTL":
  4914. if r.TryDecodeAsNil() {
  4915. x.TTL = 0
  4916. } else {
  4917. yyv10 := &x.TTL
  4918. yym11 := z.DecBinary()
  4919. _ = yym11
  4920. if false {
  4921. } else if z.HasExtensions() && z.DecExt(yyv10) {
  4922. } else {
  4923. *((*int64)(yyv10)) = int64(r.DecodeInt(64))
  4924. }
  4925. }
  4926. default:
  4927. z.DecStructFieldNotFound(-1, yys3)
  4928. } // end switch yys3
  4929. } // end for yyj3
  4930. r.ReadMapEnd()
  4931. }
  4932. func (x *createInOrderAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  4933. var h codecSelfer7612
  4934. z, r := codec1978.GenHelperDecoder(d)
  4935. _, _, _ = h, z, r
  4936. var yyj12 int
  4937. var yyb12 bool
  4938. var yyhl12 bool = l >= 0
  4939. yyj12++
  4940. if yyhl12 {
  4941. yyb12 = yyj12 > l
  4942. } else {
  4943. yyb12 = r.CheckBreak()
  4944. }
  4945. if yyb12 {
  4946. r.ReadArrayEnd()
  4947. return
  4948. }
  4949. r.ReadArrayElem()
  4950. if r.TryDecodeAsNil() {
  4951. x.Prefix = ""
  4952. } else {
  4953. yyv13 := &x.Prefix
  4954. yym14 := z.DecBinary()
  4955. _ = yym14
  4956. if false {
  4957. } else {
  4958. *((*string)(yyv13)) = r.DecodeString()
  4959. }
  4960. }
  4961. yyj12++
  4962. if yyhl12 {
  4963. yyb12 = yyj12 > l
  4964. } else {
  4965. yyb12 = r.CheckBreak()
  4966. }
  4967. if yyb12 {
  4968. r.ReadArrayEnd()
  4969. return
  4970. }
  4971. r.ReadArrayElem()
  4972. if r.TryDecodeAsNil() {
  4973. x.Dir = ""
  4974. } else {
  4975. yyv15 := &x.Dir
  4976. yym16 := z.DecBinary()
  4977. _ = yym16
  4978. if false {
  4979. } else {
  4980. *((*string)(yyv15)) = r.DecodeString()
  4981. }
  4982. }
  4983. yyj12++
  4984. if yyhl12 {
  4985. yyb12 = yyj12 > l
  4986. } else {
  4987. yyb12 = r.CheckBreak()
  4988. }
  4989. if yyb12 {
  4990. r.ReadArrayEnd()
  4991. return
  4992. }
  4993. r.ReadArrayElem()
  4994. if r.TryDecodeAsNil() {
  4995. x.Value = ""
  4996. } else {
  4997. yyv17 := &x.Value
  4998. yym18 := z.DecBinary()
  4999. _ = yym18
  5000. if false {
  5001. } else {
  5002. *((*string)(yyv17)) = r.DecodeString()
  5003. }
  5004. }
  5005. yyj12++
  5006. if yyhl12 {
  5007. yyb12 = yyj12 > l
  5008. } else {
  5009. yyb12 = r.CheckBreak()
  5010. }
  5011. if yyb12 {
  5012. r.ReadArrayEnd()
  5013. return
  5014. }
  5015. r.ReadArrayElem()
  5016. if r.TryDecodeAsNil() {
  5017. x.TTL = 0
  5018. } else {
  5019. yyv19 := &x.TTL
  5020. yym20 := z.DecBinary()
  5021. _ = yym20
  5022. if false {
  5023. } else if z.HasExtensions() && z.DecExt(yyv19) {
  5024. } else {
  5025. *((*int64)(yyv19)) = int64(r.DecodeInt(64))
  5026. }
  5027. }
  5028. for {
  5029. yyj12++
  5030. if yyhl12 {
  5031. yyb12 = yyj12 > l
  5032. } else {
  5033. yyb12 = r.CheckBreak()
  5034. }
  5035. if yyb12 {
  5036. break
  5037. }
  5038. r.ReadArrayElem()
  5039. z.DecStructFieldNotFound(yyj12-1, "")
  5040. }
  5041. r.ReadArrayEnd()
  5042. }
  5043. func (x codecSelfer7612) encNodes(v Nodes, e *codec1978.Encoder) {
  5044. var h codecSelfer7612
  5045. z, r := codec1978.GenHelperEncoder(e)
  5046. _, _, _ = h, z, r
  5047. r.WriteArrayStart(len(v))
  5048. for _, yyv1 := range v {
  5049. r.WriteArrayElem()
  5050. if yyv1 == nil {
  5051. r.EncodeNil()
  5052. } else {
  5053. yyv1.CodecEncodeSelf(e)
  5054. }
  5055. }
  5056. r.WriteArrayEnd()
  5057. }
  5058. func (x codecSelfer7612) decNodes(v *Nodes, d *codec1978.Decoder) {
  5059. var h codecSelfer7612
  5060. z, r := codec1978.GenHelperDecoder(d)
  5061. _, _, _ = h, z, r
  5062. yyv1 := *v
  5063. yyh1, yyl1 := z.DecSliceHelperStart()
  5064. var yyc1 bool
  5065. _ = yyc1
  5066. if yyl1 == 0 {
  5067. if yyv1 == nil {
  5068. yyv1 = []*Node{}
  5069. yyc1 = true
  5070. } else if len(yyv1) != 0 {
  5071. yyv1 = yyv1[:0]
  5072. yyc1 = true
  5073. }
  5074. } else {
  5075. yyhl1 := yyl1 > 0
  5076. var yyrl1 int
  5077. _ = yyrl1
  5078. if yyhl1 {
  5079. if yyl1 > cap(yyv1) {
  5080. yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8)
  5081. if yyrl1 <= cap(yyv1) {
  5082. yyv1 = yyv1[:yyrl1]
  5083. } else {
  5084. yyv1 = make([]*Node, yyrl1)
  5085. }
  5086. yyc1 = true
  5087. } else if yyl1 != len(yyv1) {
  5088. yyv1 = yyv1[:yyl1]
  5089. yyc1 = true
  5090. }
  5091. }
  5092. var yyj1 int
  5093. // var yydn1 bool
  5094. for ; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ {
  5095. if yyj1 == 0 && len(yyv1) == 0 {
  5096. if yyhl1 {
  5097. yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8)
  5098. } else {
  5099. yyrl1 = 8
  5100. }
  5101. yyv1 = make([]*Node, yyrl1)
  5102. yyc1 = true
  5103. }
  5104. yyh1.ElemContainerState(yyj1)
  5105. // yydn1 = r.TryDecodeAsNil()
  5106. // if indefinite, etc, then expand the slice if necessary
  5107. var yydb1 bool
  5108. if yyj1 >= len(yyv1) {
  5109. yyv1 = append(yyv1, nil)
  5110. yyc1 = true
  5111. }
  5112. if yydb1 {
  5113. z.DecSwallow()
  5114. } else {
  5115. if r.TryDecodeAsNil() {
  5116. if yyv1[yyj1] != nil {
  5117. *yyv1[yyj1] = Node{}
  5118. }
  5119. } else {
  5120. if yyv1[yyj1] == nil {
  5121. yyv1[yyj1] = new(Node)
  5122. }
  5123. yyw2 := yyv1[yyj1]
  5124. yyw2.CodecDecodeSelf(d)
  5125. }
  5126. }
  5127. }
  5128. if yyj1 < len(yyv1) {
  5129. yyv1 = yyv1[:yyj1]
  5130. yyc1 = true
  5131. } else if yyj1 == 0 && yyv1 == nil {
  5132. yyv1 = make([]*Node, 0)
  5133. yyc1 = true
  5134. }
  5135. }
  5136. yyh1.End()
  5137. if yyc1 {
  5138. *v = yyv1
  5139. }
  5140. }