easyjson.go 52 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package indexeddb
  3. import (
  4. json "encoding/json"
  5. runtime "github.com/chromedp/cdproto/runtime"
  6. storage "github.com/chromedp/cdproto/storage"
  7. easyjson "github.com/mailru/easyjson"
  8. jlexer "github.com/mailru/easyjson/jlexer"
  9. jwriter "github.com/mailru/easyjson/jwriter"
  10. )
  11. // suppress unused package warning
  12. var (
  13. _ *json.RawMessage
  14. _ *jlexer.Lexer
  15. _ *jwriter.Writer
  16. _ easyjson.Marshaler
  17. )
  18. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb(in *jlexer.Lexer, out *RequestDatabaseReturns) {
  19. isTopLevel := in.IsStart()
  20. if in.IsNull() {
  21. if isTopLevel {
  22. in.Consumed()
  23. }
  24. in.Skip()
  25. return
  26. }
  27. in.Delim('{')
  28. for !in.IsDelim('}') {
  29. key := in.UnsafeFieldName(false)
  30. in.WantColon()
  31. if in.IsNull() {
  32. in.Skip()
  33. in.WantComma()
  34. continue
  35. }
  36. switch key {
  37. case "databaseWithObjectStores":
  38. if in.IsNull() {
  39. in.Skip()
  40. out.DatabaseWithObjectStores = nil
  41. } else {
  42. if out.DatabaseWithObjectStores == nil {
  43. out.DatabaseWithObjectStores = new(DatabaseWithObjectStores)
  44. }
  45. (*out.DatabaseWithObjectStores).UnmarshalEasyJSON(in)
  46. }
  47. default:
  48. in.SkipRecursive()
  49. }
  50. in.WantComma()
  51. }
  52. in.Delim('}')
  53. if isTopLevel {
  54. in.Consumed()
  55. }
  56. }
  57. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb(out *jwriter.Writer, in RequestDatabaseReturns) {
  58. out.RawByte('{')
  59. first := true
  60. _ = first
  61. if in.DatabaseWithObjectStores != nil {
  62. const prefix string = ",\"databaseWithObjectStores\":"
  63. first = false
  64. out.RawString(prefix[1:])
  65. (*in.DatabaseWithObjectStores).MarshalEasyJSON(out)
  66. }
  67. out.RawByte('}')
  68. }
  69. // MarshalJSON supports json.Marshaler interface
  70. func (v RequestDatabaseReturns) MarshalJSON() ([]byte, error) {
  71. w := jwriter.Writer{}
  72. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb(&w, v)
  73. return w.Buffer.BuildBytes(), w.Error
  74. }
  75. // MarshalEasyJSON supports easyjson.Marshaler interface
  76. func (v RequestDatabaseReturns) MarshalEasyJSON(w *jwriter.Writer) {
  77. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb(w, v)
  78. }
  79. // UnmarshalJSON supports json.Unmarshaler interface
  80. func (v *RequestDatabaseReturns) UnmarshalJSON(data []byte) error {
  81. r := jlexer.Lexer{Data: data}
  82. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb(&r, v)
  83. return r.Error()
  84. }
  85. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  86. func (v *RequestDatabaseReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  87. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb(l, v)
  88. }
  89. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb1(in *jlexer.Lexer, out *RequestDatabaseParams) {
  90. isTopLevel := in.IsStart()
  91. if in.IsNull() {
  92. if isTopLevel {
  93. in.Consumed()
  94. }
  95. in.Skip()
  96. return
  97. }
  98. in.Delim('{')
  99. for !in.IsDelim('}') {
  100. key := in.UnsafeFieldName(false)
  101. in.WantColon()
  102. if in.IsNull() {
  103. in.Skip()
  104. in.WantComma()
  105. continue
  106. }
  107. switch key {
  108. case "securityOrigin":
  109. out.SecurityOrigin = string(in.String())
  110. case "storageKey":
  111. out.StorageKey = string(in.String())
  112. case "storageBucket":
  113. if in.IsNull() {
  114. in.Skip()
  115. out.StorageBucket = nil
  116. } else {
  117. if out.StorageBucket == nil {
  118. out.StorageBucket = new(storage.Bucket)
  119. }
  120. (*out.StorageBucket).UnmarshalEasyJSON(in)
  121. }
  122. case "databaseName":
  123. out.DatabaseName = string(in.String())
  124. default:
  125. in.SkipRecursive()
  126. }
  127. in.WantComma()
  128. }
  129. in.Delim('}')
  130. if isTopLevel {
  131. in.Consumed()
  132. }
  133. }
  134. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb1(out *jwriter.Writer, in RequestDatabaseParams) {
  135. out.RawByte('{')
  136. first := true
  137. _ = first
  138. if in.SecurityOrigin != "" {
  139. const prefix string = ",\"securityOrigin\":"
  140. first = false
  141. out.RawString(prefix[1:])
  142. out.String(string(in.SecurityOrigin))
  143. }
  144. if in.StorageKey != "" {
  145. const prefix string = ",\"storageKey\":"
  146. if first {
  147. first = false
  148. out.RawString(prefix[1:])
  149. } else {
  150. out.RawString(prefix)
  151. }
  152. out.String(string(in.StorageKey))
  153. }
  154. if in.StorageBucket != nil {
  155. const prefix string = ",\"storageBucket\":"
  156. if first {
  157. first = false
  158. out.RawString(prefix[1:])
  159. } else {
  160. out.RawString(prefix)
  161. }
  162. (*in.StorageBucket).MarshalEasyJSON(out)
  163. }
  164. {
  165. const prefix string = ",\"databaseName\":"
  166. if first {
  167. first = false
  168. out.RawString(prefix[1:])
  169. } else {
  170. out.RawString(prefix)
  171. }
  172. out.String(string(in.DatabaseName))
  173. }
  174. out.RawByte('}')
  175. }
  176. // MarshalJSON supports json.Marshaler interface
  177. func (v RequestDatabaseParams) MarshalJSON() ([]byte, error) {
  178. w := jwriter.Writer{}
  179. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb1(&w, v)
  180. return w.Buffer.BuildBytes(), w.Error
  181. }
  182. // MarshalEasyJSON supports easyjson.Marshaler interface
  183. func (v RequestDatabaseParams) MarshalEasyJSON(w *jwriter.Writer) {
  184. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb1(w, v)
  185. }
  186. // UnmarshalJSON supports json.Unmarshaler interface
  187. func (v *RequestDatabaseParams) UnmarshalJSON(data []byte) error {
  188. r := jlexer.Lexer{Data: data}
  189. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb1(&r, v)
  190. return r.Error()
  191. }
  192. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  193. func (v *RequestDatabaseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  194. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb1(l, v)
  195. }
  196. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb2(in *jlexer.Lexer, out *RequestDatabaseNamesReturns) {
  197. isTopLevel := in.IsStart()
  198. if in.IsNull() {
  199. if isTopLevel {
  200. in.Consumed()
  201. }
  202. in.Skip()
  203. return
  204. }
  205. in.Delim('{')
  206. for !in.IsDelim('}') {
  207. key := in.UnsafeFieldName(false)
  208. in.WantColon()
  209. if in.IsNull() {
  210. in.Skip()
  211. in.WantComma()
  212. continue
  213. }
  214. switch key {
  215. case "databaseNames":
  216. if in.IsNull() {
  217. in.Skip()
  218. out.DatabaseNames = nil
  219. } else {
  220. in.Delim('[')
  221. if out.DatabaseNames == nil {
  222. if !in.IsDelim(']') {
  223. out.DatabaseNames = make([]string, 0, 4)
  224. } else {
  225. out.DatabaseNames = []string{}
  226. }
  227. } else {
  228. out.DatabaseNames = (out.DatabaseNames)[:0]
  229. }
  230. for !in.IsDelim(']') {
  231. var v1 string
  232. v1 = string(in.String())
  233. out.DatabaseNames = append(out.DatabaseNames, v1)
  234. in.WantComma()
  235. }
  236. in.Delim(']')
  237. }
  238. default:
  239. in.SkipRecursive()
  240. }
  241. in.WantComma()
  242. }
  243. in.Delim('}')
  244. if isTopLevel {
  245. in.Consumed()
  246. }
  247. }
  248. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb2(out *jwriter.Writer, in RequestDatabaseNamesReturns) {
  249. out.RawByte('{')
  250. first := true
  251. _ = first
  252. if len(in.DatabaseNames) != 0 {
  253. const prefix string = ",\"databaseNames\":"
  254. first = false
  255. out.RawString(prefix[1:])
  256. {
  257. out.RawByte('[')
  258. for v2, v3 := range in.DatabaseNames {
  259. if v2 > 0 {
  260. out.RawByte(',')
  261. }
  262. out.String(string(v3))
  263. }
  264. out.RawByte(']')
  265. }
  266. }
  267. out.RawByte('}')
  268. }
  269. // MarshalJSON supports json.Marshaler interface
  270. func (v RequestDatabaseNamesReturns) MarshalJSON() ([]byte, error) {
  271. w := jwriter.Writer{}
  272. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb2(&w, v)
  273. return w.Buffer.BuildBytes(), w.Error
  274. }
  275. // MarshalEasyJSON supports easyjson.Marshaler interface
  276. func (v RequestDatabaseNamesReturns) MarshalEasyJSON(w *jwriter.Writer) {
  277. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb2(w, v)
  278. }
  279. // UnmarshalJSON supports json.Unmarshaler interface
  280. func (v *RequestDatabaseNamesReturns) UnmarshalJSON(data []byte) error {
  281. r := jlexer.Lexer{Data: data}
  282. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb2(&r, v)
  283. return r.Error()
  284. }
  285. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  286. func (v *RequestDatabaseNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  287. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb2(l, v)
  288. }
  289. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb3(in *jlexer.Lexer, out *RequestDatabaseNamesParams) {
  290. isTopLevel := in.IsStart()
  291. if in.IsNull() {
  292. if isTopLevel {
  293. in.Consumed()
  294. }
  295. in.Skip()
  296. return
  297. }
  298. in.Delim('{')
  299. for !in.IsDelim('}') {
  300. key := in.UnsafeFieldName(false)
  301. in.WantColon()
  302. if in.IsNull() {
  303. in.Skip()
  304. in.WantComma()
  305. continue
  306. }
  307. switch key {
  308. case "securityOrigin":
  309. out.SecurityOrigin = string(in.String())
  310. case "storageKey":
  311. out.StorageKey = string(in.String())
  312. case "storageBucket":
  313. if in.IsNull() {
  314. in.Skip()
  315. out.StorageBucket = nil
  316. } else {
  317. if out.StorageBucket == nil {
  318. out.StorageBucket = new(storage.Bucket)
  319. }
  320. (*out.StorageBucket).UnmarshalEasyJSON(in)
  321. }
  322. default:
  323. in.SkipRecursive()
  324. }
  325. in.WantComma()
  326. }
  327. in.Delim('}')
  328. if isTopLevel {
  329. in.Consumed()
  330. }
  331. }
  332. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb3(out *jwriter.Writer, in RequestDatabaseNamesParams) {
  333. out.RawByte('{')
  334. first := true
  335. _ = first
  336. if in.SecurityOrigin != "" {
  337. const prefix string = ",\"securityOrigin\":"
  338. first = false
  339. out.RawString(prefix[1:])
  340. out.String(string(in.SecurityOrigin))
  341. }
  342. if in.StorageKey != "" {
  343. const prefix string = ",\"storageKey\":"
  344. if first {
  345. first = false
  346. out.RawString(prefix[1:])
  347. } else {
  348. out.RawString(prefix)
  349. }
  350. out.String(string(in.StorageKey))
  351. }
  352. if in.StorageBucket != nil {
  353. const prefix string = ",\"storageBucket\":"
  354. if first {
  355. first = false
  356. out.RawString(prefix[1:])
  357. } else {
  358. out.RawString(prefix)
  359. }
  360. (*in.StorageBucket).MarshalEasyJSON(out)
  361. }
  362. out.RawByte('}')
  363. }
  364. // MarshalJSON supports json.Marshaler interface
  365. func (v RequestDatabaseNamesParams) MarshalJSON() ([]byte, error) {
  366. w := jwriter.Writer{}
  367. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb3(&w, v)
  368. return w.Buffer.BuildBytes(), w.Error
  369. }
  370. // MarshalEasyJSON supports easyjson.Marshaler interface
  371. func (v RequestDatabaseNamesParams) MarshalEasyJSON(w *jwriter.Writer) {
  372. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb3(w, v)
  373. }
  374. // UnmarshalJSON supports json.Unmarshaler interface
  375. func (v *RequestDatabaseNamesParams) UnmarshalJSON(data []byte) error {
  376. r := jlexer.Lexer{Data: data}
  377. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb3(&r, v)
  378. return r.Error()
  379. }
  380. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  381. func (v *RequestDatabaseNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  382. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb3(l, v)
  383. }
  384. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb4(in *jlexer.Lexer, out *RequestDataReturns) {
  385. isTopLevel := in.IsStart()
  386. if in.IsNull() {
  387. if isTopLevel {
  388. in.Consumed()
  389. }
  390. in.Skip()
  391. return
  392. }
  393. in.Delim('{')
  394. for !in.IsDelim('}') {
  395. key := in.UnsafeFieldName(false)
  396. in.WantColon()
  397. if in.IsNull() {
  398. in.Skip()
  399. in.WantComma()
  400. continue
  401. }
  402. switch key {
  403. case "objectStoreDataEntries":
  404. if in.IsNull() {
  405. in.Skip()
  406. out.ObjectStoreDataEntries = nil
  407. } else {
  408. in.Delim('[')
  409. if out.ObjectStoreDataEntries == nil {
  410. if !in.IsDelim(']') {
  411. out.ObjectStoreDataEntries = make([]*DataEntry, 0, 8)
  412. } else {
  413. out.ObjectStoreDataEntries = []*DataEntry{}
  414. }
  415. } else {
  416. out.ObjectStoreDataEntries = (out.ObjectStoreDataEntries)[:0]
  417. }
  418. for !in.IsDelim(']') {
  419. var v4 *DataEntry
  420. if in.IsNull() {
  421. in.Skip()
  422. v4 = nil
  423. } else {
  424. if v4 == nil {
  425. v4 = new(DataEntry)
  426. }
  427. (*v4).UnmarshalEasyJSON(in)
  428. }
  429. out.ObjectStoreDataEntries = append(out.ObjectStoreDataEntries, v4)
  430. in.WantComma()
  431. }
  432. in.Delim(']')
  433. }
  434. case "hasMore":
  435. out.HasMore = bool(in.Bool())
  436. default:
  437. in.SkipRecursive()
  438. }
  439. in.WantComma()
  440. }
  441. in.Delim('}')
  442. if isTopLevel {
  443. in.Consumed()
  444. }
  445. }
  446. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb4(out *jwriter.Writer, in RequestDataReturns) {
  447. out.RawByte('{')
  448. first := true
  449. _ = first
  450. if len(in.ObjectStoreDataEntries) != 0 {
  451. const prefix string = ",\"objectStoreDataEntries\":"
  452. first = false
  453. out.RawString(prefix[1:])
  454. {
  455. out.RawByte('[')
  456. for v5, v6 := range in.ObjectStoreDataEntries {
  457. if v5 > 0 {
  458. out.RawByte(',')
  459. }
  460. if v6 == nil {
  461. out.RawString("null")
  462. } else {
  463. (*v6).MarshalEasyJSON(out)
  464. }
  465. }
  466. out.RawByte(']')
  467. }
  468. }
  469. if in.HasMore {
  470. const prefix string = ",\"hasMore\":"
  471. if first {
  472. first = false
  473. out.RawString(prefix[1:])
  474. } else {
  475. out.RawString(prefix)
  476. }
  477. out.Bool(bool(in.HasMore))
  478. }
  479. out.RawByte('}')
  480. }
  481. // MarshalJSON supports json.Marshaler interface
  482. func (v RequestDataReturns) MarshalJSON() ([]byte, error) {
  483. w := jwriter.Writer{}
  484. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb4(&w, v)
  485. return w.Buffer.BuildBytes(), w.Error
  486. }
  487. // MarshalEasyJSON supports easyjson.Marshaler interface
  488. func (v RequestDataReturns) MarshalEasyJSON(w *jwriter.Writer) {
  489. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb4(w, v)
  490. }
  491. // UnmarshalJSON supports json.Unmarshaler interface
  492. func (v *RequestDataReturns) UnmarshalJSON(data []byte) error {
  493. r := jlexer.Lexer{Data: data}
  494. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb4(&r, v)
  495. return r.Error()
  496. }
  497. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  498. func (v *RequestDataReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  499. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb4(l, v)
  500. }
  501. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb5(in *jlexer.Lexer, out *RequestDataParams) {
  502. isTopLevel := in.IsStart()
  503. if in.IsNull() {
  504. if isTopLevel {
  505. in.Consumed()
  506. }
  507. in.Skip()
  508. return
  509. }
  510. in.Delim('{')
  511. for !in.IsDelim('}') {
  512. key := in.UnsafeFieldName(false)
  513. in.WantColon()
  514. if in.IsNull() {
  515. in.Skip()
  516. in.WantComma()
  517. continue
  518. }
  519. switch key {
  520. case "securityOrigin":
  521. out.SecurityOrigin = string(in.String())
  522. case "storageKey":
  523. out.StorageKey = string(in.String())
  524. case "storageBucket":
  525. if in.IsNull() {
  526. in.Skip()
  527. out.StorageBucket = nil
  528. } else {
  529. if out.StorageBucket == nil {
  530. out.StorageBucket = new(storage.Bucket)
  531. }
  532. (*out.StorageBucket).UnmarshalEasyJSON(in)
  533. }
  534. case "databaseName":
  535. out.DatabaseName = string(in.String())
  536. case "objectStoreName":
  537. out.ObjectStoreName = string(in.String())
  538. case "indexName":
  539. out.IndexName = string(in.String())
  540. case "skipCount":
  541. out.SkipCount = int64(in.Int64())
  542. case "pageSize":
  543. out.PageSize = int64(in.Int64())
  544. case "keyRange":
  545. if in.IsNull() {
  546. in.Skip()
  547. out.KeyRange = nil
  548. } else {
  549. if out.KeyRange == nil {
  550. out.KeyRange = new(KeyRange)
  551. }
  552. (*out.KeyRange).UnmarshalEasyJSON(in)
  553. }
  554. default:
  555. in.SkipRecursive()
  556. }
  557. in.WantComma()
  558. }
  559. in.Delim('}')
  560. if isTopLevel {
  561. in.Consumed()
  562. }
  563. }
  564. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb5(out *jwriter.Writer, in RequestDataParams) {
  565. out.RawByte('{')
  566. first := true
  567. _ = first
  568. if in.SecurityOrigin != "" {
  569. const prefix string = ",\"securityOrigin\":"
  570. first = false
  571. out.RawString(prefix[1:])
  572. out.String(string(in.SecurityOrigin))
  573. }
  574. if in.StorageKey != "" {
  575. const prefix string = ",\"storageKey\":"
  576. if first {
  577. first = false
  578. out.RawString(prefix[1:])
  579. } else {
  580. out.RawString(prefix)
  581. }
  582. out.String(string(in.StorageKey))
  583. }
  584. if in.StorageBucket != nil {
  585. const prefix string = ",\"storageBucket\":"
  586. if first {
  587. first = false
  588. out.RawString(prefix[1:])
  589. } else {
  590. out.RawString(prefix)
  591. }
  592. (*in.StorageBucket).MarshalEasyJSON(out)
  593. }
  594. {
  595. const prefix string = ",\"databaseName\":"
  596. if first {
  597. first = false
  598. out.RawString(prefix[1:])
  599. } else {
  600. out.RawString(prefix)
  601. }
  602. out.String(string(in.DatabaseName))
  603. }
  604. {
  605. const prefix string = ",\"objectStoreName\":"
  606. out.RawString(prefix)
  607. out.String(string(in.ObjectStoreName))
  608. }
  609. {
  610. const prefix string = ",\"indexName\":"
  611. out.RawString(prefix)
  612. out.String(string(in.IndexName))
  613. }
  614. {
  615. const prefix string = ",\"skipCount\":"
  616. out.RawString(prefix)
  617. out.Int64(int64(in.SkipCount))
  618. }
  619. {
  620. const prefix string = ",\"pageSize\":"
  621. out.RawString(prefix)
  622. out.Int64(int64(in.PageSize))
  623. }
  624. if in.KeyRange != nil {
  625. const prefix string = ",\"keyRange\":"
  626. out.RawString(prefix)
  627. (*in.KeyRange).MarshalEasyJSON(out)
  628. }
  629. out.RawByte('}')
  630. }
  631. // MarshalJSON supports json.Marshaler interface
  632. func (v RequestDataParams) MarshalJSON() ([]byte, error) {
  633. w := jwriter.Writer{}
  634. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb5(&w, v)
  635. return w.Buffer.BuildBytes(), w.Error
  636. }
  637. // MarshalEasyJSON supports easyjson.Marshaler interface
  638. func (v RequestDataParams) MarshalEasyJSON(w *jwriter.Writer) {
  639. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb5(w, v)
  640. }
  641. // UnmarshalJSON supports json.Unmarshaler interface
  642. func (v *RequestDataParams) UnmarshalJSON(data []byte) error {
  643. r := jlexer.Lexer{Data: data}
  644. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb5(&r, v)
  645. return r.Error()
  646. }
  647. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  648. func (v *RequestDataParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  649. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb5(l, v)
  650. }
  651. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb6(in *jlexer.Lexer, out *ObjectStoreIndex) {
  652. isTopLevel := in.IsStart()
  653. if in.IsNull() {
  654. if isTopLevel {
  655. in.Consumed()
  656. }
  657. in.Skip()
  658. return
  659. }
  660. in.Delim('{')
  661. for !in.IsDelim('}') {
  662. key := in.UnsafeFieldName(false)
  663. in.WantColon()
  664. if in.IsNull() {
  665. in.Skip()
  666. in.WantComma()
  667. continue
  668. }
  669. switch key {
  670. case "name":
  671. out.Name = string(in.String())
  672. case "keyPath":
  673. if in.IsNull() {
  674. in.Skip()
  675. out.KeyPath = nil
  676. } else {
  677. if out.KeyPath == nil {
  678. out.KeyPath = new(KeyPath)
  679. }
  680. (*out.KeyPath).UnmarshalEasyJSON(in)
  681. }
  682. case "unique":
  683. out.Unique = bool(in.Bool())
  684. case "multiEntry":
  685. out.MultiEntry = bool(in.Bool())
  686. default:
  687. in.SkipRecursive()
  688. }
  689. in.WantComma()
  690. }
  691. in.Delim('}')
  692. if isTopLevel {
  693. in.Consumed()
  694. }
  695. }
  696. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb6(out *jwriter.Writer, in ObjectStoreIndex) {
  697. out.RawByte('{')
  698. first := true
  699. _ = first
  700. {
  701. const prefix string = ",\"name\":"
  702. out.RawString(prefix[1:])
  703. out.String(string(in.Name))
  704. }
  705. {
  706. const prefix string = ",\"keyPath\":"
  707. out.RawString(prefix)
  708. if in.KeyPath == nil {
  709. out.RawString("null")
  710. } else {
  711. (*in.KeyPath).MarshalEasyJSON(out)
  712. }
  713. }
  714. {
  715. const prefix string = ",\"unique\":"
  716. out.RawString(prefix)
  717. out.Bool(bool(in.Unique))
  718. }
  719. {
  720. const prefix string = ",\"multiEntry\":"
  721. out.RawString(prefix)
  722. out.Bool(bool(in.MultiEntry))
  723. }
  724. out.RawByte('}')
  725. }
  726. // MarshalJSON supports json.Marshaler interface
  727. func (v ObjectStoreIndex) MarshalJSON() ([]byte, error) {
  728. w := jwriter.Writer{}
  729. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb6(&w, v)
  730. return w.Buffer.BuildBytes(), w.Error
  731. }
  732. // MarshalEasyJSON supports easyjson.Marshaler interface
  733. func (v ObjectStoreIndex) MarshalEasyJSON(w *jwriter.Writer) {
  734. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb6(w, v)
  735. }
  736. // UnmarshalJSON supports json.Unmarshaler interface
  737. func (v *ObjectStoreIndex) UnmarshalJSON(data []byte) error {
  738. r := jlexer.Lexer{Data: data}
  739. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb6(&r, v)
  740. return r.Error()
  741. }
  742. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  743. func (v *ObjectStoreIndex) UnmarshalEasyJSON(l *jlexer.Lexer) {
  744. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb6(l, v)
  745. }
  746. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb7(in *jlexer.Lexer, out *ObjectStore) {
  747. isTopLevel := in.IsStart()
  748. if in.IsNull() {
  749. if isTopLevel {
  750. in.Consumed()
  751. }
  752. in.Skip()
  753. return
  754. }
  755. in.Delim('{')
  756. for !in.IsDelim('}') {
  757. key := in.UnsafeFieldName(false)
  758. in.WantColon()
  759. if in.IsNull() {
  760. in.Skip()
  761. in.WantComma()
  762. continue
  763. }
  764. switch key {
  765. case "name":
  766. out.Name = string(in.String())
  767. case "keyPath":
  768. if in.IsNull() {
  769. in.Skip()
  770. out.KeyPath = nil
  771. } else {
  772. if out.KeyPath == nil {
  773. out.KeyPath = new(KeyPath)
  774. }
  775. (*out.KeyPath).UnmarshalEasyJSON(in)
  776. }
  777. case "autoIncrement":
  778. out.AutoIncrement = bool(in.Bool())
  779. case "indexes":
  780. if in.IsNull() {
  781. in.Skip()
  782. out.Indexes = nil
  783. } else {
  784. in.Delim('[')
  785. if out.Indexes == nil {
  786. if !in.IsDelim(']') {
  787. out.Indexes = make([]*ObjectStoreIndex, 0, 8)
  788. } else {
  789. out.Indexes = []*ObjectStoreIndex{}
  790. }
  791. } else {
  792. out.Indexes = (out.Indexes)[:0]
  793. }
  794. for !in.IsDelim(']') {
  795. var v7 *ObjectStoreIndex
  796. if in.IsNull() {
  797. in.Skip()
  798. v7 = nil
  799. } else {
  800. if v7 == nil {
  801. v7 = new(ObjectStoreIndex)
  802. }
  803. (*v7).UnmarshalEasyJSON(in)
  804. }
  805. out.Indexes = append(out.Indexes, v7)
  806. in.WantComma()
  807. }
  808. in.Delim(']')
  809. }
  810. default:
  811. in.SkipRecursive()
  812. }
  813. in.WantComma()
  814. }
  815. in.Delim('}')
  816. if isTopLevel {
  817. in.Consumed()
  818. }
  819. }
  820. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb7(out *jwriter.Writer, in ObjectStore) {
  821. out.RawByte('{')
  822. first := true
  823. _ = first
  824. {
  825. const prefix string = ",\"name\":"
  826. out.RawString(prefix[1:])
  827. out.String(string(in.Name))
  828. }
  829. {
  830. const prefix string = ",\"keyPath\":"
  831. out.RawString(prefix)
  832. if in.KeyPath == nil {
  833. out.RawString("null")
  834. } else {
  835. (*in.KeyPath).MarshalEasyJSON(out)
  836. }
  837. }
  838. {
  839. const prefix string = ",\"autoIncrement\":"
  840. out.RawString(prefix)
  841. out.Bool(bool(in.AutoIncrement))
  842. }
  843. {
  844. const prefix string = ",\"indexes\":"
  845. out.RawString(prefix)
  846. if in.Indexes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  847. out.RawString("null")
  848. } else {
  849. out.RawByte('[')
  850. for v8, v9 := range in.Indexes {
  851. if v8 > 0 {
  852. out.RawByte(',')
  853. }
  854. if v9 == nil {
  855. out.RawString("null")
  856. } else {
  857. (*v9).MarshalEasyJSON(out)
  858. }
  859. }
  860. out.RawByte(']')
  861. }
  862. }
  863. out.RawByte('}')
  864. }
  865. // MarshalJSON supports json.Marshaler interface
  866. func (v ObjectStore) MarshalJSON() ([]byte, error) {
  867. w := jwriter.Writer{}
  868. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb7(&w, v)
  869. return w.Buffer.BuildBytes(), w.Error
  870. }
  871. // MarshalEasyJSON supports easyjson.Marshaler interface
  872. func (v ObjectStore) MarshalEasyJSON(w *jwriter.Writer) {
  873. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb7(w, v)
  874. }
  875. // UnmarshalJSON supports json.Unmarshaler interface
  876. func (v *ObjectStore) UnmarshalJSON(data []byte) error {
  877. r := jlexer.Lexer{Data: data}
  878. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb7(&r, v)
  879. return r.Error()
  880. }
  881. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  882. func (v *ObjectStore) UnmarshalEasyJSON(l *jlexer.Lexer) {
  883. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb7(l, v)
  884. }
  885. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb8(in *jlexer.Lexer, out *KeyRange) {
  886. isTopLevel := in.IsStart()
  887. if in.IsNull() {
  888. if isTopLevel {
  889. in.Consumed()
  890. }
  891. in.Skip()
  892. return
  893. }
  894. in.Delim('{')
  895. for !in.IsDelim('}') {
  896. key := in.UnsafeFieldName(false)
  897. in.WantColon()
  898. if in.IsNull() {
  899. in.Skip()
  900. in.WantComma()
  901. continue
  902. }
  903. switch key {
  904. case "lower":
  905. if in.IsNull() {
  906. in.Skip()
  907. out.Lower = nil
  908. } else {
  909. if out.Lower == nil {
  910. out.Lower = new(Key)
  911. }
  912. (*out.Lower).UnmarshalEasyJSON(in)
  913. }
  914. case "upper":
  915. if in.IsNull() {
  916. in.Skip()
  917. out.Upper = nil
  918. } else {
  919. if out.Upper == nil {
  920. out.Upper = new(Key)
  921. }
  922. (*out.Upper).UnmarshalEasyJSON(in)
  923. }
  924. case "lowerOpen":
  925. out.LowerOpen = bool(in.Bool())
  926. case "upperOpen":
  927. out.UpperOpen = bool(in.Bool())
  928. default:
  929. in.SkipRecursive()
  930. }
  931. in.WantComma()
  932. }
  933. in.Delim('}')
  934. if isTopLevel {
  935. in.Consumed()
  936. }
  937. }
  938. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb8(out *jwriter.Writer, in KeyRange) {
  939. out.RawByte('{')
  940. first := true
  941. _ = first
  942. if in.Lower != nil {
  943. const prefix string = ",\"lower\":"
  944. first = false
  945. out.RawString(prefix[1:])
  946. (*in.Lower).MarshalEasyJSON(out)
  947. }
  948. if in.Upper != nil {
  949. const prefix string = ",\"upper\":"
  950. if first {
  951. first = false
  952. out.RawString(prefix[1:])
  953. } else {
  954. out.RawString(prefix)
  955. }
  956. (*in.Upper).MarshalEasyJSON(out)
  957. }
  958. {
  959. const prefix string = ",\"lowerOpen\":"
  960. if first {
  961. first = false
  962. out.RawString(prefix[1:])
  963. } else {
  964. out.RawString(prefix)
  965. }
  966. out.Bool(bool(in.LowerOpen))
  967. }
  968. {
  969. const prefix string = ",\"upperOpen\":"
  970. out.RawString(prefix)
  971. out.Bool(bool(in.UpperOpen))
  972. }
  973. out.RawByte('}')
  974. }
  975. // MarshalJSON supports json.Marshaler interface
  976. func (v KeyRange) MarshalJSON() ([]byte, error) {
  977. w := jwriter.Writer{}
  978. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb8(&w, v)
  979. return w.Buffer.BuildBytes(), w.Error
  980. }
  981. // MarshalEasyJSON supports easyjson.Marshaler interface
  982. func (v KeyRange) MarshalEasyJSON(w *jwriter.Writer) {
  983. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb8(w, v)
  984. }
  985. // UnmarshalJSON supports json.Unmarshaler interface
  986. func (v *KeyRange) UnmarshalJSON(data []byte) error {
  987. r := jlexer.Lexer{Data: data}
  988. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb8(&r, v)
  989. return r.Error()
  990. }
  991. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  992. func (v *KeyRange) UnmarshalEasyJSON(l *jlexer.Lexer) {
  993. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb8(l, v)
  994. }
  995. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb9(in *jlexer.Lexer, out *KeyPath) {
  996. isTopLevel := in.IsStart()
  997. if in.IsNull() {
  998. if isTopLevel {
  999. in.Consumed()
  1000. }
  1001. in.Skip()
  1002. return
  1003. }
  1004. in.Delim('{')
  1005. for !in.IsDelim('}') {
  1006. key := in.UnsafeFieldName(false)
  1007. in.WantColon()
  1008. if in.IsNull() {
  1009. in.Skip()
  1010. in.WantComma()
  1011. continue
  1012. }
  1013. switch key {
  1014. case "type":
  1015. (out.Type).UnmarshalEasyJSON(in)
  1016. case "string":
  1017. out.String = string(in.String())
  1018. case "array":
  1019. if in.IsNull() {
  1020. in.Skip()
  1021. out.Array = nil
  1022. } else {
  1023. in.Delim('[')
  1024. if out.Array == nil {
  1025. if !in.IsDelim(']') {
  1026. out.Array = make([]string, 0, 4)
  1027. } else {
  1028. out.Array = []string{}
  1029. }
  1030. } else {
  1031. out.Array = (out.Array)[:0]
  1032. }
  1033. for !in.IsDelim(']') {
  1034. var v10 string
  1035. v10 = string(in.String())
  1036. out.Array = append(out.Array, v10)
  1037. in.WantComma()
  1038. }
  1039. in.Delim(']')
  1040. }
  1041. default:
  1042. in.SkipRecursive()
  1043. }
  1044. in.WantComma()
  1045. }
  1046. in.Delim('}')
  1047. if isTopLevel {
  1048. in.Consumed()
  1049. }
  1050. }
  1051. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb9(out *jwriter.Writer, in KeyPath) {
  1052. out.RawByte('{')
  1053. first := true
  1054. _ = first
  1055. {
  1056. const prefix string = ",\"type\":"
  1057. out.RawString(prefix[1:])
  1058. (in.Type).MarshalEasyJSON(out)
  1059. }
  1060. if in.String != "" {
  1061. const prefix string = ",\"string\":"
  1062. out.RawString(prefix)
  1063. out.String(string(in.String))
  1064. }
  1065. if len(in.Array) != 0 {
  1066. const prefix string = ",\"array\":"
  1067. out.RawString(prefix)
  1068. {
  1069. out.RawByte('[')
  1070. for v11, v12 := range in.Array {
  1071. if v11 > 0 {
  1072. out.RawByte(',')
  1073. }
  1074. out.String(string(v12))
  1075. }
  1076. out.RawByte(']')
  1077. }
  1078. }
  1079. out.RawByte('}')
  1080. }
  1081. // MarshalJSON supports json.Marshaler interface
  1082. func (v KeyPath) MarshalJSON() ([]byte, error) {
  1083. w := jwriter.Writer{}
  1084. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb9(&w, v)
  1085. return w.Buffer.BuildBytes(), w.Error
  1086. }
  1087. // MarshalEasyJSON supports easyjson.Marshaler interface
  1088. func (v KeyPath) MarshalEasyJSON(w *jwriter.Writer) {
  1089. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb9(w, v)
  1090. }
  1091. // UnmarshalJSON supports json.Unmarshaler interface
  1092. func (v *KeyPath) UnmarshalJSON(data []byte) error {
  1093. r := jlexer.Lexer{Data: data}
  1094. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb9(&r, v)
  1095. return r.Error()
  1096. }
  1097. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1098. func (v *KeyPath) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1099. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb9(l, v)
  1100. }
  1101. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb10(in *jlexer.Lexer, out *Key) {
  1102. isTopLevel := in.IsStart()
  1103. if in.IsNull() {
  1104. if isTopLevel {
  1105. in.Consumed()
  1106. }
  1107. in.Skip()
  1108. return
  1109. }
  1110. in.Delim('{')
  1111. for !in.IsDelim('}') {
  1112. key := in.UnsafeFieldName(false)
  1113. in.WantColon()
  1114. if in.IsNull() {
  1115. in.Skip()
  1116. in.WantComma()
  1117. continue
  1118. }
  1119. switch key {
  1120. case "type":
  1121. (out.Type).UnmarshalEasyJSON(in)
  1122. case "number":
  1123. out.Number = float64(in.Float64())
  1124. case "string":
  1125. out.String = string(in.String())
  1126. case "date":
  1127. out.Date = float64(in.Float64())
  1128. case "array":
  1129. if in.IsNull() {
  1130. in.Skip()
  1131. out.Array = nil
  1132. } else {
  1133. in.Delim('[')
  1134. if out.Array == nil {
  1135. if !in.IsDelim(']') {
  1136. out.Array = make([]*Key, 0, 8)
  1137. } else {
  1138. out.Array = []*Key{}
  1139. }
  1140. } else {
  1141. out.Array = (out.Array)[:0]
  1142. }
  1143. for !in.IsDelim(']') {
  1144. var v13 *Key
  1145. if in.IsNull() {
  1146. in.Skip()
  1147. v13 = nil
  1148. } else {
  1149. if v13 == nil {
  1150. v13 = new(Key)
  1151. }
  1152. (*v13).UnmarshalEasyJSON(in)
  1153. }
  1154. out.Array = append(out.Array, v13)
  1155. in.WantComma()
  1156. }
  1157. in.Delim(']')
  1158. }
  1159. default:
  1160. in.SkipRecursive()
  1161. }
  1162. in.WantComma()
  1163. }
  1164. in.Delim('}')
  1165. if isTopLevel {
  1166. in.Consumed()
  1167. }
  1168. }
  1169. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb10(out *jwriter.Writer, in Key) {
  1170. out.RawByte('{')
  1171. first := true
  1172. _ = first
  1173. {
  1174. const prefix string = ",\"type\":"
  1175. out.RawString(prefix[1:])
  1176. (in.Type).MarshalEasyJSON(out)
  1177. }
  1178. if in.Number != 0 {
  1179. const prefix string = ",\"number\":"
  1180. out.RawString(prefix)
  1181. out.Float64(float64(in.Number))
  1182. }
  1183. if in.String != "" {
  1184. const prefix string = ",\"string\":"
  1185. out.RawString(prefix)
  1186. out.String(string(in.String))
  1187. }
  1188. if in.Date != 0 {
  1189. const prefix string = ",\"date\":"
  1190. out.RawString(prefix)
  1191. out.Float64(float64(in.Date))
  1192. }
  1193. if len(in.Array) != 0 {
  1194. const prefix string = ",\"array\":"
  1195. out.RawString(prefix)
  1196. {
  1197. out.RawByte('[')
  1198. for v14, v15 := range in.Array {
  1199. if v14 > 0 {
  1200. out.RawByte(',')
  1201. }
  1202. if v15 == nil {
  1203. out.RawString("null")
  1204. } else {
  1205. (*v15).MarshalEasyJSON(out)
  1206. }
  1207. }
  1208. out.RawByte(']')
  1209. }
  1210. }
  1211. out.RawByte('}')
  1212. }
  1213. // MarshalJSON supports json.Marshaler interface
  1214. func (v Key) MarshalJSON() ([]byte, error) {
  1215. w := jwriter.Writer{}
  1216. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb10(&w, v)
  1217. return w.Buffer.BuildBytes(), w.Error
  1218. }
  1219. // MarshalEasyJSON supports easyjson.Marshaler interface
  1220. func (v Key) MarshalEasyJSON(w *jwriter.Writer) {
  1221. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb10(w, v)
  1222. }
  1223. // UnmarshalJSON supports json.Unmarshaler interface
  1224. func (v *Key) UnmarshalJSON(data []byte) error {
  1225. r := jlexer.Lexer{Data: data}
  1226. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb10(&r, v)
  1227. return r.Error()
  1228. }
  1229. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1230. func (v *Key) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1231. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb10(l, v)
  1232. }
  1233. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb11(in *jlexer.Lexer, out *GetMetadataReturns) {
  1234. isTopLevel := in.IsStart()
  1235. if in.IsNull() {
  1236. if isTopLevel {
  1237. in.Consumed()
  1238. }
  1239. in.Skip()
  1240. return
  1241. }
  1242. in.Delim('{')
  1243. for !in.IsDelim('}') {
  1244. key := in.UnsafeFieldName(false)
  1245. in.WantColon()
  1246. if in.IsNull() {
  1247. in.Skip()
  1248. in.WantComma()
  1249. continue
  1250. }
  1251. switch key {
  1252. case "entriesCount":
  1253. out.EntriesCount = float64(in.Float64())
  1254. case "keyGeneratorValue":
  1255. out.KeyGeneratorValue = float64(in.Float64())
  1256. default:
  1257. in.SkipRecursive()
  1258. }
  1259. in.WantComma()
  1260. }
  1261. in.Delim('}')
  1262. if isTopLevel {
  1263. in.Consumed()
  1264. }
  1265. }
  1266. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb11(out *jwriter.Writer, in GetMetadataReturns) {
  1267. out.RawByte('{')
  1268. first := true
  1269. _ = first
  1270. if in.EntriesCount != 0 {
  1271. const prefix string = ",\"entriesCount\":"
  1272. first = false
  1273. out.RawString(prefix[1:])
  1274. out.Float64(float64(in.EntriesCount))
  1275. }
  1276. if in.KeyGeneratorValue != 0 {
  1277. const prefix string = ",\"keyGeneratorValue\":"
  1278. if first {
  1279. first = false
  1280. out.RawString(prefix[1:])
  1281. } else {
  1282. out.RawString(prefix)
  1283. }
  1284. out.Float64(float64(in.KeyGeneratorValue))
  1285. }
  1286. out.RawByte('}')
  1287. }
  1288. // MarshalJSON supports json.Marshaler interface
  1289. func (v GetMetadataReturns) MarshalJSON() ([]byte, error) {
  1290. w := jwriter.Writer{}
  1291. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb11(&w, v)
  1292. return w.Buffer.BuildBytes(), w.Error
  1293. }
  1294. // MarshalEasyJSON supports easyjson.Marshaler interface
  1295. func (v GetMetadataReturns) MarshalEasyJSON(w *jwriter.Writer) {
  1296. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb11(w, v)
  1297. }
  1298. // UnmarshalJSON supports json.Unmarshaler interface
  1299. func (v *GetMetadataReturns) UnmarshalJSON(data []byte) error {
  1300. r := jlexer.Lexer{Data: data}
  1301. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb11(&r, v)
  1302. return r.Error()
  1303. }
  1304. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1305. func (v *GetMetadataReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1306. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb11(l, v)
  1307. }
  1308. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb12(in *jlexer.Lexer, out *GetMetadataParams) {
  1309. isTopLevel := in.IsStart()
  1310. if in.IsNull() {
  1311. if isTopLevel {
  1312. in.Consumed()
  1313. }
  1314. in.Skip()
  1315. return
  1316. }
  1317. in.Delim('{')
  1318. for !in.IsDelim('}') {
  1319. key := in.UnsafeFieldName(false)
  1320. in.WantColon()
  1321. if in.IsNull() {
  1322. in.Skip()
  1323. in.WantComma()
  1324. continue
  1325. }
  1326. switch key {
  1327. case "securityOrigin":
  1328. out.SecurityOrigin = string(in.String())
  1329. case "storageKey":
  1330. out.StorageKey = string(in.String())
  1331. case "storageBucket":
  1332. if in.IsNull() {
  1333. in.Skip()
  1334. out.StorageBucket = nil
  1335. } else {
  1336. if out.StorageBucket == nil {
  1337. out.StorageBucket = new(storage.Bucket)
  1338. }
  1339. (*out.StorageBucket).UnmarshalEasyJSON(in)
  1340. }
  1341. case "databaseName":
  1342. out.DatabaseName = string(in.String())
  1343. case "objectStoreName":
  1344. out.ObjectStoreName = string(in.String())
  1345. default:
  1346. in.SkipRecursive()
  1347. }
  1348. in.WantComma()
  1349. }
  1350. in.Delim('}')
  1351. if isTopLevel {
  1352. in.Consumed()
  1353. }
  1354. }
  1355. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb12(out *jwriter.Writer, in GetMetadataParams) {
  1356. out.RawByte('{')
  1357. first := true
  1358. _ = first
  1359. if in.SecurityOrigin != "" {
  1360. const prefix string = ",\"securityOrigin\":"
  1361. first = false
  1362. out.RawString(prefix[1:])
  1363. out.String(string(in.SecurityOrigin))
  1364. }
  1365. if in.StorageKey != "" {
  1366. const prefix string = ",\"storageKey\":"
  1367. if first {
  1368. first = false
  1369. out.RawString(prefix[1:])
  1370. } else {
  1371. out.RawString(prefix)
  1372. }
  1373. out.String(string(in.StorageKey))
  1374. }
  1375. if in.StorageBucket != nil {
  1376. const prefix string = ",\"storageBucket\":"
  1377. if first {
  1378. first = false
  1379. out.RawString(prefix[1:])
  1380. } else {
  1381. out.RawString(prefix)
  1382. }
  1383. (*in.StorageBucket).MarshalEasyJSON(out)
  1384. }
  1385. {
  1386. const prefix string = ",\"databaseName\":"
  1387. if first {
  1388. first = false
  1389. out.RawString(prefix[1:])
  1390. } else {
  1391. out.RawString(prefix)
  1392. }
  1393. out.String(string(in.DatabaseName))
  1394. }
  1395. {
  1396. const prefix string = ",\"objectStoreName\":"
  1397. out.RawString(prefix)
  1398. out.String(string(in.ObjectStoreName))
  1399. }
  1400. out.RawByte('}')
  1401. }
  1402. // MarshalJSON supports json.Marshaler interface
  1403. func (v GetMetadataParams) MarshalJSON() ([]byte, error) {
  1404. w := jwriter.Writer{}
  1405. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb12(&w, v)
  1406. return w.Buffer.BuildBytes(), w.Error
  1407. }
  1408. // MarshalEasyJSON supports easyjson.Marshaler interface
  1409. func (v GetMetadataParams) MarshalEasyJSON(w *jwriter.Writer) {
  1410. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb12(w, v)
  1411. }
  1412. // UnmarshalJSON supports json.Unmarshaler interface
  1413. func (v *GetMetadataParams) UnmarshalJSON(data []byte) error {
  1414. r := jlexer.Lexer{Data: data}
  1415. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb12(&r, v)
  1416. return r.Error()
  1417. }
  1418. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1419. func (v *GetMetadataParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1420. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb12(l, v)
  1421. }
  1422. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb13(in *jlexer.Lexer, out *EnableParams) {
  1423. isTopLevel := in.IsStart()
  1424. if in.IsNull() {
  1425. if isTopLevel {
  1426. in.Consumed()
  1427. }
  1428. in.Skip()
  1429. return
  1430. }
  1431. in.Delim('{')
  1432. for !in.IsDelim('}') {
  1433. key := in.UnsafeFieldName(false)
  1434. in.WantColon()
  1435. if in.IsNull() {
  1436. in.Skip()
  1437. in.WantComma()
  1438. continue
  1439. }
  1440. switch key {
  1441. default:
  1442. in.SkipRecursive()
  1443. }
  1444. in.WantComma()
  1445. }
  1446. in.Delim('}')
  1447. if isTopLevel {
  1448. in.Consumed()
  1449. }
  1450. }
  1451. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb13(out *jwriter.Writer, in EnableParams) {
  1452. out.RawByte('{')
  1453. first := true
  1454. _ = first
  1455. out.RawByte('}')
  1456. }
  1457. // MarshalJSON supports json.Marshaler interface
  1458. func (v EnableParams) MarshalJSON() ([]byte, error) {
  1459. w := jwriter.Writer{}
  1460. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb13(&w, v)
  1461. return w.Buffer.BuildBytes(), w.Error
  1462. }
  1463. // MarshalEasyJSON supports easyjson.Marshaler interface
  1464. func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
  1465. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb13(w, v)
  1466. }
  1467. // UnmarshalJSON supports json.Unmarshaler interface
  1468. func (v *EnableParams) UnmarshalJSON(data []byte) error {
  1469. r := jlexer.Lexer{Data: data}
  1470. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb13(&r, v)
  1471. return r.Error()
  1472. }
  1473. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1474. func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1475. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb13(l, v)
  1476. }
  1477. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb14(in *jlexer.Lexer, out *DisableParams) {
  1478. isTopLevel := in.IsStart()
  1479. if in.IsNull() {
  1480. if isTopLevel {
  1481. in.Consumed()
  1482. }
  1483. in.Skip()
  1484. return
  1485. }
  1486. in.Delim('{')
  1487. for !in.IsDelim('}') {
  1488. key := in.UnsafeFieldName(false)
  1489. in.WantColon()
  1490. if in.IsNull() {
  1491. in.Skip()
  1492. in.WantComma()
  1493. continue
  1494. }
  1495. switch key {
  1496. default:
  1497. in.SkipRecursive()
  1498. }
  1499. in.WantComma()
  1500. }
  1501. in.Delim('}')
  1502. if isTopLevel {
  1503. in.Consumed()
  1504. }
  1505. }
  1506. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb14(out *jwriter.Writer, in DisableParams) {
  1507. out.RawByte('{')
  1508. first := true
  1509. _ = first
  1510. out.RawByte('}')
  1511. }
  1512. // MarshalJSON supports json.Marshaler interface
  1513. func (v DisableParams) MarshalJSON() ([]byte, error) {
  1514. w := jwriter.Writer{}
  1515. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb14(&w, v)
  1516. return w.Buffer.BuildBytes(), w.Error
  1517. }
  1518. // MarshalEasyJSON supports easyjson.Marshaler interface
  1519. func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
  1520. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb14(w, v)
  1521. }
  1522. // UnmarshalJSON supports json.Unmarshaler interface
  1523. func (v *DisableParams) UnmarshalJSON(data []byte) error {
  1524. r := jlexer.Lexer{Data: data}
  1525. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb14(&r, v)
  1526. return r.Error()
  1527. }
  1528. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1529. func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1530. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb14(l, v)
  1531. }
  1532. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb15(in *jlexer.Lexer, out *DeleteObjectStoreEntriesParams) {
  1533. isTopLevel := in.IsStart()
  1534. if in.IsNull() {
  1535. if isTopLevel {
  1536. in.Consumed()
  1537. }
  1538. in.Skip()
  1539. return
  1540. }
  1541. in.Delim('{')
  1542. for !in.IsDelim('}') {
  1543. key := in.UnsafeFieldName(false)
  1544. in.WantColon()
  1545. if in.IsNull() {
  1546. in.Skip()
  1547. in.WantComma()
  1548. continue
  1549. }
  1550. switch key {
  1551. case "securityOrigin":
  1552. out.SecurityOrigin = string(in.String())
  1553. case "storageKey":
  1554. out.StorageKey = string(in.String())
  1555. case "storageBucket":
  1556. if in.IsNull() {
  1557. in.Skip()
  1558. out.StorageBucket = nil
  1559. } else {
  1560. if out.StorageBucket == nil {
  1561. out.StorageBucket = new(storage.Bucket)
  1562. }
  1563. (*out.StorageBucket).UnmarshalEasyJSON(in)
  1564. }
  1565. case "databaseName":
  1566. out.DatabaseName = string(in.String())
  1567. case "objectStoreName":
  1568. out.ObjectStoreName = string(in.String())
  1569. case "keyRange":
  1570. if in.IsNull() {
  1571. in.Skip()
  1572. out.KeyRange = nil
  1573. } else {
  1574. if out.KeyRange == nil {
  1575. out.KeyRange = new(KeyRange)
  1576. }
  1577. (*out.KeyRange).UnmarshalEasyJSON(in)
  1578. }
  1579. default:
  1580. in.SkipRecursive()
  1581. }
  1582. in.WantComma()
  1583. }
  1584. in.Delim('}')
  1585. if isTopLevel {
  1586. in.Consumed()
  1587. }
  1588. }
  1589. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb15(out *jwriter.Writer, in DeleteObjectStoreEntriesParams) {
  1590. out.RawByte('{')
  1591. first := true
  1592. _ = first
  1593. if in.SecurityOrigin != "" {
  1594. const prefix string = ",\"securityOrigin\":"
  1595. first = false
  1596. out.RawString(prefix[1:])
  1597. out.String(string(in.SecurityOrigin))
  1598. }
  1599. if in.StorageKey != "" {
  1600. const prefix string = ",\"storageKey\":"
  1601. if first {
  1602. first = false
  1603. out.RawString(prefix[1:])
  1604. } else {
  1605. out.RawString(prefix)
  1606. }
  1607. out.String(string(in.StorageKey))
  1608. }
  1609. if in.StorageBucket != nil {
  1610. const prefix string = ",\"storageBucket\":"
  1611. if first {
  1612. first = false
  1613. out.RawString(prefix[1:])
  1614. } else {
  1615. out.RawString(prefix)
  1616. }
  1617. (*in.StorageBucket).MarshalEasyJSON(out)
  1618. }
  1619. {
  1620. const prefix string = ",\"databaseName\":"
  1621. if first {
  1622. first = false
  1623. out.RawString(prefix[1:])
  1624. } else {
  1625. out.RawString(prefix)
  1626. }
  1627. out.String(string(in.DatabaseName))
  1628. }
  1629. {
  1630. const prefix string = ",\"objectStoreName\":"
  1631. out.RawString(prefix)
  1632. out.String(string(in.ObjectStoreName))
  1633. }
  1634. {
  1635. const prefix string = ",\"keyRange\":"
  1636. out.RawString(prefix)
  1637. if in.KeyRange == nil {
  1638. out.RawString("null")
  1639. } else {
  1640. (*in.KeyRange).MarshalEasyJSON(out)
  1641. }
  1642. }
  1643. out.RawByte('}')
  1644. }
  1645. // MarshalJSON supports json.Marshaler interface
  1646. func (v DeleteObjectStoreEntriesParams) MarshalJSON() ([]byte, error) {
  1647. w := jwriter.Writer{}
  1648. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb15(&w, v)
  1649. return w.Buffer.BuildBytes(), w.Error
  1650. }
  1651. // MarshalEasyJSON supports easyjson.Marshaler interface
  1652. func (v DeleteObjectStoreEntriesParams) MarshalEasyJSON(w *jwriter.Writer) {
  1653. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb15(w, v)
  1654. }
  1655. // UnmarshalJSON supports json.Unmarshaler interface
  1656. func (v *DeleteObjectStoreEntriesParams) UnmarshalJSON(data []byte) error {
  1657. r := jlexer.Lexer{Data: data}
  1658. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb15(&r, v)
  1659. return r.Error()
  1660. }
  1661. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1662. func (v *DeleteObjectStoreEntriesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1663. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb15(l, v)
  1664. }
  1665. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb16(in *jlexer.Lexer, out *DeleteDatabaseParams) {
  1666. isTopLevel := in.IsStart()
  1667. if in.IsNull() {
  1668. if isTopLevel {
  1669. in.Consumed()
  1670. }
  1671. in.Skip()
  1672. return
  1673. }
  1674. in.Delim('{')
  1675. for !in.IsDelim('}') {
  1676. key := in.UnsafeFieldName(false)
  1677. in.WantColon()
  1678. if in.IsNull() {
  1679. in.Skip()
  1680. in.WantComma()
  1681. continue
  1682. }
  1683. switch key {
  1684. case "securityOrigin":
  1685. out.SecurityOrigin = string(in.String())
  1686. case "storageKey":
  1687. out.StorageKey = string(in.String())
  1688. case "storageBucket":
  1689. if in.IsNull() {
  1690. in.Skip()
  1691. out.StorageBucket = nil
  1692. } else {
  1693. if out.StorageBucket == nil {
  1694. out.StorageBucket = new(storage.Bucket)
  1695. }
  1696. (*out.StorageBucket).UnmarshalEasyJSON(in)
  1697. }
  1698. case "databaseName":
  1699. out.DatabaseName = string(in.String())
  1700. default:
  1701. in.SkipRecursive()
  1702. }
  1703. in.WantComma()
  1704. }
  1705. in.Delim('}')
  1706. if isTopLevel {
  1707. in.Consumed()
  1708. }
  1709. }
  1710. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb16(out *jwriter.Writer, in DeleteDatabaseParams) {
  1711. out.RawByte('{')
  1712. first := true
  1713. _ = first
  1714. if in.SecurityOrigin != "" {
  1715. const prefix string = ",\"securityOrigin\":"
  1716. first = false
  1717. out.RawString(prefix[1:])
  1718. out.String(string(in.SecurityOrigin))
  1719. }
  1720. if in.StorageKey != "" {
  1721. const prefix string = ",\"storageKey\":"
  1722. if first {
  1723. first = false
  1724. out.RawString(prefix[1:])
  1725. } else {
  1726. out.RawString(prefix)
  1727. }
  1728. out.String(string(in.StorageKey))
  1729. }
  1730. if in.StorageBucket != nil {
  1731. const prefix string = ",\"storageBucket\":"
  1732. if first {
  1733. first = false
  1734. out.RawString(prefix[1:])
  1735. } else {
  1736. out.RawString(prefix)
  1737. }
  1738. (*in.StorageBucket).MarshalEasyJSON(out)
  1739. }
  1740. {
  1741. const prefix string = ",\"databaseName\":"
  1742. if first {
  1743. first = false
  1744. out.RawString(prefix[1:])
  1745. } else {
  1746. out.RawString(prefix)
  1747. }
  1748. out.String(string(in.DatabaseName))
  1749. }
  1750. out.RawByte('}')
  1751. }
  1752. // MarshalJSON supports json.Marshaler interface
  1753. func (v DeleteDatabaseParams) MarshalJSON() ([]byte, error) {
  1754. w := jwriter.Writer{}
  1755. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb16(&w, v)
  1756. return w.Buffer.BuildBytes(), w.Error
  1757. }
  1758. // MarshalEasyJSON supports easyjson.Marshaler interface
  1759. func (v DeleteDatabaseParams) MarshalEasyJSON(w *jwriter.Writer) {
  1760. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb16(w, v)
  1761. }
  1762. // UnmarshalJSON supports json.Unmarshaler interface
  1763. func (v *DeleteDatabaseParams) UnmarshalJSON(data []byte) error {
  1764. r := jlexer.Lexer{Data: data}
  1765. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb16(&r, v)
  1766. return r.Error()
  1767. }
  1768. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1769. func (v *DeleteDatabaseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1770. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb16(l, v)
  1771. }
  1772. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb17(in *jlexer.Lexer, out *DatabaseWithObjectStores) {
  1773. isTopLevel := in.IsStart()
  1774. if in.IsNull() {
  1775. if isTopLevel {
  1776. in.Consumed()
  1777. }
  1778. in.Skip()
  1779. return
  1780. }
  1781. in.Delim('{')
  1782. for !in.IsDelim('}') {
  1783. key := in.UnsafeFieldName(false)
  1784. in.WantColon()
  1785. if in.IsNull() {
  1786. in.Skip()
  1787. in.WantComma()
  1788. continue
  1789. }
  1790. switch key {
  1791. case "name":
  1792. out.Name = string(in.String())
  1793. case "version":
  1794. out.Version = float64(in.Float64())
  1795. case "objectStores":
  1796. if in.IsNull() {
  1797. in.Skip()
  1798. out.ObjectStores = nil
  1799. } else {
  1800. in.Delim('[')
  1801. if out.ObjectStores == nil {
  1802. if !in.IsDelim(']') {
  1803. out.ObjectStores = make([]*ObjectStore, 0, 8)
  1804. } else {
  1805. out.ObjectStores = []*ObjectStore{}
  1806. }
  1807. } else {
  1808. out.ObjectStores = (out.ObjectStores)[:0]
  1809. }
  1810. for !in.IsDelim(']') {
  1811. var v16 *ObjectStore
  1812. if in.IsNull() {
  1813. in.Skip()
  1814. v16 = nil
  1815. } else {
  1816. if v16 == nil {
  1817. v16 = new(ObjectStore)
  1818. }
  1819. (*v16).UnmarshalEasyJSON(in)
  1820. }
  1821. out.ObjectStores = append(out.ObjectStores, v16)
  1822. in.WantComma()
  1823. }
  1824. in.Delim(']')
  1825. }
  1826. default:
  1827. in.SkipRecursive()
  1828. }
  1829. in.WantComma()
  1830. }
  1831. in.Delim('}')
  1832. if isTopLevel {
  1833. in.Consumed()
  1834. }
  1835. }
  1836. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb17(out *jwriter.Writer, in DatabaseWithObjectStores) {
  1837. out.RawByte('{')
  1838. first := true
  1839. _ = first
  1840. {
  1841. const prefix string = ",\"name\":"
  1842. out.RawString(prefix[1:])
  1843. out.String(string(in.Name))
  1844. }
  1845. {
  1846. const prefix string = ",\"version\":"
  1847. out.RawString(prefix)
  1848. out.Float64(float64(in.Version))
  1849. }
  1850. {
  1851. const prefix string = ",\"objectStores\":"
  1852. out.RawString(prefix)
  1853. if in.ObjectStores == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1854. out.RawString("null")
  1855. } else {
  1856. out.RawByte('[')
  1857. for v17, v18 := range in.ObjectStores {
  1858. if v17 > 0 {
  1859. out.RawByte(',')
  1860. }
  1861. if v18 == nil {
  1862. out.RawString("null")
  1863. } else {
  1864. (*v18).MarshalEasyJSON(out)
  1865. }
  1866. }
  1867. out.RawByte(']')
  1868. }
  1869. }
  1870. out.RawByte('}')
  1871. }
  1872. // MarshalJSON supports json.Marshaler interface
  1873. func (v DatabaseWithObjectStores) MarshalJSON() ([]byte, error) {
  1874. w := jwriter.Writer{}
  1875. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb17(&w, v)
  1876. return w.Buffer.BuildBytes(), w.Error
  1877. }
  1878. // MarshalEasyJSON supports easyjson.Marshaler interface
  1879. func (v DatabaseWithObjectStores) MarshalEasyJSON(w *jwriter.Writer) {
  1880. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb17(w, v)
  1881. }
  1882. // UnmarshalJSON supports json.Unmarshaler interface
  1883. func (v *DatabaseWithObjectStores) UnmarshalJSON(data []byte) error {
  1884. r := jlexer.Lexer{Data: data}
  1885. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb17(&r, v)
  1886. return r.Error()
  1887. }
  1888. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1889. func (v *DatabaseWithObjectStores) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1890. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb17(l, v)
  1891. }
  1892. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb18(in *jlexer.Lexer, out *DataEntry) {
  1893. isTopLevel := in.IsStart()
  1894. if in.IsNull() {
  1895. if isTopLevel {
  1896. in.Consumed()
  1897. }
  1898. in.Skip()
  1899. return
  1900. }
  1901. in.Delim('{')
  1902. for !in.IsDelim('}') {
  1903. key := in.UnsafeFieldName(false)
  1904. in.WantColon()
  1905. if in.IsNull() {
  1906. in.Skip()
  1907. in.WantComma()
  1908. continue
  1909. }
  1910. switch key {
  1911. case "key":
  1912. if in.IsNull() {
  1913. in.Skip()
  1914. out.Key = nil
  1915. } else {
  1916. if out.Key == nil {
  1917. out.Key = new(runtime.RemoteObject)
  1918. }
  1919. (*out.Key).UnmarshalEasyJSON(in)
  1920. }
  1921. case "primaryKey":
  1922. if in.IsNull() {
  1923. in.Skip()
  1924. out.PrimaryKey = nil
  1925. } else {
  1926. if out.PrimaryKey == nil {
  1927. out.PrimaryKey = new(runtime.RemoteObject)
  1928. }
  1929. (*out.PrimaryKey).UnmarshalEasyJSON(in)
  1930. }
  1931. case "value":
  1932. if in.IsNull() {
  1933. in.Skip()
  1934. out.Value = nil
  1935. } else {
  1936. if out.Value == nil {
  1937. out.Value = new(runtime.RemoteObject)
  1938. }
  1939. (*out.Value).UnmarshalEasyJSON(in)
  1940. }
  1941. default:
  1942. in.SkipRecursive()
  1943. }
  1944. in.WantComma()
  1945. }
  1946. in.Delim('}')
  1947. if isTopLevel {
  1948. in.Consumed()
  1949. }
  1950. }
  1951. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb18(out *jwriter.Writer, in DataEntry) {
  1952. out.RawByte('{')
  1953. first := true
  1954. _ = first
  1955. {
  1956. const prefix string = ",\"key\":"
  1957. out.RawString(prefix[1:])
  1958. if in.Key == nil {
  1959. out.RawString("null")
  1960. } else {
  1961. (*in.Key).MarshalEasyJSON(out)
  1962. }
  1963. }
  1964. {
  1965. const prefix string = ",\"primaryKey\":"
  1966. out.RawString(prefix)
  1967. if in.PrimaryKey == nil {
  1968. out.RawString("null")
  1969. } else {
  1970. (*in.PrimaryKey).MarshalEasyJSON(out)
  1971. }
  1972. }
  1973. {
  1974. const prefix string = ",\"value\":"
  1975. out.RawString(prefix)
  1976. if in.Value == nil {
  1977. out.RawString("null")
  1978. } else {
  1979. (*in.Value).MarshalEasyJSON(out)
  1980. }
  1981. }
  1982. out.RawByte('}')
  1983. }
  1984. // MarshalJSON supports json.Marshaler interface
  1985. func (v DataEntry) MarshalJSON() ([]byte, error) {
  1986. w := jwriter.Writer{}
  1987. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb18(&w, v)
  1988. return w.Buffer.BuildBytes(), w.Error
  1989. }
  1990. // MarshalEasyJSON supports easyjson.Marshaler interface
  1991. func (v DataEntry) MarshalEasyJSON(w *jwriter.Writer) {
  1992. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb18(w, v)
  1993. }
  1994. // UnmarshalJSON supports json.Unmarshaler interface
  1995. func (v *DataEntry) UnmarshalJSON(data []byte) error {
  1996. r := jlexer.Lexer{Data: data}
  1997. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb18(&r, v)
  1998. return r.Error()
  1999. }
  2000. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2001. func (v *DataEntry) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2002. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb18(l, v)
  2003. }
  2004. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb19(in *jlexer.Lexer, out *ClearObjectStoreParams) {
  2005. isTopLevel := in.IsStart()
  2006. if in.IsNull() {
  2007. if isTopLevel {
  2008. in.Consumed()
  2009. }
  2010. in.Skip()
  2011. return
  2012. }
  2013. in.Delim('{')
  2014. for !in.IsDelim('}') {
  2015. key := in.UnsafeFieldName(false)
  2016. in.WantColon()
  2017. if in.IsNull() {
  2018. in.Skip()
  2019. in.WantComma()
  2020. continue
  2021. }
  2022. switch key {
  2023. case "securityOrigin":
  2024. out.SecurityOrigin = string(in.String())
  2025. case "storageKey":
  2026. out.StorageKey = string(in.String())
  2027. case "storageBucket":
  2028. if in.IsNull() {
  2029. in.Skip()
  2030. out.StorageBucket = nil
  2031. } else {
  2032. if out.StorageBucket == nil {
  2033. out.StorageBucket = new(storage.Bucket)
  2034. }
  2035. (*out.StorageBucket).UnmarshalEasyJSON(in)
  2036. }
  2037. case "databaseName":
  2038. out.DatabaseName = string(in.String())
  2039. case "objectStoreName":
  2040. out.ObjectStoreName = string(in.String())
  2041. default:
  2042. in.SkipRecursive()
  2043. }
  2044. in.WantComma()
  2045. }
  2046. in.Delim('}')
  2047. if isTopLevel {
  2048. in.Consumed()
  2049. }
  2050. }
  2051. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb19(out *jwriter.Writer, in ClearObjectStoreParams) {
  2052. out.RawByte('{')
  2053. first := true
  2054. _ = first
  2055. if in.SecurityOrigin != "" {
  2056. const prefix string = ",\"securityOrigin\":"
  2057. first = false
  2058. out.RawString(prefix[1:])
  2059. out.String(string(in.SecurityOrigin))
  2060. }
  2061. if in.StorageKey != "" {
  2062. const prefix string = ",\"storageKey\":"
  2063. if first {
  2064. first = false
  2065. out.RawString(prefix[1:])
  2066. } else {
  2067. out.RawString(prefix)
  2068. }
  2069. out.String(string(in.StorageKey))
  2070. }
  2071. if in.StorageBucket != nil {
  2072. const prefix string = ",\"storageBucket\":"
  2073. if first {
  2074. first = false
  2075. out.RawString(prefix[1:])
  2076. } else {
  2077. out.RawString(prefix)
  2078. }
  2079. (*in.StorageBucket).MarshalEasyJSON(out)
  2080. }
  2081. {
  2082. const prefix string = ",\"databaseName\":"
  2083. if first {
  2084. first = false
  2085. out.RawString(prefix[1:])
  2086. } else {
  2087. out.RawString(prefix)
  2088. }
  2089. out.String(string(in.DatabaseName))
  2090. }
  2091. {
  2092. const prefix string = ",\"objectStoreName\":"
  2093. out.RawString(prefix)
  2094. out.String(string(in.ObjectStoreName))
  2095. }
  2096. out.RawByte('}')
  2097. }
  2098. // MarshalJSON supports json.Marshaler interface
  2099. func (v ClearObjectStoreParams) MarshalJSON() ([]byte, error) {
  2100. w := jwriter.Writer{}
  2101. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb19(&w, v)
  2102. return w.Buffer.BuildBytes(), w.Error
  2103. }
  2104. // MarshalEasyJSON supports easyjson.Marshaler interface
  2105. func (v ClearObjectStoreParams) MarshalEasyJSON(w *jwriter.Writer) {
  2106. easyjsonC5a4559bEncodeGithubComChromedpCdprotoIndexeddb19(w, v)
  2107. }
  2108. // UnmarshalJSON supports json.Unmarshaler interface
  2109. func (v *ClearObjectStoreParams) UnmarshalJSON(data []byte) error {
  2110. r := jlexer.Lexer{Data: data}
  2111. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb19(&r, v)
  2112. return r.Error()
  2113. }
  2114. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2115. func (v *ClearObjectStoreParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2116. easyjsonC5a4559bDecodeGithubComChromedpCdprotoIndexeddb19(l, v)
  2117. }