keys.generated.go 99 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218
  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. }
  2151. if yyr2 || yy2arr2 {
  2152. r.WriteArrayElem()
  2153. yym4 := z.EncBinary()
  2154. _ = yym4
  2155. if false {
  2156. } else {
  2157. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  2158. }
  2159. } else {
  2160. r.WriteMapElemKey()
  2161. r.EncodeString(codecSelferC_UTF87612, string("key"))
  2162. r.WriteMapElemValue()
  2163. yym5 := z.EncBinary()
  2164. _ = yym5
  2165. if false {
  2166. } else {
  2167. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  2168. }
  2169. }
  2170. if yyr2 || yy2arr2 {
  2171. r.WriteArrayElem()
  2172. if yyq2[1] {
  2173. yym7 := z.EncBinary()
  2174. _ = yym7
  2175. if false {
  2176. } else {
  2177. r.EncodeBool(bool(x.Dir))
  2178. }
  2179. } else {
  2180. r.EncodeBool(false)
  2181. }
  2182. } else {
  2183. if yyq2[1] {
  2184. r.WriteMapElemKey()
  2185. r.EncodeString(codecSelferC_UTF87612, string("dir"))
  2186. r.WriteMapElemValue()
  2187. yym8 := z.EncBinary()
  2188. _ = yym8
  2189. if false {
  2190. } else {
  2191. r.EncodeBool(bool(x.Dir))
  2192. }
  2193. }
  2194. }
  2195. if yyr2 || yy2arr2 {
  2196. r.WriteArrayElem()
  2197. yym10 := z.EncBinary()
  2198. _ = yym10
  2199. if false {
  2200. } else {
  2201. r.EncodeString(codecSelferC_UTF87612, string(x.Value))
  2202. }
  2203. } else {
  2204. r.WriteMapElemKey()
  2205. r.EncodeString(codecSelferC_UTF87612, string("value"))
  2206. r.WriteMapElemValue()
  2207. yym11 := z.EncBinary()
  2208. _ = yym11
  2209. if false {
  2210. } else {
  2211. r.EncodeString(codecSelferC_UTF87612, string(x.Value))
  2212. }
  2213. }
  2214. if yyr2 || yy2arr2 {
  2215. r.WriteArrayElem()
  2216. if x.Nodes == nil {
  2217. r.EncodeNil()
  2218. } else {
  2219. x.Nodes.CodecEncodeSelf(e)
  2220. }
  2221. } else {
  2222. r.WriteMapElemKey()
  2223. r.EncodeString(codecSelferC_UTF87612, string("nodes"))
  2224. r.WriteMapElemValue()
  2225. if x.Nodes == nil {
  2226. r.EncodeNil()
  2227. } else {
  2228. x.Nodes.CodecEncodeSelf(e)
  2229. }
  2230. }
  2231. if yyr2 || yy2arr2 {
  2232. r.WriteArrayElem()
  2233. yym16 := z.EncBinary()
  2234. _ = yym16
  2235. if false {
  2236. } else {
  2237. r.EncodeUint(uint64(x.CreatedIndex))
  2238. }
  2239. } else {
  2240. r.WriteMapElemKey()
  2241. r.EncodeString(codecSelferC_UTF87612, string("createdIndex"))
  2242. r.WriteMapElemValue()
  2243. yym17 := z.EncBinary()
  2244. _ = yym17
  2245. if false {
  2246. } else {
  2247. r.EncodeUint(uint64(x.CreatedIndex))
  2248. }
  2249. }
  2250. if yyr2 || yy2arr2 {
  2251. r.WriteArrayElem()
  2252. yym19 := z.EncBinary()
  2253. _ = yym19
  2254. if false {
  2255. } else {
  2256. r.EncodeUint(uint64(x.ModifiedIndex))
  2257. }
  2258. } else {
  2259. r.WriteMapElemKey()
  2260. r.EncodeString(codecSelferC_UTF87612, string("modifiedIndex"))
  2261. r.WriteMapElemValue()
  2262. yym20 := z.EncBinary()
  2263. _ = yym20
  2264. if false {
  2265. } else {
  2266. r.EncodeUint(uint64(x.ModifiedIndex))
  2267. }
  2268. }
  2269. var yyn21 bool
  2270. if x.Expiration == nil {
  2271. yyn21 = true
  2272. goto LABEL21
  2273. }
  2274. LABEL21:
  2275. if yyr2 || yy2arr2 {
  2276. if yyn21 {
  2277. r.WriteArrayElem()
  2278. r.EncodeNil()
  2279. } else {
  2280. r.WriteArrayElem()
  2281. if yyq2[6] {
  2282. if x.Expiration == nil {
  2283. r.EncodeNil()
  2284. } else {
  2285. yym22 := z.EncBinary()
  2286. _ = yym22
  2287. if false {
  2288. } else if yym23 := z.TimeRtidIfBinc(); yym23 != 0 {
  2289. r.EncodeBuiltin(yym23, x.Expiration)
  2290. } else if z.HasExtensions() && z.EncExt(x.Expiration) {
  2291. } else if yym22 {
  2292. z.EncBinaryMarshal(x.Expiration)
  2293. } else if !yym22 && z.IsJSONHandle() {
  2294. z.EncJSONMarshal(x.Expiration)
  2295. } else {
  2296. z.EncFallback(x.Expiration)
  2297. }
  2298. }
  2299. } else {
  2300. r.EncodeNil()
  2301. }
  2302. }
  2303. } else {
  2304. if yyq2[6] {
  2305. r.WriteMapElemKey()
  2306. r.EncodeString(codecSelferC_UTF87612, string("expiration"))
  2307. r.WriteMapElemValue()
  2308. if yyn21 {
  2309. r.EncodeNil()
  2310. } else {
  2311. if x.Expiration == nil {
  2312. r.EncodeNil()
  2313. } else {
  2314. yym24 := z.EncBinary()
  2315. _ = yym24
  2316. if false {
  2317. } else if yym25 := z.TimeRtidIfBinc(); yym25 != 0 {
  2318. r.EncodeBuiltin(yym25, x.Expiration)
  2319. } else if z.HasExtensions() && z.EncExt(x.Expiration) {
  2320. } else if yym24 {
  2321. z.EncBinaryMarshal(x.Expiration)
  2322. } else if !yym24 && z.IsJSONHandle() {
  2323. z.EncJSONMarshal(x.Expiration)
  2324. } else {
  2325. z.EncFallback(x.Expiration)
  2326. }
  2327. }
  2328. }
  2329. }
  2330. }
  2331. if yyr2 || yy2arr2 {
  2332. r.WriteArrayElem()
  2333. if yyq2[7] {
  2334. yym27 := z.EncBinary()
  2335. _ = yym27
  2336. if false {
  2337. } else {
  2338. r.EncodeInt(int64(x.TTL))
  2339. }
  2340. } else {
  2341. r.EncodeInt(0)
  2342. }
  2343. } else {
  2344. if yyq2[7] {
  2345. r.WriteMapElemKey()
  2346. r.EncodeString(codecSelferC_UTF87612, string("ttl"))
  2347. r.WriteMapElemValue()
  2348. yym28 := z.EncBinary()
  2349. _ = yym28
  2350. if false {
  2351. } else {
  2352. r.EncodeInt(int64(x.TTL))
  2353. }
  2354. }
  2355. }
  2356. if yyr2 || yy2arr2 {
  2357. r.WriteArrayEnd()
  2358. } else {
  2359. r.WriteMapEnd()
  2360. }
  2361. }
  2362. }
  2363. }
  2364. func (x *Node) CodecDecodeSelf(d *codec1978.Decoder) {
  2365. var h codecSelfer7612
  2366. z, r := codec1978.GenHelperDecoder(d)
  2367. _, _, _ = h, z, r
  2368. yym1 := z.DecBinary()
  2369. _ = yym1
  2370. if false {
  2371. } else if z.HasExtensions() && z.DecExt(x) {
  2372. } else {
  2373. yyct2 := r.ContainerType()
  2374. if yyct2 == codecSelferValueTypeMap7612 {
  2375. yyl2 := r.ReadMapStart()
  2376. if yyl2 == 0 {
  2377. r.ReadMapEnd()
  2378. } else {
  2379. x.codecDecodeSelfFromMap(yyl2, d)
  2380. }
  2381. } else if yyct2 == codecSelferValueTypeArray7612 {
  2382. yyl2 := r.ReadArrayStart()
  2383. if yyl2 == 0 {
  2384. r.ReadArrayEnd()
  2385. } else {
  2386. x.codecDecodeSelfFromArray(yyl2, d)
  2387. }
  2388. } else {
  2389. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  2390. }
  2391. }
  2392. }
  2393. func (x *Node) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  2394. var h codecSelfer7612
  2395. z, r := codec1978.GenHelperDecoder(d)
  2396. _, _, _ = h, z, r
  2397. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  2398. _ = yys3Slc
  2399. var yyhl3 bool = l >= 0
  2400. for yyj3 := 0; ; yyj3++ {
  2401. if yyhl3 {
  2402. if yyj3 >= l {
  2403. break
  2404. }
  2405. } else {
  2406. if r.CheckBreak() {
  2407. break
  2408. }
  2409. }
  2410. r.ReadMapElemKey()
  2411. yys3Slc = r.DecodeStringAsBytes()
  2412. yys3 := string(yys3Slc)
  2413. r.ReadMapElemValue()
  2414. switch yys3 {
  2415. case "key":
  2416. if r.TryDecodeAsNil() {
  2417. x.Key = ""
  2418. } else {
  2419. yyv4 := &x.Key
  2420. yym5 := z.DecBinary()
  2421. _ = yym5
  2422. if false {
  2423. } else {
  2424. *((*string)(yyv4)) = r.DecodeString()
  2425. }
  2426. }
  2427. case "dir":
  2428. if r.TryDecodeAsNil() {
  2429. x.Dir = false
  2430. } else {
  2431. yyv6 := &x.Dir
  2432. yym7 := z.DecBinary()
  2433. _ = yym7
  2434. if false {
  2435. } else {
  2436. *((*bool)(yyv6)) = r.DecodeBool()
  2437. }
  2438. }
  2439. case "value":
  2440. if r.TryDecodeAsNil() {
  2441. x.Value = ""
  2442. } else {
  2443. yyv8 := &x.Value
  2444. yym9 := z.DecBinary()
  2445. _ = yym9
  2446. if false {
  2447. } else {
  2448. *((*string)(yyv8)) = r.DecodeString()
  2449. }
  2450. }
  2451. case "nodes":
  2452. if r.TryDecodeAsNil() {
  2453. x.Nodes = nil
  2454. } else {
  2455. yyv10 := &x.Nodes
  2456. yyv10.CodecDecodeSelf(d)
  2457. }
  2458. case "createdIndex":
  2459. if r.TryDecodeAsNil() {
  2460. x.CreatedIndex = 0
  2461. } else {
  2462. yyv11 := &x.CreatedIndex
  2463. yym12 := z.DecBinary()
  2464. _ = yym12
  2465. if false {
  2466. } else {
  2467. *((*uint64)(yyv11)) = uint64(r.DecodeUint(64))
  2468. }
  2469. }
  2470. case "modifiedIndex":
  2471. if r.TryDecodeAsNil() {
  2472. x.ModifiedIndex = 0
  2473. } else {
  2474. yyv13 := &x.ModifiedIndex
  2475. yym14 := z.DecBinary()
  2476. _ = yym14
  2477. if false {
  2478. } else {
  2479. *((*uint64)(yyv13)) = uint64(r.DecodeUint(64))
  2480. }
  2481. }
  2482. case "expiration":
  2483. if x.Expiration == nil {
  2484. x.Expiration = new(time.Time)
  2485. }
  2486. if r.TryDecodeAsNil() {
  2487. if x.Expiration != nil {
  2488. x.Expiration = nil
  2489. }
  2490. } else {
  2491. if x.Expiration == nil {
  2492. x.Expiration = new(time.Time)
  2493. }
  2494. yym16 := z.DecBinary()
  2495. _ = yym16
  2496. if false {
  2497. } else if yym17 := z.TimeRtidIfBinc(); yym17 != 0 {
  2498. r.DecodeBuiltin(yym17, x.Expiration)
  2499. } else if z.HasExtensions() && z.DecExt(x.Expiration) {
  2500. } else if yym16 {
  2501. z.DecBinaryUnmarshal(x.Expiration)
  2502. } else if !yym16 && z.IsJSONHandle() {
  2503. z.DecJSONUnmarshal(x.Expiration)
  2504. } else {
  2505. z.DecFallback(x.Expiration, false)
  2506. }
  2507. }
  2508. case "ttl":
  2509. if r.TryDecodeAsNil() {
  2510. x.TTL = 0
  2511. } else {
  2512. yyv18 := &x.TTL
  2513. yym19 := z.DecBinary()
  2514. _ = yym19
  2515. if false {
  2516. } else {
  2517. *((*int64)(yyv18)) = int64(r.DecodeInt(64))
  2518. }
  2519. }
  2520. default:
  2521. z.DecStructFieldNotFound(-1, yys3)
  2522. } // end switch yys3
  2523. } // end for yyj3
  2524. r.ReadMapEnd()
  2525. }
  2526. func (x *Node) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  2527. var h codecSelfer7612
  2528. z, r := codec1978.GenHelperDecoder(d)
  2529. _, _, _ = h, z, r
  2530. var yyj20 int
  2531. var yyb20 bool
  2532. var yyhl20 bool = l >= 0
  2533. yyj20++
  2534. if yyhl20 {
  2535. yyb20 = yyj20 > l
  2536. } else {
  2537. yyb20 = r.CheckBreak()
  2538. }
  2539. if yyb20 {
  2540. r.ReadArrayEnd()
  2541. return
  2542. }
  2543. r.ReadArrayElem()
  2544. if r.TryDecodeAsNil() {
  2545. x.Key = ""
  2546. } else {
  2547. yyv21 := &x.Key
  2548. yym22 := z.DecBinary()
  2549. _ = yym22
  2550. if false {
  2551. } else {
  2552. *((*string)(yyv21)) = r.DecodeString()
  2553. }
  2554. }
  2555. yyj20++
  2556. if yyhl20 {
  2557. yyb20 = yyj20 > l
  2558. } else {
  2559. yyb20 = r.CheckBreak()
  2560. }
  2561. if yyb20 {
  2562. r.ReadArrayEnd()
  2563. return
  2564. }
  2565. r.ReadArrayElem()
  2566. if r.TryDecodeAsNil() {
  2567. x.Dir = false
  2568. } else {
  2569. yyv23 := &x.Dir
  2570. yym24 := z.DecBinary()
  2571. _ = yym24
  2572. if false {
  2573. } else {
  2574. *((*bool)(yyv23)) = r.DecodeBool()
  2575. }
  2576. }
  2577. yyj20++
  2578. if yyhl20 {
  2579. yyb20 = yyj20 > l
  2580. } else {
  2581. yyb20 = r.CheckBreak()
  2582. }
  2583. if yyb20 {
  2584. r.ReadArrayEnd()
  2585. return
  2586. }
  2587. r.ReadArrayElem()
  2588. if r.TryDecodeAsNil() {
  2589. x.Value = ""
  2590. } else {
  2591. yyv25 := &x.Value
  2592. yym26 := z.DecBinary()
  2593. _ = yym26
  2594. if false {
  2595. } else {
  2596. *((*string)(yyv25)) = r.DecodeString()
  2597. }
  2598. }
  2599. yyj20++
  2600. if yyhl20 {
  2601. yyb20 = yyj20 > l
  2602. } else {
  2603. yyb20 = r.CheckBreak()
  2604. }
  2605. if yyb20 {
  2606. r.ReadArrayEnd()
  2607. return
  2608. }
  2609. r.ReadArrayElem()
  2610. if r.TryDecodeAsNil() {
  2611. x.Nodes = nil
  2612. } else {
  2613. yyv27 := &x.Nodes
  2614. yyv27.CodecDecodeSelf(d)
  2615. }
  2616. yyj20++
  2617. if yyhl20 {
  2618. yyb20 = yyj20 > l
  2619. } else {
  2620. yyb20 = r.CheckBreak()
  2621. }
  2622. if yyb20 {
  2623. r.ReadArrayEnd()
  2624. return
  2625. }
  2626. r.ReadArrayElem()
  2627. if r.TryDecodeAsNil() {
  2628. x.CreatedIndex = 0
  2629. } else {
  2630. yyv28 := &x.CreatedIndex
  2631. yym29 := z.DecBinary()
  2632. _ = yym29
  2633. if false {
  2634. } else {
  2635. *((*uint64)(yyv28)) = uint64(r.DecodeUint(64))
  2636. }
  2637. }
  2638. yyj20++
  2639. if yyhl20 {
  2640. yyb20 = yyj20 > l
  2641. } else {
  2642. yyb20 = r.CheckBreak()
  2643. }
  2644. if yyb20 {
  2645. r.ReadArrayEnd()
  2646. return
  2647. }
  2648. r.ReadArrayElem()
  2649. if r.TryDecodeAsNil() {
  2650. x.ModifiedIndex = 0
  2651. } else {
  2652. yyv30 := &x.ModifiedIndex
  2653. yym31 := z.DecBinary()
  2654. _ = yym31
  2655. if false {
  2656. } else {
  2657. *((*uint64)(yyv30)) = uint64(r.DecodeUint(64))
  2658. }
  2659. }
  2660. if x.Expiration == nil {
  2661. x.Expiration = new(time.Time)
  2662. }
  2663. yyj20++
  2664. if yyhl20 {
  2665. yyb20 = yyj20 > l
  2666. } else {
  2667. yyb20 = r.CheckBreak()
  2668. }
  2669. if yyb20 {
  2670. r.ReadArrayEnd()
  2671. return
  2672. }
  2673. r.ReadArrayElem()
  2674. if r.TryDecodeAsNil() {
  2675. if x.Expiration != nil {
  2676. x.Expiration = nil
  2677. }
  2678. } else {
  2679. if x.Expiration == nil {
  2680. x.Expiration = new(time.Time)
  2681. }
  2682. yym33 := z.DecBinary()
  2683. _ = yym33
  2684. if false {
  2685. } else if yym34 := z.TimeRtidIfBinc(); yym34 != 0 {
  2686. r.DecodeBuiltin(yym34, x.Expiration)
  2687. } else if z.HasExtensions() && z.DecExt(x.Expiration) {
  2688. } else if yym33 {
  2689. z.DecBinaryUnmarshal(x.Expiration)
  2690. } else if !yym33 && z.IsJSONHandle() {
  2691. z.DecJSONUnmarshal(x.Expiration)
  2692. } else {
  2693. z.DecFallback(x.Expiration, false)
  2694. }
  2695. }
  2696. yyj20++
  2697. if yyhl20 {
  2698. yyb20 = yyj20 > l
  2699. } else {
  2700. yyb20 = r.CheckBreak()
  2701. }
  2702. if yyb20 {
  2703. r.ReadArrayEnd()
  2704. return
  2705. }
  2706. r.ReadArrayElem()
  2707. if r.TryDecodeAsNil() {
  2708. x.TTL = 0
  2709. } else {
  2710. yyv35 := &x.TTL
  2711. yym36 := z.DecBinary()
  2712. _ = yym36
  2713. if false {
  2714. } else {
  2715. *((*int64)(yyv35)) = int64(r.DecodeInt(64))
  2716. }
  2717. }
  2718. for {
  2719. yyj20++
  2720. if yyhl20 {
  2721. yyb20 = yyj20 > l
  2722. } else {
  2723. yyb20 = r.CheckBreak()
  2724. }
  2725. if yyb20 {
  2726. break
  2727. }
  2728. r.ReadArrayElem()
  2729. z.DecStructFieldNotFound(yyj20-1, "")
  2730. }
  2731. r.ReadArrayEnd()
  2732. }
  2733. func (x Nodes) CodecEncodeSelf(e *codec1978.Encoder) {
  2734. var h codecSelfer7612
  2735. z, r := codec1978.GenHelperEncoder(e)
  2736. _, _, _ = h, z, r
  2737. if x == nil {
  2738. r.EncodeNil()
  2739. } else {
  2740. yym1 := z.EncBinary()
  2741. _ = yym1
  2742. if false {
  2743. } else if z.HasExtensions() && z.EncExt(x) {
  2744. } else {
  2745. h.encNodes((Nodes)(x), e)
  2746. }
  2747. }
  2748. }
  2749. func (x *Nodes) CodecDecodeSelf(d *codec1978.Decoder) {
  2750. var h codecSelfer7612
  2751. z, r := codec1978.GenHelperDecoder(d)
  2752. _, _, _ = h, z, r
  2753. yym1 := z.DecBinary()
  2754. _ = yym1
  2755. if false {
  2756. } else if z.HasExtensions() && z.DecExt(x) {
  2757. } else {
  2758. h.decNodes((*Nodes)(x), d)
  2759. }
  2760. }
  2761. func (x *httpKeysAPI) CodecEncodeSelf(e *codec1978.Encoder) {
  2762. var h codecSelfer7612
  2763. z, r := codec1978.GenHelperEncoder(e)
  2764. _, _, _ = h, z, r
  2765. if x == nil {
  2766. r.EncodeNil()
  2767. } else {
  2768. yym1 := z.EncBinary()
  2769. _ = yym1
  2770. if false {
  2771. } else if z.HasExtensions() && z.EncExt(x) {
  2772. } else {
  2773. yysep2 := !z.EncBinary()
  2774. yy2arr2 := z.EncBasicHandle().StructToArray
  2775. _, _ = yysep2, yy2arr2
  2776. const yyr2 bool = false
  2777. if yyr2 || yy2arr2 {
  2778. r.WriteArrayStart(0)
  2779. } else {
  2780. r.WriteMapStart(0)
  2781. }
  2782. if yyr2 || yy2arr2 {
  2783. r.WriteArrayEnd()
  2784. } else {
  2785. r.WriteMapEnd()
  2786. }
  2787. }
  2788. }
  2789. }
  2790. func (x *httpKeysAPI) CodecDecodeSelf(d *codec1978.Decoder) {
  2791. var h codecSelfer7612
  2792. z, r := codec1978.GenHelperDecoder(d)
  2793. _, _, _ = h, z, r
  2794. yym1 := z.DecBinary()
  2795. _ = yym1
  2796. if false {
  2797. } else if z.HasExtensions() && z.DecExt(x) {
  2798. } else {
  2799. yyct2 := r.ContainerType()
  2800. if yyct2 == codecSelferValueTypeMap7612 {
  2801. yyl2 := r.ReadMapStart()
  2802. if yyl2 == 0 {
  2803. r.ReadMapEnd()
  2804. } else {
  2805. x.codecDecodeSelfFromMap(yyl2, d)
  2806. }
  2807. } else if yyct2 == codecSelferValueTypeArray7612 {
  2808. yyl2 := r.ReadArrayStart()
  2809. if yyl2 == 0 {
  2810. r.ReadArrayEnd()
  2811. } else {
  2812. x.codecDecodeSelfFromArray(yyl2, d)
  2813. }
  2814. } else {
  2815. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  2816. }
  2817. }
  2818. }
  2819. func (x *httpKeysAPI) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  2820. var h codecSelfer7612
  2821. z, r := codec1978.GenHelperDecoder(d)
  2822. _, _, _ = h, z, r
  2823. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  2824. _ = yys3Slc
  2825. var yyhl3 bool = l >= 0
  2826. for yyj3 := 0; ; yyj3++ {
  2827. if yyhl3 {
  2828. if yyj3 >= l {
  2829. break
  2830. }
  2831. } else {
  2832. if r.CheckBreak() {
  2833. break
  2834. }
  2835. }
  2836. r.ReadMapElemKey()
  2837. yys3Slc = r.DecodeStringAsBytes()
  2838. yys3 := string(yys3Slc)
  2839. r.ReadMapElemValue()
  2840. switch yys3 {
  2841. default:
  2842. z.DecStructFieldNotFound(-1, yys3)
  2843. } // end switch yys3
  2844. } // end for yyj3
  2845. r.ReadMapEnd()
  2846. }
  2847. func (x *httpKeysAPI) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  2848. var h codecSelfer7612
  2849. z, r := codec1978.GenHelperDecoder(d)
  2850. _, _, _ = h, z, r
  2851. var yyj4 int
  2852. var yyb4 bool
  2853. var yyhl4 bool = l >= 0
  2854. for {
  2855. yyj4++
  2856. if yyhl4 {
  2857. yyb4 = yyj4 > l
  2858. } else {
  2859. yyb4 = r.CheckBreak()
  2860. }
  2861. if yyb4 {
  2862. break
  2863. }
  2864. r.ReadArrayElem()
  2865. z.DecStructFieldNotFound(yyj4-1, "")
  2866. }
  2867. r.ReadArrayEnd()
  2868. }
  2869. func (x *httpWatcher) CodecEncodeSelf(e *codec1978.Encoder) {
  2870. var h codecSelfer7612
  2871. z, r := codec1978.GenHelperEncoder(e)
  2872. _, _, _ = h, z, r
  2873. if x == nil {
  2874. r.EncodeNil()
  2875. } else {
  2876. yym1 := z.EncBinary()
  2877. _ = yym1
  2878. if false {
  2879. } else if z.HasExtensions() && z.EncExt(x) {
  2880. } else {
  2881. yysep2 := !z.EncBinary()
  2882. yy2arr2 := z.EncBasicHandle().StructToArray
  2883. _, _ = yysep2, yy2arr2
  2884. const yyr2 bool = false
  2885. if yyr2 || yy2arr2 {
  2886. r.WriteArrayStart(0)
  2887. } else {
  2888. r.WriteMapStart(0)
  2889. }
  2890. if yyr2 || yy2arr2 {
  2891. r.WriteArrayEnd()
  2892. } else {
  2893. r.WriteMapEnd()
  2894. }
  2895. }
  2896. }
  2897. }
  2898. func (x *httpWatcher) CodecDecodeSelf(d *codec1978.Decoder) {
  2899. var h codecSelfer7612
  2900. z, r := codec1978.GenHelperDecoder(d)
  2901. _, _, _ = h, z, r
  2902. yym1 := z.DecBinary()
  2903. _ = yym1
  2904. if false {
  2905. } else if z.HasExtensions() && z.DecExt(x) {
  2906. } else {
  2907. yyct2 := r.ContainerType()
  2908. if yyct2 == codecSelferValueTypeMap7612 {
  2909. yyl2 := r.ReadMapStart()
  2910. if yyl2 == 0 {
  2911. r.ReadMapEnd()
  2912. } else {
  2913. x.codecDecodeSelfFromMap(yyl2, d)
  2914. }
  2915. } else if yyct2 == codecSelferValueTypeArray7612 {
  2916. yyl2 := r.ReadArrayStart()
  2917. if yyl2 == 0 {
  2918. r.ReadArrayEnd()
  2919. } else {
  2920. x.codecDecodeSelfFromArray(yyl2, d)
  2921. }
  2922. } else {
  2923. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  2924. }
  2925. }
  2926. }
  2927. func (x *httpWatcher) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  2928. var h codecSelfer7612
  2929. z, r := codec1978.GenHelperDecoder(d)
  2930. _, _, _ = h, z, r
  2931. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  2932. _ = yys3Slc
  2933. var yyhl3 bool = l >= 0
  2934. for yyj3 := 0; ; yyj3++ {
  2935. if yyhl3 {
  2936. if yyj3 >= l {
  2937. break
  2938. }
  2939. } else {
  2940. if r.CheckBreak() {
  2941. break
  2942. }
  2943. }
  2944. r.ReadMapElemKey()
  2945. yys3Slc = r.DecodeStringAsBytes()
  2946. yys3 := string(yys3Slc)
  2947. r.ReadMapElemValue()
  2948. switch yys3 {
  2949. default:
  2950. z.DecStructFieldNotFound(-1, yys3)
  2951. } // end switch yys3
  2952. } // end for yyj3
  2953. r.ReadMapEnd()
  2954. }
  2955. func (x *httpWatcher) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  2956. var h codecSelfer7612
  2957. z, r := codec1978.GenHelperDecoder(d)
  2958. _, _, _ = h, z, r
  2959. var yyj4 int
  2960. var yyb4 bool
  2961. var yyhl4 bool = l >= 0
  2962. for {
  2963. yyj4++
  2964. if yyhl4 {
  2965. yyb4 = yyj4 > l
  2966. } else {
  2967. yyb4 = r.CheckBreak()
  2968. }
  2969. if yyb4 {
  2970. break
  2971. }
  2972. r.ReadArrayElem()
  2973. z.DecStructFieldNotFound(yyj4-1, "")
  2974. }
  2975. r.ReadArrayEnd()
  2976. }
  2977. func (x *getAction) CodecEncodeSelf(e *codec1978.Encoder) {
  2978. var h codecSelfer7612
  2979. z, r := codec1978.GenHelperEncoder(e)
  2980. _, _, _ = h, z, r
  2981. if x == nil {
  2982. r.EncodeNil()
  2983. } else {
  2984. yym1 := z.EncBinary()
  2985. _ = yym1
  2986. if false {
  2987. } else if z.HasExtensions() && z.EncExt(x) {
  2988. } else {
  2989. yysep2 := !z.EncBinary()
  2990. yy2arr2 := z.EncBasicHandle().StructToArray
  2991. _, _ = yysep2, yy2arr2
  2992. const yyr2 bool = false
  2993. if yyr2 || yy2arr2 {
  2994. r.WriteArrayStart(5)
  2995. } else {
  2996. r.WriteMapStart(5)
  2997. }
  2998. if yyr2 || yy2arr2 {
  2999. r.WriteArrayElem()
  3000. yym4 := z.EncBinary()
  3001. _ = yym4
  3002. if false {
  3003. } else {
  3004. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  3005. }
  3006. } else {
  3007. r.WriteMapElemKey()
  3008. r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
  3009. r.WriteMapElemValue()
  3010. yym5 := z.EncBinary()
  3011. _ = yym5
  3012. if false {
  3013. } else {
  3014. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  3015. }
  3016. }
  3017. if yyr2 || yy2arr2 {
  3018. r.WriteArrayElem()
  3019. yym7 := z.EncBinary()
  3020. _ = yym7
  3021. if false {
  3022. } else {
  3023. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  3024. }
  3025. } else {
  3026. r.WriteMapElemKey()
  3027. r.EncodeString(codecSelferC_UTF87612, string("Key"))
  3028. r.WriteMapElemValue()
  3029. yym8 := z.EncBinary()
  3030. _ = yym8
  3031. if false {
  3032. } else {
  3033. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  3034. }
  3035. }
  3036. if yyr2 || yy2arr2 {
  3037. r.WriteArrayElem()
  3038. yym10 := z.EncBinary()
  3039. _ = yym10
  3040. if false {
  3041. } else {
  3042. r.EncodeBool(bool(x.Recursive))
  3043. }
  3044. } else {
  3045. r.WriteMapElemKey()
  3046. r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
  3047. r.WriteMapElemValue()
  3048. yym11 := z.EncBinary()
  3049. _ = yym11
  3050. if false {
  3051. } else {
  3052. r.EncodeBool(bool(x.Recursive))
  3053. }
  3054. }
  3055. if yyr2 || yy2arr2 {
  3056. r.WriteArrayElem()
  3057. yym13 := z.EncBinary()
  3058. _ = yym13
  3059. if false {
  3060. } else {
  3061. r.EncodeBool(bool(x.Sorted))
  3062. }
  3063. } else {
  3064. r.WriteMapElemKey()
  3065. r.EncodeString(codecSelferC_UTF87612, string("Sorted"))
  3066. r.WriteMapElemValue()
  3067. yym14 := z.EncBinary()
  3068. _ = yym14
  3069. if false {
  3070. } else {
  3071. r.EncodeBool(bool(x.Sorted))
  3072. }
  3073. }
  3074. if yyr2 || yy2arr2 {
  3075. r.WriteArrayElem()
  3076. yym16 := z.EncBinary()
  3077. _ = yym16
  3078. if false {
  3079. } else {
  3080. r.EncodeBool(bool(x.Quorum))
  3081. }
  3082. } else {
  3083. r.WriteMapElemKey()
  3084. r.EncodeString(codecSelferC_UTF87612, string("Quorum"))
  3085. r.WriteMapElemValue()
  3086. yym17 := z.EncBinary()
  3087. _ = yym17
  3088. if false {
  3089. } else {
  3090. r.EncodeBool(bool(x.Quorum))
  3091. }
  3092. }
  3093. if yyr2 || yy2arr2 {
  3094. r.WriteArrayEnd()
  3095. } else {
  3096. r.WriteMapEnd()
  3097. }
  3098. }
  3099. }
  3100. }
  3101. func (x *getAction) CodecDecodeSelf(d *codec1978.Decoder) {
  3102. var h codecSelfer7612
  3103. z, r := codec1978.GenHelperDecoder(d)
  3104. _, _, _ = h, z, r
  3105. yym1 := z.DecBinary()
  3106. _ = yym1
  3107. if false {
  3108. } else if z.HasExtensions() && z.DecExt(x) {
  3109. } else {
  3110. yyct2 := r.ContainerType()
  3111. if yyct2 == codecSelferValueTypeMap7612 {
  3112. yyl2 := r.ReadMapStart()
  3113. if yyl2 == 0 {
  3114. r.ReadMapEnd()
  3115. } else {
  3116. x.codecDecodeSelfFromMap(yyl2, d)
  3117. }
  3118. } else if yyct2 == codecSelferValueTypeArray7612 {
  3119. yyl2 := r.ReadArrayStart()
  3120. if yyl2 == 0 {
  3121. r.ReadArrayEnd()
  3122. } else {
  3123. x.codecDecodeSelfFromArray(yyl2, d)
  3124. }
  3125. } else {
  3126. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  3127. }
  3128. }
  3129. }
  3130. func (x *getAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  3131. var h codecSelfer7612
  3132. z, r := codec1978.GenHelperDecoder(d)
  3133. _, _, _ = h, z, r
  3134. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  3135. _ = yys3Slc
  3136. var yyhl3 bool = l >= 0
  3137. for yyj3 := 0; ; yyj3++ {
  3138. if yyhl3 {
  3139. if yyj3 >= l {
  3140. break
  3141. }
  3142. } else {
  3143. if r.CheckBreak() {
  3144. break
  3145. }
  3146. }
  3147. r.ReadMapElemKey()
  3148. yys3Slc = r.DecodeStringAsBytes()
  3149. yys3 := string(yys3Slc)
  3150. r.ReadMapElemValue()
  3151. switch yys3 {
  3152. case "Prefix":
  3153. if r.TryDecodeAsNil() {
  3154. x.Prefix = ""
  3155. } else {
  3156. yyv4 := &x.Prefix
  3157. yym5 := z.DecBinary()
  3158. _ = yym5
  3159. if false {
  3160. } else {
  3161. *((*string)(yyv4)) = r.DecodeString()
  3162. }
  3163. }
  3164. case "Key":
  3165. if r.TryDecodeAsNil() {
  3166. x.Key = ""
  3167. } else {
  3168. yyv6 := &x.Key
  3169. yym7 := z.DecBinary()
  3170. _ = yym7
  3171. if false {
  3172. } else {
  3173. *((*string)(yyv6)) = r.DecodeString()
  3174. }
  3175. }
  3176. case "Recursive":
  3177. if r.TryDecodeAsNil() {
  3178. x.Recursive = false
  3179. } else {
  3180. yyv8 := &x.Recursive
  3181. yym9 := z.DecBinary()
  3182. _ = yym9
  3183. if false {
  3184. } else {
  3185. *((*bool)(yyv8)) = r.DecodeBool()
  3186. }
  3187. }
  3188. case "Sorted":
  3189. if r.TryDecodeAsNil() {
  3190. x.Sorted = false
  3191. } else {
  3192. yyv10 := &x.Sorted
  3193. yym11 := z.DecBinary()
  3194. _ = yym11
  3195. if false {
  3196. } else {
  3197. *((*bool)(yyv10)) = r.DecodeBool()
  3198. }
  3199. }
  3200. case "Quorum":
  3201. if r.TryDecodeAsNil() {
  3202. x.Quorum = false
  3203. } else {
  3204. yyv12 := &x.Quorum
  3205. yym13 := z.DecBinary()
  3206. _ = yym13
  3207. if false {
  3208. } else {
  3209. *((*bool)(yyv12)) = r.DecodeBool()
  3210. }
  3211. }
  3212. default:
  3213. z.DecStructFieldNotFound(-1, yys3)
  3214. } // end switch yys3
  3215. } // end for yyj3
  3216. r.ReadMapEnd()
  3217. }
  3218. func (x *getAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  3219. var h codecSelfer7612
  3220. z, r := codec1978.GenHelperDecoder(d)
  3221. _, _, _ = h, z, r
  3222. var yyj14 int
  3223. var yyb14 bool
  3224. var yyhl14 bool = l >= 0
  3225. yyj14++
  3226. if yyhl14 {
  3227. yyb14 = yyj14 > l
  3228. } else {
  3229. yyb14 = r.CheckBreak()
  3230. }
  3231. if yyb14 {
  3232. r.ReadArrayEnd()
  3233. return
  3234. }
  3235. r.ReadArrayElem()
  3236. if r.TryDecodeAsNil() {
  3237. x.Prefix = ""
  3238. } else {
  3239. yyv15 := &x.Prefix
  3240. yym16 := z.DecBinary()
  3241. _ = yym16
  3242. if false {
  3243. } else {
  3244. *((*string)(yyv15)) = r.DecodeString()
  3245. }
  3246. }
  3247. yyj14++
  3248. if yyhl14 {
  3249. yyb14 = yyj14 > l
  3250. } else {
  3251. yyb14 = r.CheckBreak()
  3252. }
  3253. if yyb14 {
  3254. r.ReadArrayEnd()
  3255. return
  3256. }
  3257. r.ReadArrayElem()
  3258. if r.TryDecodeAsNil() {
  3259. x.Key = ""
  3260. } else {
  3261. yyv17 := &x.Key
  3262. yym18 := z.DecBinary()
  3263. _ = yym18
  3264. if false {
  3265. } else {
  3266. *((*string)(yyv17)) = r.DecodeString()
  3267. }
  3268. }
  3269. yyj14++
  3270. if yyhl14 {
  3271. yyb14 = yyj14 > l
  3272. } else {
  3273. yyb14 = r.CheckBreak()
  3274. }
  3275. if yyb14 {
  3276. r.ReadArrayEnd()
  3277. return
  3278. }
  3279. r.ReadArrayElem()
  3280. if r.TryDecodeAsNil() {
  3281. x.Recursive = false
  3282. } else {
  3283. yyv19 := &x.Recursive
  3284. yym20 := z.DecBinary()
  3285. _ = yym20
  3286. if false {
  3287. } else {
  3288. *((*bool)(yyv19)) = r.DecodeBool()
  3289. }
  3290. }
  3291. yyj14++
  3292. if yyhl14 {
  3293. yyb14 = yyj14 > l
  3294. } else {
  3295. yyb14 = r.CheckBreak()
  3296. }
  3297. if yyb14 {
  3298. r.ReadArrayEnd()
  3299. return
  3300. }
  3301. r.ReadArrayElem()
  3302. if r.TryDecodeAsNil() {
  3303. x.Sorted = false
  3304. } else {
  3305. yyv21 := &x.Sorted
  3306. yym22 := z.DecBinary()
  3307. _ = yym22
  3308. if false {
  3309. } else {
  3310. *((*bool)(yyv21)) = r.DecodeBool()
  3311. }
  3312. }
  3313. yyj14++
  3314. if yyhl14 {
  3315. yyb14 = yyj14 > l
  3316. } else {
  3317. yyb14 = r.CheckBreak()
  3318. }
  3319. if yyb14 {
  3320. r.ReadArrayEnd()
  3321. return
  3322. }
  3323. r.ReadArrayElem()
  3324. if r.TryDecodeAsNil() {
  3325. x.Quorum = false
  3326. } else {
  3327. yyv23 := &x.Quorum
  3328. yym24 := z.DecBinary()
  3329. _ = yym24
  3330. if false {
  3331. } else {
  3332. *((*bool)(yyv23)) = r.DecodeBool()
  3333. }
  3334. }
  3335. for {
  3336. yyj14++
  3337. if yyhl14 {
  3338. yyb14 = yyj14 > l
  3339. } else {
  3340. yyb14 = r.CheckBreak()
  3341. }
  3342. if yyb14 {
  3343. break
  3344. }
  3345. r.ReadArrayElem()
  3346. z.DecStructFieldNotFound(yyj14-1, "")
  3347. }
  3348. r.ReadArrayEnd()
  3349. }
  3350. func (x *waitAction) CodecEncodeSelf(e *codec1978.Encoder) {
  3351. var h codecSelfer7612
  3352. z, r := codec1978.GenHelperEncoder(e)
  3353. _, _, _ = h, z, r
  3354. if x == nil {
  3355. r.EncodeNil()
  3356. } else {
  3357. yym1 := z.EncBinary()
  3358. _ = yym1
  3359. if false {
  3360. } else if z.HasExtensions() && z.EncExt(x) {
  3361. } else {
  3362. yysep2 := !z.EncBinary()
  3363. yy2arr2 := z.EncBasicHandle().StructToArray
  3364. _, _ = yysep2, yy2arr2
  3365. const yyr2 bool = false
  3366. if yyr2 || yy2arr2 {
  3367. r.WriteArrayStart(4)
  3368. } else {
  3369. r.WriteMapStart(4)
  3370. }
  3371. if yyr2 || yy2arr2 {
  3372. r.WriteArrayElem()
  3373. yym4 := z.EncBinary()
  3374. _ = yym4
  3375. if false {
  3376. } else {
  3377. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  3378. }
  3379. } else {
  3380. r.WriteMapElemKey()
  3381. r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
  3382. r.WriteMapElemValue()
  3383. yym5 := z.EncBinary()
  3384. _ = yym5
  3385. if false {
  3386. } else {
  3387. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  3388. }
  3389. }
  3390. if yyr2 || yy2arr2 {
  3391. r.WriteArrayElem()
  3392. yym7 := z.EncBinary()
  3393. _ = yym7
  3394. if false {
  3395. } else {
  3396. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  3397. }
  3398. } else {
  3399. r.WriteMapElemKey()
  3400. r.EncodeString(codecSelferC_UTF87612, string("Key"))
  3401. r.WriteMapElemValue()
  3402. yym8 := z.EncBinary()
  3403. _ = yym8
  3404. if false {
  3405. } else {
  3406. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  3407. }
  3408. }
  3409. if yyr2 || yy2arr2 {
  3410. r.WriteArrayElem()
  3411. yym10 := z.EncBinary()
  3412. _ = yym10
  3413. if false {
  3414. } else {
  3415. r.EncodeUint(uint64(x.WaitIndex))
  3416. }
  3417. } else {
  3418. r.WriteMapElemKey()
  3419. r.EncodeString(codecSelferC_UTF87612, string("WaitIndex"))
  3420. r.WriteMapElemValue()
  3421. yym11 := z.EncBinary()
  3422. _ = yym11
  3423. if false {
  3424. } else {
  3425. r.EncodeUint(uint64(x.WaitIndex))
  3426. }
  3427. }
  3428. if yyr2 || yy2arr2 {
  3429. r.WriteArrayElem()
  3430. yym13 := z.EncBinary()
  3431. _ = yym13
  3432. if false {
  3433. } else {
  3434. r.EncodeBool(bool(x.Recursive))
  3435. }
  3436. } else {
  3437. r.WriteMapElemKey()
  3438. r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
  3439. r.WriteMapElemValue()
  3440. yym14 := z.EncBinary()
  3441. _ = yym14
  3442. if false {
  3443. } else {
  3444. r.EncodeBool(bool(x.Recursive))
  3445. }
  3446. }
  3447. if yyr2 || yy2arr2 {
  3448. r.WriteArrayEnd()
  3449. } else {
  3450. r.WriteMapEnd()
  3451. }
  3452. }
  3453. }
  3454. }
  3455. func (x *waitAction) CodecDecodeSelf(d *codec1978.Decoder) {
  3456. var h codecSelfer7612
  3457. z, r := codec1978.GenHelperDecoder(d)
  3458. _, _, _ = h, z, r
  3459. yym1 := z.DecBinary()
  3460. _ = yym1
  3461. if false {
  3462. } else if z.HasExtensions() && z.DecExt(x) {
  3463. } else {
  3464. yyct2 := r.ContainerType()
  3465. if yyct2 == codecSelferValueTypeMap7612 {
  3466. yyl2 := r.ReadMapStart()
  3467. if yyl2 == 0 {
  3468. r.ReadMapEnd()
  3469. } else {
  3470. x.codecDecodeSelfFromMap(yyl2, d)
  3471. }
  3472. } else if yyct2 == codecSelferValueTypeArray7612 {
  3473. yyl2 := r.ReadArrayStart()
  3474. if yyl2 == 0 {
  3475. r.ReadArrayEnd()
  3476. } else {
  3477. x.codecDecodeSelfFromArray(yyl2, d)
  3478. }
  3479. } else {
  3480. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  3481. }
  3482. }
  3483. }
  3484. func (x *waitAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  3485. var h codecSelfer7612
  3486. z, r := codec1978.GenHelperDecoder(d)
  3487. _, _, _ = h, z, r
  3488. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  3489. _ = yys3Slc
  3490. var yyhl3 bool = l >= 0
  3491. for yyj3 := 0; ; yyj3++ {
  3492. if yyhl3 {
  3493. if yyj3 >= l {
  3494. break
  3495. }
  3496. } else {
  3497. if r.CheckBreak() {
  3498. break
  3499. }
  3500. }
  3501. r.ReadMapElemKey()
  3502. yys3Slc = r.DecodeStringAsBytes()
  3503. yys3 := string(yys3Slc)
  3504. r.ReadMapElemValue()
  3505. switch yys3 {
  3506. case "Prefix":
  3507. if r.TryDecodeAsNil() {
  3508. x.Prefix = ""
  3509. } else {
  3510. yyv4 := &x.Prefix
  3511. yym5 := z.DecBinary()
  3512. _ = yym5
  3513. if false {
  3514. } else {
  3515. *((*string)(yyv4)) = r.DecodeString()
  3516. }
  3517. }
  3518. case "Key":
  3519. if r.TryDecodeAsNil() {
  3520. x.Key = ""
  3521. } else {
  3522. yyv6 := &x.Key
  3523. yym7 := z.DecBinary()
  3524. _ = yym7
  3525. if false {
  3526. } else {
  3527. *((*string)(yyv6)) = r.DecodeString()
  3528. }
  3529. }
  3530. case "WaitIndex":
  3531. if r.TryDecodeAsNil() {
  3532. x.WaitIndex = 0
  3533. } else {
  3534. yyv8 := &x.WaitIndex
  3535. yym9 := z.DecBinary()
  3536. _ = yym9
  3537. if false {
  3538. } else {
  3539. *((*uint64)(yyv8)) = uint64(r.DecodeUint(64))
  3540. }
  3541. }
  3542. case "Recursive":
  3543. if r.TryDecodeAsNil() {
  3544. x.Recursive = false
  3545. } else {
  3546. yyv10 := &x.Recursive
  3547. yym11 := z.DecBinary()
  3548. _ = yym11
  3549. if false {
  3550. } else {
  3551. *((*bool)(yyv10)) = r.DecodeBool()
  3552. }
  3553. }
  3554. default:
  3555. z.DecStructFieldNotFound(-1, yys3)
  3556. } // end switch yys3
  3557. } // end for yyj3
  3558. r.ReadMapEnd()
  3559. }
  3560. func (x *waitAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  3561. var h codecSelfer7612
  3562. z, r := codec1978.GenHelperDecoder(d)
  3563. _, _, _ = h, z, r
  3564. var yyj12 int
  3565. var yyb12 bool
  3566. var yyhl12 bool = l >= 0
  3567. yyj12++
  3568. if yyhl12 {
  3569. yyb12 = yyj12 > l
  3570. } else {
  3571. yyb12 = r.CheckBreak()
  3572. }
  3573. if yyb12 {
  3574. r.ReadArrayEnd()
  3575. return
  3576. }
  3577. r.ReadArrayElem()
  3578. if r.TryDecodeAsNil() {
  3579. x.Prefix = ""
  3580. } else {
  3581. yyv13 := &x.Prefix
  3582. yym14 := z.DecBinary()
  3583. _ = yym14
  3584. if false {
  3585. } else {
  3586. *((*string)(yyv13)) = r.DecodeString()
  3587. }
  3588. }
  3589. yyj12++
  3590. if yyhl12 {
  3591. yyb12 = yyj12 > l
  3592. } else {
  3593. yyb12 = r.CheckBreak()
  3594. }
  3595. if yyb12 {
  3596. r.ReadArrayEnd()
  3597. return
  3598. }
  3599. r.ReadArrayElem()
  3600. if r.TryDecodeAsNil() {
  3601. x.Key = ""
  3602. } else {
  3603. yyv15 := &x.Key
  3604. yym16 := z.DecBinary()
  3605. _ = yym16
  3606. if false {
  3607. } else {
  3608. *((*string)(yyv15)) = r.DecodeString()
  3609. }
  3610. }
  3611. yyj12++
  3612. if yyhl12 {
  3613. yyb12 = yyj12 > l
  3614. } else {
  3615. yyb12 = r.CheckBreak()
  3616. }
  3617. if yyb12 {
  3618. r.ReadArrayEnd()
  3619. return
  3620. }
  3621. r.ReadArrayElem()
  3622. if r.TryDecodeAsNil() {
  3623. x.WaitIndex = 0
  3624. } else {
  3625. yyv17 := &x.WaitIndex
  3626. yym18 := z.DecBinary()
  3627. _ = yym18
  3628. if false {
  3629. } else {
  3630. *((*uint64)(yyv17)) = uint64(r.DecodeUint(64))
  3631. }
  3632. }
  3633. yyj12++
  3634. if yyhl12 {
  3635. yyb12 = yyj12 > l
  3636. } else {
  3637. yyb12 = r.CheckBreak()
  3638. }
  3639. if yyb12 {
  3640. r.ReadArrayEnd()
  3641. return
  3642. }
  3643. r.ReadArrayElem()
  3644. if r.TryDecodeAsNil() {
  3645. x.Recursive = false
  3646. } else {
  3647. yyv19 := &x.Recursive
  3648. yym20 := z.DecBinary()
  3649. _ = yym20
  3650. if false {
  3651. } else {
  3652. *((*bool)(yyv19)) = r.DecodeBool()
  3653. }
  3654. }
  3655. for {
  3656. yyj12++
  3657. if yyhl12 {
  3658. yyb12 = yyj12 > l
  3659. } else {
  3660. yyb12 = r.CheckBreak()
  3661. }
  3662. if yyb12 {
  3663. break
  3664. }
  3665. r.ReadArrayElem()
  3666. z.DecStructFieldNotFound(yyj12-1, "")
  3667. }
  3668. r.ReadArrayEnd()
  3669. }
  3670. func (x *setAction) CodecEncodeSelf(e *codec1978.Encoder) {
  3671. var h codecSelfer7612
  3672. z, r := codec1978.GenHelperEncoder(e)
  3673. _, _, _ = h, z, r
  3674. if x == nil {
  3675. r.EncodeNil()
  3676. } else {
  3677. yym1 := z.EncBinary()
  3678. _ = yym1
  3679. if false {
  3680. } else if z.HasExtensions() && z.EncExt(x) {
  3681. } else {
  3682. yysep2 := !z.EncBinary()
  3683. yy2arr2 := z.EncBasicHandle().StructToArray
  3684. _, _ = yysep2, yy2arr2
  3685. const yyr2 bool = false
  3686. if yyr2 || yy2arr2 {
  3687. r.WriteArrayStart(10)
  3688. } else {
  3689. r.WriteMapStart(10)
  3690. }
  3691. if yyr2 || yy2arr2 {
  3692. r.WriteArrayElem()
  3693. yym4 := z.EncBinary()
  3694. _ = yym4
  3695. if false {
  3696. } else {
  3697. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  3698. }
  3699. } else {
  3700. r.WriteMapElemKey()
  3701. r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
  3702. r.WriteMapElemValue()
  3703. yym5 := z.EncBinary()
  3704. _ = yym5
  3705. if false {
  3706. } else {
  3707. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  3708. }
  3709. }
  3710. if yyr2 || yy2arr2 {
  3711. r.WriteArrayElem()
  3712. yym7 := z.EncBinary()
  3713. _ = yym7
  3714. if false {
  3715. } else {
  3716. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  3717. }
  3718. } else {
  3719. r.WriteMapElemKey()
  3720. r.EncodeString(codecSelferC_UTF87612, string("Key"))
  3721. r.WriteMapElemValue()
  3722. yym8 := z.EncBinary()
  3723. _ = yym8
  3724. if false {
  3725. } else {
  3726. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  3727. }
  3728. }
  3729. if yyr2 || yy2arr2 {
  3730. r.WriteArrayElem()
  3731. yym10 := z.EncBinary()
  3732. _ = yym10
  3733. if false {
  3734. } else {
  3735. r.EncodeString(codecSelferC_UTF87612, string(x.Value))
  3736. }
  3737. } else {
  3738. r.WriteMapElemKey()
  3739. r.EncodeString(codecSelferC_UTF87612, string("Value"))
  3740. r.WriteMapElemValue()
  3741. yym11 := z.EncBinary()
  3742. _ = yym11
  3743. if false {
  3744. } else {
  3745. r.EncodeString(codecSelferC_UTF87612, string(x.Value))
  3746. }
  3747. }
  3748. if yyr2 || yy2arr2 {
  3749. r.WriteArrayElem()
  3750. yym13 := z.EncBinary()
  3751. _ = yym13
  3752. if false {
  3753. } else {
  3754. r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
  3755. }
  3756. } else {
  3757. r.WriteMapElemKey()
  3758. r.EncodeString(codecSelferC_UTF87612, string("PrevValue"))
  3759. r.WriteMapElemValue()
  3760. yym14 := z.EncBinary()
  3761. _ = yym14
  3762. if false {
  3763. } else {
  3764. r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
  3765. }
  3766. }
  3767. if yyr2 || yy2arr2 {
  3768. r.WriteArrayElem()
  3769. yym16 := z.EncBinary()
  3770. _ = yym16
  3771. if false {
  3772. } else {
  3773. r.EncodeUint(uint64(x.PrevIndex))
  3774. }
  3775. } else {
  3776. r.WriteMapElemKey()
  3777. r.EncodeString(codecSelferC_UTF87612, string("PrevIndex"))
  3778. r.WriteMapElemValue()
  3779. yym17 := z.EncBinary()
  3780. _ = yym17
  3781. if false {
  3782. } else {
  3783. r.EncodeUint(uint64(x.PrevIndex))
  3784. }
  3785. }
  3786. if yyr2 || yy2arr2 {
  3787. r.WriteArrayElem()
  3788. x.PrevExist.CodecEncodeSelf(e)
  3789. } else {
  3790. r.WriteMapElemKey()
  3791. r.EncodeString(codecSelferC_UTF87612, string("PrevExist"))
  3792. r.WriteMapElemValue()
  3793. x.PrevExist.CodecEncodeSelf(e)
  3794. }
  3795. if yyr2 || yy2arr2 {
  3796. r.WriteArrayElem()
  3797. yym22 := z.EncBinary()
  3798. _ = yym22
  3799. if false {
  3800. } else if z.HasExtensions() && z.EncExt(x.TTL) {
  3801. } else {
  3802. r.EncodeInt(int64(x.TTL))
  3803. }
  3804. } else {
  3805. r.WriteMapElemKey()
  3806. r.EncodeString(codecSelferC_UTF87612, string("TTL"))
  3807. r.WriteMapElemValue()
  3808. yym23 := z.EncBinary()
  3809. _ = yym23
  3810. if false {
  3811. } else if z.HasExtensions() && z.EncExt(x.TTL) {
  3812. } else {
  3813. r.EncodeInt(int64(x.TTL))
  3814. }
  3815. }
  3816. if yyr2 || yy2arr2 {
  3817. r.WriteArrayElem()
  3818. yym25 := z.EncBinary()
  3819. _ = yym25
  3820. if false {
  3821. } else {
  3822. r.EncodeBool(bool(x.Refresh))
  3823. }
  3824. } else {
  3825. r.WriteMapElemKey()
  3826. r.EncodeString(codecSelferC_UTF87612, string("Refresh"))
  3827. r.WriteMapElemValue()
  3828. yym26 := z.EncBinary()
  3829. _ = yym26
  3830. if false {
  3831. } else {
  3832. r.EncodeBool(bool(x.Refresh))
  3833. }
  3834. }
  3835. if yyr2 || yy2arr2 {
  3836. r.WriteArrayElem()
  3837. yym28 := z.EncBinary()
  3838. _ = yym28
  3839. if false {
  3840. } else {
  3841. r.EncodeBool(bool(x.Dir))
  3842. }
  3843. } else {
  3844. r.WriteMapElemKey()
  3845. r.EncodeString(codecSelferC_UTF87612, string("Dir"))
  3846. r.WriteMapElemValue()
  3847. yym29 := z.EncBinary()
  3848. _ = yym29
  3849. if false {
  3850. } else {
  3851. r.EncodeBool(bool(x.Dir))
  3852. }
  3853. }
  3854. if yyr2 || yy2arr2 {
  3855. r.WriteArrayElem()
  3856. yym31 := z.EncBinary()
  3857. _ = yym31
  3858. if false {
  3859. } else {
  3860. r.EncodeBool(bool(x.NoValueOnSuccess))
  3861. }
  3862. } else {
  3863. r.WriteMapElemKey()
  3864. r.EncodeString(codecSelferC_UTF87612, string("NoValueOnSuccess"))
  3865. r.WriteMapElemValue()
  3866. yym32 := z.EncBinary()
  3867. _ = yym32
  3868. if false {
  3869. } else {
  3870. r.EncodeBool(bool(x.NoValueOnSuccess))
  3871. }
  3872. }
  3873. if yyr2 || yy2arr2 {
  3874. r.WriteArrayEnd()
  3875. } else {
  3876. r.WriteMapEnd()
  3877. }
  3878. }
  3879. }
  3880. }
  3881. func (x *setAction) CodecDecodeSelf(d *codec1978.Decoder) {
  3882. var h codecSelfer7612
  3883. z, r := codec1978.GenHelperDecoder(d)
  3884. _, _, _ = h, z, r
  3885. yym1 := z.DecBinary()
  3886. _ = yym1
  3887. if false {
  3888. } else if z.HasExtensions() && z.DecExt(x) {
  3889. } else {
  3890. yyct2 := r.ContainerType()
  3891. if yyct2 == codecSelferValueTypeMap7612 {
  3892. yyl2 := r.ReadMapStart()
  3893. if yyl2 == 0 {
  3894. r.ReadMapEnd()
  3895. } else {
  3896. x.codecDecodeSelfFromMap(yyl2, d)
  3897. }
  3898. } else if yyct2 == codecSelferValueTypeArray7612 {
  3899. yyl2 := r.ReadArrayStart()
  3900. if yyl2 == 0 {
  3901. r.ReadArrayEnd()
  3902. } else {
  3903. x.codecDecodeSelfFromArray(yyl2, d)
  3904. }
  3905. } else {
  3906. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  3907. }
  3908. }
  3909. }
  3910. func (x *setAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  3911. var h codecSelfer7612
  3912. z, r := codec1978.GenHelperDecoder(d)
  3913. _, _, _ = h, z, r
  3914. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  3915. _ = yys3Slc
  3916. var yyhl3 bool = l >= 0
  3917. for yyj3 := 0; ; yyj3++ {
  3918. if yyhl3 {
  3919. if yyj3 >= l {
  3920. break
  3921. }
  3922. } else {
  3923. if r.CheckBreak() {
  3924. break
  3925. }
  3926. }
  3927. r.ReadMapElemKey()
  3928. yys3Slc = r.DecodeStringAsBytes()
  3929. yys3 := string(yys3Slc)
  3930. r.ReadMapElemValue()
  3931. switch yys3 {
  3932. case "Prefix":
  3933. if r.TryDecodeAsNil() {
  3934. x.Prefix = ""
  3935. } else {
  3936. yyv4 := &x.Prefix
  3937. yym5 := z.DecBinary()
  3938. _ = yym5
  3939. if false {
  3940. } else {
  3941. *((*string)(yyv4)) = r.DecodeString()
  3942. }
  3943. }
  3944. case "Key":
  3945. if r.TryDecodeAsNil() {
  3946. x.Key = ""
  3947. } else {
  3948. yyv6 := &x.Key
  3949. yym7 := z.DecBinary()
  3950. _ = yym7
  3951. if false {
  3952. } else {
  3953. *((*string)(yyv6)) = r.DecodeString()
  3954. }
  3955. }
  3956. case "Value":
  3957. if r.TryDecodeAsNil() {
  3958. x.Value = ""
  3959. } else {
  3960. yyv8 := &x.Value
  3961. yym9 := z.DecBinary()
  3962. _ = yym9
  3963. if false {
  3964. } else {
  3965. *((*string)(yyv8)) = r.DecodeString()
  3966. }
  3967. }
  3968. case "PrevValue":
  3969. if r.TryDecodeAsNil() {
  3970. x.PrevValue = ""
  3971. } else {
  3972. yyv10 := &x.PrevValue
  3973. yym11 := z.DecBinary()
  3974. _ = yym11
  3975. if false {
  3976. } else {
  3977. *((*string)(yyv10)) = r.DecodeString()
  3978. }
  3979. }
  3980. case "PrevIndex":
  3981. if r.TryDecodeAsNil() {
  3982. x.PrevIndex = 0
  3983. } else {
  3984. yyv12 := &x.PrevIndex
  3985. yym13 := z.DecBinary()
  3986. _ = yym13
  3987. if false {
  3988. } else {
  3989. *((*uint64)(yyv12)) = uint64(r.DecodeUint(64))
  3990. }
  3991. }
  3992. case "PrevExist":
  3993. if r.TryDecodeAsNil() {
  3994. x.PrevExist = ""
  3995. } else {
  3996. yyv14 := &x.PrevExist
  3997. yyv14.CodecDecodeSelf(d)
  3998. }
  3999. case "TTL":
  4000. if r.TryDecodeAsNil() {
  4001. x.TTL = 0
  4002. } else {
  4003. yyv15 := &x.TTL
  4004. yym16 := z.DecBinary()
  4005. _ = yym16
  4006. if false {
  4007. } else if z.HasExtensions() && z.DecExt(yyv15) {
  4008. } else {
  4009. *((*int64)(yyv15)) = int64(r.DecodeInt(64))
  4010. }
  4011. }
  4012. case "Refresh":
  4013. if r.TryDecodeAsNil() {
  4014. x.Refresh = false
  4015. } else {
  4016. yyv17 := &x.Refresh
  4017. yym18 := z.DecBinary()
  4018. _ = yym18
  4019. if false {
  4020. } else {
  4021. *((*bool)(yyv17)) = r.DecodeBool()
  4022. }
  4023. }
  4024. case "Dir":
  4025. if r.TryDecodeAsNil() {
  4026. x.Dir = false
  4027. } else {
  4028. yyv19 := &x.Dir
  4029. yym20 := z.DecBinary()
  4030. _ = yym20
  4031. if false {
  4032. } else {
  4033. *((*bool)(yyv19)) = r.DecodeBool()
  4034. }
  4035. }
  4036. case "NoValueOnSuccess":
  4037. if r.TryDecodeAsNil() {
  4038. x.NoValueOnSuccess = false
  4039. } else {
  4040. yyv21 := &x.NoValueOnSuccess
  4041. yym22 := z.DecBinary()
  4042. _ = yym22
  4043. if false {
  4044. } else {
  4045. *((*bool)(yyv21)) = r.DecodeBool()
  4046. }
  4047. }
  4048. default:
  4049. z.DecStructFieldNotFound(-1, yys3)
  4050. } // end switch yys3
  4051. } // end for yyj3
  4052. r.ReadMapEnd()
  4053. }
  4054. func (x *setAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  4055. var h codecSelfer7612
  4056. z, r := codec1978.GenHelperDecoder(d)
  4057. _, _, _ = h, z, r
  4058. var yyj23 int
  4059. var yyb23 bool
  4060. var yyhl23 bool = l >= 0
  4061. yyj23++
  4062. if yyhl23 {
  4063. yyb23 = yyj23 > l
  4064. } else {
  4065. yyb23 = r.CheckBreak()
  4066. }
  4067. if yyb23 {
  4068. r.ReadArrayEnd()
  4069. return
  4070. }
  4071. r.ReadArrayElem()
  4072. if r.TryDecodeAsNil() {
  4073. x.Prefix = ""
  4074. } else {
  4075. yyv24 := &x.Prefix
  4076. yym25 := z.DecBinary()
  4077. _ = yym25
  4078. if false {
  4079. } else {
  4080. *((*string)(yyv24)) = r.DecodeString()
  4081. }
  4082. }
  4083. yyj23++
  4084. if yyhl23 {
  4085. yyb23 = yyj23 > l
  4086. } else {
  4087. yyb23 = r.CheckBreak()
  4088. }
  4089. if yyb23 {
  4090. r.ReadArrayEnd()
  4091. return
  4092. }
  4093. r.ReadArrayElem()
  4094. if r.TryDecodeAsNil() {
  4095. x.Key = ""
  4096. } else {
  4097. yyv26 := &x.Key
  4098. yym27 := z.DecBinary()
  4099. _ = yym27
  4100. if false {
  4101. } else {
  4102. *((*string)(yyv26)) = r.DecodeString()
  4103. }
  4104. }
  4105. yyj23++
  4106. if yyhl23 {
  4107. yyb23 = yyj23 > l
  4108. } else {
  4109. yyb23 = r.CheckBreak()
  4110. }
  4111. if yyb23 {
  4112. r.ReadArrayEnd()
  4113. return
  4114. }
  4115. r.ReadArrayElem()
  4116. if r.TryDecodeAsNil() {
  4117. x.Value = ""
  4118. } else {
  4119. yyv28 := &x.Value
  4120. yym29 := z.DecBinary()
  4121. _ = yym29
  4122. if false {
  4123. } else {
  4124. *((*string)(yyv28)) = r.DecodeString()
  4125. }
  4126. }
  4127. yyj23++
  4128. if yyhl23 {
  4129. yyb23 = yyj23 > l
  4130. } else {
  4131. yyb23 = r.CheckBreak()
  4132. }
  4133. if yyb23 {
  4134. r.ReadArrayEnd()
  4135. return
  4136. }
  4137. r.ReadArrayElem()
  4138. if r.TryDecodeAsNil() {
  4139. x.PrevValue = ""
  4140. } else {
  4141. yyv30 := &x.PrevValue
  4142. yym31 := z.DecBinary()
  4143. _ = yym31
  4144. if false {
  4145. } else {
  4146. *((*string)(yyv30)) = r.DecodeString()
  4147. }
  4148. }
  4149. yyj23++
  4150. if yyhl23 {
  4151. yyb23 = yyj23 > l
  4152. } else {
  4153. yyb23 = r.CheckBreak()
  4154. }
  4155. if yyb23 {
  4156. r.ReadArrayEnd()
  4157. return
  4158. }
  4159. r.ReadArrayElem()
  4160. if r.TryDecodeAsNil() {
  4161. x.PrevIndex = 0
  4162. } else {
  4163. yyv32 := &x.PrevIndex
  4164. yym33 := z.DecBinary()
  4165. _ = yym33
  4166. if false {
  4167. } else {
  4168. *((*uint64)(yyv32)) = uint64(r.DecodeUint(64))
  4169. }
  4170. }
  4171. yyj23++
  4172. if yyhl23 {
  4173. yyb23 = yyj23 > l
  4174. } else {
  4175. yyb23 = r.CheckBreak()
  4176. }
  4177. if yyb23 {
  4178. r.ReadArrayEnd()
  4179. return
  4180. }
  4181. r.ReadArrayElem()
  4182. if r.TryDecodeAsNil() {
  4183. x.PrevExist = ""
  4184. } else {
  4185. yyv34 := &x.PrevExist
  4186. yyv34.CodecDecodeSelf(d)
  4187. }
  4188. yyj23++
  4189. if yyhl23 {
  4190. yyb23 = yyj23 > l
  4191. } else {
  4192. yyb23 = r.CheckBreak()
  4193. }
  4194. if yyb23 {
  4195. r.ReadArrayEnd()
  4196. return
  4197. }
  4198. r.ReadArrayElem()
  4199. if r.TryDecodeAsNil() {
  4200. x.TTL = 0
  4201. } else {
  4202. yyv35 := &x.TTL
  4203. yym36 := z.DecBinary()
  4204. _ = yym36
  4205. if false {
  4206. } else if z.HasExtensions() && z.DecExt(yyv35) {
  4207. } else {
  4208. *((*int64)(yyv35)) = int64(r.DecodeInt(64))
  4209. }
  4210. }
  4211. yyj23++
  4212. if yyhl23 {
  4213. yyb23 = yyj23 > l
  4214. } else {
  4215. yyb23 = r.CheckBreak()
  4216. }
  4217. if yyb23 {
  4218. r.ReadArrayEnd()
  4219. return
  4220. }
  4221. r.ReadArrayElem()
  4222. if r.TryDecodeAsNil() {
  4223. x.Refresh = false
  4224. } else {
  4225. yyv37 := &x.Refresh
  4226. yym38 := z.DecBinary()
  4227. _ = yym38
  4228. if false {
  4229. } else {
  4230. *((*bool)(yyv37)) = r.DecodeBool()
  4231. }
  4232. }
  4233. yyj23++
  4234. if yyhl23 {
  4235. yyb23 = yyj23 > l
  4236. } else {
  4237. yyb23 = r.CheckBreak()
  4238. }
  4239. if yyb23 {
  4240. r.ReadArrayEnd()
  4241. return
  4242. }
  4243. r.ReadArrayElem()
  4244. if r.TryDecodeAsNil() {
  4245. x.Dir = false
  4246. } else {
  4247. yyv39 := &x.Dir
  4248. yym40 := z.DecBinary()
  4249. _ = yym40
  4250. if false {
  4251. } else {
  4252. *((*bool)(yyv39)) = r.DecodeBool()
  4253. }
  4254. }
  4255. yyj23++
  4256. if yyhl23 {
  4257. yyb23 = yyj23 > l
  4258. } else {
  4259. yyb23 = r.CheckBreak()
  4260. }
  4261. if yyb23 {
  4262. r.ReadArrayEnd()
  4263. return
  4264. }
  4265. r.ReadArrayElem()
  4266. if r.TryDecodeAsNil() {
  4267. x.NoValueOnSuccess = false
  4268. } else {
  4269. yyv41 := &x.NoValueOnSuccess
  4270. yym42 := z.DecBinary()
  4271. _ = yym42
  4272. if false {
  4273. } else {
  4274. *((*bool)(yyv41)) = r.DecodeBool()
  4275. }
  4276. }
  4277. for {
  4278. yyj23++
  4279. if yyhl23 {
  4280. yyb23 = yyj23 > l
  4281. } else {
  4282. yyb23 = r.CheckBreak()
  4283. }
  4284. if yyb23 {
  4285. break
  4286. }
  4287. r.ReadArrayElem()
  4288. z.DecStructFieldNotFound(yyj23-1, "")
  4289. }
  4290. r.ReadArrayEnd()
  4291. }
  4292. func (x *deleteAction) CodecEncodeSelf(e *codec1978.Encoder) {
  4293. var h codecSelfer7612
  4294. z, r := codec1978.GenHelperEncoder(e)
  4295. _, _, _ = h, z, r
  4296. if x == nil {
  4297. r.EncodeNil()
  4298. } else {
  4299. yym1 := z.EncBinary()
  4300. _ = yym1
  4301. if false {
  4302. } else if z.HasExtensions() && z.EncExt(x) {
  4303. } else {
  4304. yysep2 := !z.EncBinary()
  4305. yy2arr2 := z.EncBasicHandle().StructToArray
  4306. _, _ = yysep2, yy2arr2
  4307. const yyr2 bool = false
  4308. if yyr2 || yy2arr2 {
  4309. r.WriteArrayStart(6)
  4310. } else {
  4311. r.WriteMapStart(6)
  4312. }
  4313. if yyr2 || yy2arr2 {
  4314. r.WriteArrayElem()
  4315. yym4 := z.EncBinary()
  4316. _ = yym4
  4317. if false {
  4318. } else {
  4319. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  4320. }
  4321. } else {
  4322. r.WriteMapElemKey()
  4323. r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
  4324. r.WriteMapElemValue()
  4325. yym5 := z.EncBinary()
  4326. _ = yym5
  4327. if false {
  4328. } else {
  4329. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  4330. }
  4331. }
  4332. if yyr2 || yy2arr2 {
  4333. r.WriteArrayElem()
  4334. yym7 := z.EncBinary()
  4335. _ = yym7
  4336. if false {
  4337. } else {
  4338. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  4339. }
  4340. } else {
  4341. r.WriteMapElemKey()
  4342. r.EncodeString(codecSelferC_UTF87612, string("Key"))
  4343. r.WriteMapElemValue()
  4344. yym8 := z.EncBinary()
  4345. _ = yym8
  4346. if false {
  4347. } else {
  4348. r.EncodeString(codecSelferC_UTF87612, string(x.Key))
  4349. }
  4350. }
  4351. if yyr2 || yy2arr2 {
  4352. r.WriteArrayElem()
  4353. yym10 := z.EncBinary()
  4354. _ = yym10
  4355. if false {
  4356. } else {
  4357. r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
  4358. }
  4359. } else {
  4360. r.WriteMapElemKey()
  4361. r.EncodeString(codecSelferC_UTF87612, string("PrevValue"))
  4362. r.WriteMapElemValue()
  4363. yym11 := z.EncBinary()
  4364. _ = yym11
  4365. if false {
  4366. } else {
  4367. r.EncodeString(codecSelferC_UTF87612, string(x.PrevValue))
  4368. }
  4369. }
  4370. if yyr2 || yy2arr2 {
  4371. r.WriteArrayElem()
  4372. yym13 := z.EncBinary()
  4373. _ = yym13
  4374. if false {
  4375. } else {
  4376. r.EncodeUint(uint64(x.PrevIndex))
  4377. }
  4378. } else {
  4379. r.WriteMapElemKey()
  4380. r.EncodeString(codecSelferC_UTF87612, string("PrevIndex"))
  4381. r.WriteMapElemValue()
  4382. yym14 := z.EncBinary()
  4383. _ = yym14
  4384. if false {
  4385. } else {
  4386. r.EncodeUint(uint64(x.PrevIndex))
  4387. }
  4388. }
  4389. if yyr2 || yy2arr2 {
  4390. r.WriteArrayElem()
  4391. yym16 := z.EncBinary()
  4392. _ = yym16
  4393. if false {
  4394. } else {
  4395. r.EncodeBool(bool(x.Dir))
  4396. }
  4397. } else {
  4398. r.WriteMapElemKey()
  4399. r.EncodeString(codecSelferC_UTF87612, string("Dir"))
  4400. r.WriteMapElemValue()
  4401. yym17 := z.EncBinary()
  4402. _ = yym17
  4403. if false {
  4404. } else {
  4405. r.EncodeBool(bool(x.Dir))
  4406. }
  4407. }
  4408. if yyr2 || yy2arr2 {
  4409. r.WriteArrayElem()
  4410. yym19 := z.EncBinary()
  4411. _ = yym19
  4412. if false {
  4413. } else {
  4414. r.EncodeBool(bool(x.Recursive))
  4415. }
  4416. } else {
  4417. r.WriteMapElemKey()
  4418. r.EncodeString(codecSelferC_UTF87612, string("Recursive"))
  4419. r.WriteMapElemValue()
  4420. yym20 := z.EncBinary()
  4421. _ = yym20
  4422. if false {
  4423. } else {
  4424. r.EncodeBool(bool(x.Recursive))
  4425. }
  4426. }
  4427. if yyr2 || yy2arr2 {
  4428. r.WriteArrayEnd()
  4429. } else {
  4430. r.WriteMapEnd()
  4431. }
  4432. }
  4433. }
  4434. }
  4435. func (x *deleteAction) CodecDecodeSelf(d *codec1978.Decoder) {
  4436. var h codecSelfer7612
  4437. z, r := codec1978.GenHelperDecoder(d)
  4438. _, _, _ = h, z, r
  4439. yym1 := z.DecBinary()
  4440. _ = yym1
  4441. if false {
  4442. } else if z.HasExtensions() && z.DecExt(x) {
  4443. } else {
  4444. yyct2 := r.ContainerType()
  4445. if yyct2 == codecSelferValueTypeMap7612 {
  4446. yyl2 := r.ReadMapStart()
  4447. if yyl2 == 0 {
  4448. r.ReadMapEnd()
  4449. } else {
  4450. x.codecDecodeSelfFromMap(yyl2, d)
  4451. }
  4452. } else if yyct2 == codecSelferValueTypeArray7612 {
  4453. yyl2 := r.ReadArrayStart()
  4454. if yyl2 == 0 {
  4455. r.ReadArrayEnd()
  4456. } else {
  4457. x.codecDecodeSelfFromArray(yyl2, d)
  4458. }
  4459. } else {
  4460. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  4461. }
  4462. }
  4463. }
  4464. func (x *deleteAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  4465. var h codecSelfer7612
  4466. z, r := codec1978.GenHelperDecoder(d)
  4467. _, _, _ = h, z, r
  4468. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  4469. _ = yys3Slc
  4470. var yyhl3 bool = l >= 0
  4471. for yyj3 := 0; ; yyj3++ {
  4472. if yyhl3 {
  4473. if yyj3 >= l {
  4474. break
  4475. }
  4476. } else {
  4477. if r.CheckBreak() {
  4478. break
  4479. }
  4480. }
  4481. r.ReadMapElemKey()
  4482. yys3Slc = r.DecodeStringAsBytes()
  4483. yys3 := string(yys3Slc)
  4484. r.ReadMapElemValue()
  4485. switch yys3 {
  4486. case "Prefix":
  4487. if r.TryDecodeAsNil() {
  4488. x.Prefix = ""
  4489. } else {
  4490. yyv4 := &x.Prefix
  4491. yym5 := z.DecBinary()
  4492. _ = yym5
  4493. if false {
  4494. } else {
  4495. *((*string)(yyv4)) = r.DecodeString()
  4496. }
  4497. }
  4498. case "Key":
  4499. if r.TryDecodeAsNil() {
  4500. x.Key = ""
  4501. } else {
  4502. yyv6 := &x.Key
  4503. yym7 := z.DecBinary()
  4504. _ = yym7
  4505. if false {
  4506. } else {
  4507. *((*string)(yyv6)) = r.DecodeString()
  4508. }
  4509. }
  4510. case "PrevValue":
  4511. if r.TryDecodeAsNil() {
  4512. x.PrevValue = ""
  4513. } else {
  4514. yyv8 := &x.PrevValue
  4515. yym9 := z.DecBinary()
  4516. _ = yym9
  4517. if false {
  4518. } else {
  4519. *((*string)(yyv8)) = r.DecodeString()
  4520. }
  4521. }
  4522. case "PrevIndex":
  4523. if r.TryDecodeAsNil() {
  4524. x.PrevIndex = 0
  4525. } else {
  4526. yyv10 := &x.PrevIndex
  4527. yym11 := z.DecBinary()
  4528. _ = yym11
  4529. if false {
  4530. } else {
  4531. *((*uint64)(yyv10)) = uint64(r.DecodeUint(64))
  4532. }
  4533. }
  4534. case "Dir":
  4535. if r.TryDecodeAsNil() {
  4536. x.Dir = false
  4537. } else {
  4538. yyv12 := &x.Dir
  4539. yym13 := z.DecBinary()
  4540. _ = yym13
  4541. if false {
  4542. } else {
  4543. *((*bool)(yyv12)) = r.DecodeBool()
  4544. }
  4545. }
  4546. case "Recursive":
  4547. if r.TryDecodeAsNil() {
  4548. x.Recursive = false
  4549. } else {
  4550. yyv14 := &x.Recursive
  4551. yym15 := z.DecBinary()
  4552. _ = yym15
  4553. if false {
  4554. } else {
  4555. *((*bool)(yyv14)) = r.DecodeBool()
  4556. }
  4557. }
  4558. default:
  4559. z.DecStructFieldNotFound(-1, yys3)
  4560. } // end switch yys3
  4561. } // end for yyj3
  4562. r.ReadMapEnd()
  4563. }
  4564. func (x *deleteAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  4565. var h codecSelfer7612
  4566. z, r := codec1978.GenHelperDecoder(d)
  4567. _, _, _ = h, z, r
  4568. var yyj16 int
  4569. var yyb16 bool
  4570. var yyhl16 bool = l >= 0
  4571. yyj16++
  4572. if yyhl16 {
  4573. yyb16 = yyj16 > l
  4574. } else {
  4575. yyb16 = r.CheckBreak()
  4576. }
  4577. if yyb16 {
  4578. r.ReadArrayEnd()
  4579. return
  4580. }
  4581. r.ReadArrayElem()
  4582. if r.TryDecodeAsNil() {
  4583. x.Prefix = ""
  4584. } else {
  4585. yyv17 := &x.Prefix
  4586. yym18 := z.DecBinary()
  4587. _ = yym18
  4588. if false {
  4589. } else {
  4590. *((*string)(yyv17)) = r.DecodeString()
  4591. }
  4592. }
  4593. yyj16++
  4594. if yyhl16 {
  4595. yyb16 = yyj16 > l
  4596. } else {
  4597. yyb16 = r.CheckBreak()
  4598. }
  4599. if yyb16 {
  4600. r.ReadArrayEnd()
  4601. return
  4602. }
  4603. r.ReadArrayElem()
  4604. if r.TryDecodeAsNil() {
  4605. x.Key = ""
  4606. } else {
  4607. yyv19 := &x.Key
  4608. yym20 := z.DecBinary()
  4609. _ = yym20
  4610. if false {
  4611. } else {
  4612. *((*string)(yyv19)) = r.DecodeString()
  4613. }
  4614. }
  4615. yyj16++
  4616. if yyhl16 {
  4617. yyb16 = yyj16 > l
  4618. } else {
  4619. yyb16 = r.CheckBreak()
  4620. }
  4621. if yyb16 {
  4622. r.ReadArrayEnd()
  4623. return
  4624. }
  4625. r.ReadArrayElem()
  4626. if r.TryDecodeAsNil() {
  4627. x.PrevValue = ""
  4628. } else {
  4629. yyv21 := &x.PrevValue
  4630. yym22 := z.DecBinary()
  4631. _ = yym22
  4632. if false {
  4633. } else {
  4634. *((*string)(yyv21)) = r.DecodeString()
  4635. }
  4636. }
  4637. yyj16++
  4638. if yyhl16 {
  4639. yyb16 = yyj16 > l
  4640. } else {
  4641. yyb16 = r.CheckBreak()
  4642. }
  4643. if yyb16 {
  4644. r.ReadArrayEnd()
  4645. return
  4646. }
  4647. r.ReadArrayElem()
  4648. if r.TryDecodeAsNil() {
  4649. x.PrevIndex = 0
  4650. } else {
  4651. yyv23 := &x.PrevIndex
  4652. yym24 := z.DecBinary()
  4653. _ = yym24
  4654. if false {
  4655. } else {
  4656. *((*uint64)(yyv23)) = uint64(r.DecodeUint(64))
  4657. }
  4658. }
  4659. yyj16++
  4660. if yyhl16 {
  4661. yyb16 = yyj16 > l
  4662. } else {
  4663. yyb16 = r.CheckBreak()
  4664. }
  4665. if yyb16 {
  4666. r.ReadArrayEnd()
  4667. return
  4668. }
  4669. r.ReadArrayElem()
  4670. if r.TryDecodeAsNil() {
  4671. x.Dir = false
  4672. } else {
  4673. yyv25 := &x.Dir
  4674. yym26 := z.DecBinary()
  4675. _ = yym26
  4676. if false {
  4677. } else {
  4678. *((*bool)(yyv25)) = r.DecodeBool()
  4679. }
  4680. }
  4681. yyj16++
  4682. if yyhl16 {
  4683. yyb16 = yyj16 > l
  4684. } else {
  4685. yyb16 = r.CheckBreak()
  4686. }
  4687. if yyb16 {
  4688. r.ReadArrayEnd()
  4689. return
  4690. }
  4691. r.ReadArrayElem()
  4692. if r.TryDecodeAsNil() {
  4693. x.Recursive = false
  4694. } else {
  4695. yyv27 := &x.Recursive
  4696. yym28 := z.DecBinary()
  4697. _ = yym28
  4698. if false {
  4699. } else {
  4700. *((*bool)(yyv27)) = r.DecodeBool()
  4701. }
  4702. }
  4703. for {
  4704. yyj16++
  4705. if yyhl16 {
  4706. yyb16 = yyj16 > l
  4707. } else {
  4708. yyb16 = r.CheckBreak()
  4709. }
  4710. if yyb16 {
  4711. break
  4712. }
  4713. r.ReadArrayElem()
  4714. z.DecStructFieldNotFound(yyj16-1, "")
  4715. }
  4716. r.ReadArrayEnd()
  4717. }
  4718. func (x *createInOrderAction) CodecEncodeSelf(e *codec1978.Encoder) {
  4719. var h codecSelfer7612
  4720. z, r := codec1978.GenHelperEncoder(e)
  4721. _, _, _ = h, z, r
  4722. if x == nil {
  4723. r.EncodeNil()
  4724. } else {
  4725. yym1 := z.EncBinary()
  4726. _ = yym1
  4727. if false {
  4728. } else if z.HasExtensions() && z.EncExt(x) {
  4729. } else {
  4730. yysep2 := !z.EncBinary()
  4731. yy2arr2 := z.EncBasicHandle().StructToArray
  4732. _, _ = yysep2, yy2arr2
  4733. const yyr2 bool = false
  4734. if yyr2 || yy2arr2 {
  4735. r.WriteArrayStart(4)
  4736. } else {
  4737. r.WriteMapStart(4)
  4738. }
  4739. if yyr2 || yy2arr2 {
  4740. r.WriteArrayElem()
  4741. yym4 := z.EncBinary()
  4742. _ = yym4
  4743. if false {
  4744. } else {
  4745. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  4746. }
  4747. } else {
  4748. r.WriteMapElemKey()
  4749. r.EncodeString(codecSelferC_UTF87612, string("Prefix"))
  4750. r.WriteMapElemValue()
  4751. yym5 := z.EncBinary()
  4752. _ = yym5
  4753. if false {
  4754. } else {
  4755. r.EncodeString(codecSelferC_UTF87612, string(x.Prefix))
  4756. }
  4757. }
  4758. if yyr2 || yy2arr2 {
  4759. r.WriteArrayElem()
  4760. yym7 := z.EncBinary()
  4761. _ = yym7
  4762. if false {
  4763. } else {
  4764. r.EncodeString(codecSelferC_UTF87612, string(x.Dir))
  4765. }
  4766. } else {
  4767. r.WriteMapElemKey()
  4768. r.EncodeString(codecSelferC_UTF87612, string("Dir"))
  4769. r.WriteMapElemValue()
  4770. yym8 := z.EncBinary()
  4771. _ = yym8
  4772. if false {
  4773. } else {
  4774. r.EncodeString(codecSelferC_UTF87612, string(x.Dir))
  4775. }
  4776. }
  4777. if yyr2 || yy2arr2 {
  4778. r.WriteArrayElem()
  4779. yym10 := z.EncBinary()
  4780. _ = yym10
  4781. if false {
  4782. } else {
  4783. r.EncodeString(codecSelferC_UTF87612, string(x.Value))
  4784. }
  4785. } else {
  4786. r.WriteMapElemKey()
  4787. r.EncodeString(codecSelferC_UTF87612, string("Value"))
  4788. r.WriteMapElemValue()
  4789. yym11 := z.EncBinary()
  4790. _ = yym11
  4791. if false {
  4792. } else {
  4793. r.EncodeString(codecSelferC_UTF87612, string(x.Value))
  4794. }
  4795. }
  4796. if yyr2 || yy2arr2 {
  4797. r.WriteArrayElem()
  4798. yym13 := z.EncBinary()
  4799. _ = yym13
  4800. if false {
  4801. } else if z.HasExtensions() && z.EncExt(x.TTL) {
  4802. } else {
  4803. r.EncodeInt(int64(x.TTL))
  4804. }
  4805. } else {
  4806. r.WriteMapElemKey()
  4807. r.EncodeString(codecSelferC_UTF87612, string("TTL"))
  4808. r.WriteMapElemValue()
  4809. yym14 := z.EncBinary()
  4810. _ = yym14
  4811. if false {
  4812. } else if z.HasExtensions() && z.EncExt(x.TTL) {
  4813. } else {
  4814. r.EncodeInt(int64(x.TTL))
  4815. }
  4816. }
  4817. if yyr2 || yy2arr2 {
  4818. r.WriteArrayEnd()
  4819. } else {
  4820. r.WriteMapEnd()
  4821. }
  4822. }
  4823. }
  4824. }
  4825. func (x *createInOrderAction) CodecDecodeSelf(d *codec1978.Decoder) {
  4826. var h codecSelfer7612
  4827. z, r := codec1978.GenHelperDecoder(d)
  4828. _, _, _ = h, z, r
  4829. yym1 := z.DecBinary()
  4830. _ = yym1
  4831. if false {
  4832. } else if z.HasExtensions() && z.DecExt(x) {
  4833. } else {
  4834. yyct2 := r.ContainerType()
  4835. if yyct2 == codecSelferValueTypeMap7612 {
  4836. yyl2 := r.ReadMapStart()
  4837. if yyl2 == 0 {
  4838. r.ReadMapEnd()
  4839. } else {
  4840. x.codecDecodeSelfFromMap(yyl2, d)
  4841. }
  4842. } else if yyct2 == codecSelferValueTypeArray7612 {
  4843. yyl2 := r.ReadArrayStart()
  4844. if yyl2 == 0 {
  4845. r.ReadArrayEnd()
  4846. } else {
  4847. x.codecDecodeSelfFromArray(yyl2, d)
  4848. }
  4849. } else {
  4850. panic(codecSelferOnlyMapOrArrayEncodeToStructErr7612)
  4851. }
  4852. }
  4853. }
  4854. func (x *createInOrderAction) codecDecodeSelfFromMap(l int, d *codec1978.Decoder) {
  4855. var h codecSelfer7612
  4856. z, r := codec1978.GenHelperDecoder(d)
  4857. _, _, _ = h, z, r
  4858. var yys3Slc = z.DecScratchBuffer() // default slice to decode into
  4859. _ = yys3Slc
  4860. var yyhl3 bool = l >= 0
  4861. for yyj3 := 0; ; yyj3++ {
  4862. if yyhl3 {
  4863. if yyj3 >= l {
  4864. break
  4865. }
  4866. } else {
  4867. if r.CheckBreak() {
  4868. break
  4869. }
  4870. }
  4871. r.ReadMapElemKey()
  4872. yys3Slc = r.DecodeStringAsBytes()
  4873. yys3 := string(yys3Slc)
  4874. r.ReadMapElemValue()
  4875. switch yys3 {
  4876. case "Prefix":
  4877. if r.TryDecodeAsNil() {
  4878. x.Prefix = ""
  4879. } else {
  4880. yyv4 := &x.Prefix
  4881. yym5 := z.DecBinary()
  4882. _ = yym5
  4883. if false {
  4884. } else {
  4885. *((*string)(yyv4)) = r.DecodeString()
  4886. }
  4887. }
  4888. case "Dir":
  4889. if r.TryDecodeAsNil() {
  4890. x.Dir = ""
  4891. } else {
  4892. yyv6 := &x.Dir
  4893. yym7 := z.DecBinary()
  4894. _ = yym7
  4895. if false {
  4896. } else {
  4897. *((*string)(yyv6)) = r.DecodeString()
  4898. }
  4899. }
  4900. case "Value":
  4901. if r.TryDecodeAsNil() {
  4902. x.Value = ""
  4903. } else {
  4904. yyv8 := &x.Value
  4905. yym9 := z.DecBinary()
  4906. _ = yym9
  4907. if false {
  4908. } else {
  4909. *((*string)(yyv8)) = r.DecodeString()
  4910. }
  4911. }
  4912. case "TTL":
  4913. if r.TryDecodeAsNil() {
  4914. x.TTL = 0
  4915. } else {
  4916. yyv10 := &x.TTL
  4917. yym11 := z.DecBinary()
  4918. _ = yym11
  4919. if false {
  4920. } else if z.HasExtensions() && z.DecExt(yyv10) {
  4921. } else {
  4922. *((*int64)(yyv10)) = int64(r.DecodeInt(64))
  4923. }
  4924. }
  4925. default:
  4926. z.DecStructFieldNotFound(-1, yys3)
  4927. } // end switch yys3
  4928. } // end for yyj3
  4929. r.ReadMapEnd()
  4930. }
  4931. func (x *createInOrderAction) codecDecodeSelfFromArray(l int, d *codec1978.Decoder) {
  4932. var h codecSelfer7612
  4933. z, r := codec1978.GenHelperDecoder(d)
  4934. _, _, _ = h, z, r
  4935. var yyj12 int
  4936. var yyb12 bool
  4937. var yyhl12 bool = l >= 0
  4938. yyj12++
  4939. if yyhl12 {
  4940. yyb12 = yyj12 > l
  4941. } else {
  4942. yyb12 = r.CheckBreak()
  4943. }
  4944. if yyb12 {
  4945. r.ReadArrayEnd()
  4946. return
  4947. }
  4948. r.ReadArrayElem()
  4949. if r.TryDecodeAsNil() {
  4950. x.Prefix = ""
  4951. } else {
  4952. yyv13 := &x.Prefix
  4953. yym14 := z.DecBinary()
  4954. _ = yym14
  4955. if false {
  4956. } else {
  4957. *((*string)(yyv13)) = r.DecodeString()
  4958. }
  4959. }
  4960. yyj12++
  4961. if yyhl12 {
  4962. yyb12 = yyj12 > l
  4963. } else {
  4964. yyb12 = r.CheckBreak()
  4965. }
  4966. if yyb12 {
  4967. r.ReadArrayEnd()
  4968. return
  4969. }
  4970. r.ReadArrayElem()
  4971. if r.TryDecodeAsNil() {
  4972. x.Dir = ""
  4973. } else {
  4974. yyv15 := &x.Dir
  4975. yym16 := z.DecBinary()
  4976. _ = yym16
  4977. if false {
  4978. } else {
  4979. *((*string)(yyv15)) = r.DecodeString()
  4980. }
  4981. }
  4982. yyj12++
  4983. if yyhl12 {
  4984. yyb12 = yyj12 > l
  4985. } else {
  4986. yyb12 = r.CheckBreak()
  4987. }
  4988. if yyb12 {
  4989. r.ReadArrayEnd()
  4990. return
  4991. }
  4992. r.ReadArrayElem()
  4993. if r.TryDecodeAsNil() {
  4994. x.Value = ""
  4995. } else {
  4996. yyv17 := &x.Value
  4997. yym18 := z.DecBinary()
  4998. _ = yym18
  4999. if false {
  5000. } else {
  5001. *((*string)(yyv17)) = r.DecodeString()
  5002. }
  5003. }
  5004. yyj12++
  5005. if yyhl12 {
  5006. yyb12 = yyj12 > l
  5007. } else {
  5008. yyb12 = r.CheckBreak()
  5009. }
  5010. if yyb12 {
  5011. r.ReadArrayEnd()
  5012. return
  5013. }
  5014. r.ReadArrayElem()
  5015. if r.TryDecodeAsNil() {
  5016. x.TTL = 0
  5017. } else {
  5018. yyv19 := &x.TTL
  5019. yym20 := z.DecBinary()
  5020. _ = yym20
  5021. if false {
  5022. } else if z.HasExtensions() && z.DecExt(yyv19) {
  5023. } else {
  5024. *((*int64)(yyv19)) = int64(r.DecodeInt(64))
  5025. }
  5026. }
  5027. for {
  5028. yyj12++
  5029. if yyhl12 {
  5030. yyb12 = yyj12 > l
  5031. } else {
  5032. yyb12 = r.CheckBreak()
  5033. }
  5034. if yyb12 {
  5035. break
  5036. }
  5037. r.ReadArrayElem()
  5038. z.DecStructFieldNotFound(yyj12-1, "")
  5039. }
  5040. r.ReadArrayEnd()
  5041. }
  5042. func (x codecSelfer7612) encNodes(v Nodes, e *codec1978.Encoder) {
  5043. var h codecSelfer7612
  5044. z, r := codec1978.GenHelperEncoder(e)
  5045. _, _, _ = h, z, r
  5046. r.WriteArrayStart(len(v))
  5047. for _, yyv1 := range v {
  5048. r.WriteArrayElem()
  5049. if yyv1 == nil {
  5050. r.EncodeNil()
  5051. } else {
  5052. yyv1.CodecEncodeSelf(e)
  5053. }
  5054. }
  5055. r.WriteArrayEnd()
  5056. }
  5057. func (x codecSelfer7612) decNodes(v *Nodes, d *codec1978.Decoder) {
  5058. var h codecSelfer7612
  5059. z, r := codec1978.GenHelperDecoder(d)
  5060. _, _, _ = h, z, r
  5061. yyv1 := *v
  5062. yyh1, yyl1 := z.DecSliceHelperStart()
  5063. var yyc1 bool
  5064. _ = yyc1
  5065. if yyl1 == 0 {
  5066. if yyv1 == nil {
  5067. yyv1 = []*Node{}
  5068. yyc1 = true
  5069. } else if len(yyv1) != 0 {
  5070. yyv1 = yyv1[:0]
  5071. yyc1 = true
  5072. }
  5073. } else {
  5074. yyhl1 := yyl1 > 0
  5075. var yyrl1 int
  5076. _ = yyrl1
  5077. if yyhl1 {
  5078. if yyl1 > cap(yyv1) {
  5079. yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8)
  5080. if yyrl1 <= cap(yyv1) {
  5081. yyv1 = yyv1[:yyrl1]
  5082. } else {
  5083. yyv1 = make([]*Node, yyrl1)
  5084. }
  5085. yyc1 = true
  5086. } else if yyl1 != len(yyv1) {
  5087. yyv1 = yyv1[:yyl1]
  5088. yyc1 = true
  5089. }
  5090. }
  5091. var yyj1 int
  5092. // var yydn1 bool
  5093. for ; (yyhl1 && yyj1 < yyl1) || !(yyhl1 || r.CheckBreak()); yyj1++ {
  5094. if yyj1 == 0 && len(yyv1) == 0 {
  5095. if yyhl1 {
  5096. yyrl1 = z.DecInferLen(yyl1, z.DecBasicHandle().MaxInitLen, 8)
  5097. } else {
  5098. yyrl1 = 8
  5099. }
  5100. yyv1 = make([]*Node, yyrl1)
  5101. yyc1 = true
  5102. }
  5103. yyh1.ElemContainerState(yyj1)
  5104. // yydn1 = r.TryDecodeAsNil()
  5105. // if indefinite, etc, then expand the slice if necessary
  5106. var yydb1 bool
  5107. if yyj1 >= len(yyv1) {
  5108. yyv1 = append(yyv1, nil)
  5109. yyc1 = true
  5110. }
  5111. if yydb1 {
  5112. z.DecSwallow()
  5113. } else {
  5114. if r.TryDecodeAsNil() {
  5115. if yyv1[yyj1] != nil {
  5116. *yyv1[yyj1] = Node{}
  5117. }
  5118. } else {
  5119. if yyv1[yyj1] == nil {
  5120. yyv1[yyj1] = new(Node)
  5121. }
  5122. yyw2 := yyv1[yyj1]
  5123. yyw2.CodecDecodeSelf(d)
  5124. }
  5125. }
  5126. }
  5127. if yyj1 < len(yyv1) {
  5128. yyv1 = yyv1[:yyj1]
  5129. yyc1 = true
  5130. } else if yyj1 == 0 && yyv1 == nil {
  5131. yyv1 = make([]*Node, 0)
  5132. yyc1 = true
  5133. }
  5134. }
  5135. yyh1.End()
  5136. if yyc1 {
  5137. *v = yyv1
  5138. }
  5139. }