keys.generated.go 88 KB

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