easyjson.go 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package domstorage
  3. import (
  4. json "encoding/json"
  5. easyjson "github.com/mailru/easyjson"
  6. jlexer "github.com/mailru/easyjson/jlexer"
  7. jwriter "github.com/mailru/easyjson/jwriter"
  8. )
  9. // suppress unused package warning
  10. var (
  11. _ *json.RawMessage
  12. _ *jlexer.Lexer
  13. _ *jwriter.Writer
  14. _ easyjson.Marshaler
  15. )
  16. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage(in *jlexer.Lexer, out *StorageID) {
  17. isTopLevel := in.IsStart()
  18. if in.IsNull() {
  19. if isTopLevel {
  20. in.Consumed()
  21. }
  22. in.Skip()
  23. return
  24. }
  25. in.Delim('{')
  26. for !in.IsDelim('}') {
  27. key := in.UnsafeFieldName(false)
  28. in.WantColon()
  29. if in.IsNull() {
  30. in.Skip()
  31. in.WantComma()
  32. continue
  33. }
  34. switch key {
  35. case "securityOrigin":
  36. out.SecurityOrigin = string(in.String())
  37. case "storageKey":
  38. out.StorageKey = SerializedStorageKey(in.String())
  39. case "isLocalStorage":
  40. out.IsLocalStorage = bool(in.Bool())
  41. default:
  42. in.SkipRecursive()
  43. }
  44. in.WantComma()
  45. }
  46. in.Delim('}')
  47. if isTopLevel {
  48. in.Consumed()
  49. }
  50. }
  51. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage(out *jwriter.Writer, in StorageID) {
  52. out.RawByte('{')
  53. first := true
  54. _ = first
  55. if in.SecurityOrigin != "" {
  56. const prefix string = ",\"securityOrigin\":"
  57. first = false
  58. out.RawString(prefix[1:])
  59. out.String(string(in.SecurityOrigin))
  60. }
  61. if in.StorageKey != "" {
  62. const prefix string = ",\"storageKey\":"
  63. if first {
  64. first = false
  65. out.RawString(prefix[1:])
  66. } else {
  67. out.RawString(prefix)
  68. }
  69. out.String(string(in.StorageKey))
  70. }
  71. {
  72. const prefix string = ",\"isLocalStorage\":"
  73. if first {
  74. first = false
  75. out.RawString(prefix[1:])
  76. } else {
  77. out.RawString(prefix)
  78. }
  79. out.Bool(bool(in.IsLocalStorage))
  80. }
  81. out.RawByte('}')
  82. }
  83. // MarshalJSON supports json.Marshaler interface
  84. func (v StorageID) MarshalJSON() ([]byte, error) {
  85. w := jwriter.Writer{}
  86. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage(&w, v)
  87. return w.Buffer.BuildBytes(), w.Error
  88. }
  89. // MarshalEasyJSON supports easyjson.Marshaler interface
  90. func (v StorageID) MarshalEasyJSON(w *jwriter.Writer) {
  91. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage(w, v)
  92. }
  93. // UnmarshalJSON supports json.Unmarshaler interface
  94. func (v *StorageID) UnmarshalJSON(data []byte) error {
  95. r := jlexer.Lexer{Data: data}
  96. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage(&r, v)
  97. return r.Error()
  98. }
  99. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  100. func (v *StorageID) UnmarshalEasyJSON(l *jlexer.Lexer) {
  101. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage(l, v)
  102. }
  103. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage1(in *jlexer.Lexer, out *SetDOMStorageItemParams) {
  104. isTopLevel := in.IsStart()
  105. if in.IsNull() {
  106. if isTopLevel {
  107. in.Consumed()
  108. }
  109. in.Skip()
  110. return
  111. }
  112. in.Delim('{')
  113. for !in.IsDelim('}') {
  114. key := in.UnsafeFieldName(false)
  115. in.WantColon()
  116. if in.IsNull() {
  117. in.Skip()
  118. in.WantComma()
  119. continue
  120. }
  121. switch key {
  122. case "storageId":
  123. if in.IsNull() {
  124. in.Skip()
  125. out.StorageID = nil
  126. } else {
  127. if out.StorageID == nil {
  128. out.StorageID = new(StorageID)
  129. }
  130. (*out.StorageID).UnmarshalEasyJSON(in)
  131. }
  132. case "key":
  133. out.Key = string(in.String())
  134. case "value":
  135. out.Value = string(in.String())
  136. default:
  137. in.SkipRecursive()
  138. }
  139. in.WantComma()
  140. }
  141. in.Delim('}')
  142. if isTopLevel {
  143. in.Consumed()
  144. }
  145. }
  146. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage1(out *jwriter.Writer, in SetDOMStorageItemParams) {
  147. out.RawByte('{')
  148. first := true
  149. _ = first
  150. {
  151. const prefix string = ",\"storageId\":"
  152. out.RawString(prefix[1:])
  153. if in.StorageID == nil {
  154. out.RawString("null")
  155. } else {
  156. (*in.StorageID).MarshalEasyJSON(out)
  157. }
  158. }
  159. {
  160. const prefix string = ",\"key\":"
  161. out.RawString(prefix)
  162. out.String(string(in.Key))
  163. }
  164. {
  165. const prefix string = ",\"value\":"
  166. out.RawString(prefix)
  167. out.String(string(in.Value))
  168. }
  169. out.RawByte('}')
  170. }
  171. // MarshalJSON supports json.Marshaler interface
  172. func (v SetDOMStorageItemParams) MarshalJSON() ([]byte, error) {
  173. w := jwriter.Writer{}
  174. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage1(&w, v)
  175. return w.Buffer.BuildBytes(), w.Error
  176. }
  177. // MarshalEasyJSON supports easyjson.Marshaler interface
  178. func (v SetDOMStorageItemParams) MarshalEasyJSON(w *jwriter.Writer) {
  179. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage1(w, v)
  180. }
  181. // UnmarshalJSON supports json.Unmarshaler interface
  182. func (v *SetDOMStorageItemParams) UnmarshalJSON(data []byte) error {
  183. r := jlexer.Lexer{Data: data}
  184. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage1(&r, v)
  185. return r.Error()
  186. }
  187. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  188. func (v *SetDOMStorageItemParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  189. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage1(l, v)
  190. }
  191. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage2(in *jlexer.Lexer, out *RemoveDOMStorageItemParams) {
  192. isTopLevel := in.IsStart()
  193. if in.IsNull() {
  194. if isTopLevel {
  195. in.Consumed()
  196. }
  197. in.Skip()
  198. return
  199. }
  200. in.Delim('{')
  201. for !in.IsDelim('}') {
  202. key := in.UnsafeFieldName(false)
  203. in.WantColon()
  204. if in.IsNull() {
  205. in.Skip()
  206. in.WantComma()
  207. continue
  208. }
  209. switch key {
  210. case "storageId":
  211. if in.IsNull() {
  212. in.Skip()
  213. out.StorageID = nil
  214. } else {
  215. if out.StorageID == nil {
  216. out.StorageID = new(StorageID)
  217. }
  218. (*out.StorageID).UnmarshalEasyJSON(in)
  219. }
  220. case "key":
  221. out.Key = string(in.String())
  222. default:
  223. in.SkipRecursive()
  224. }
  225. in.WantComma()
  226. }
  227. in.Delim('}')
  228. if isTopLevel {
  229. in.Consumed()
  230. }
  231. }
  232. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage2(out *jwriter.Writer, in RemoveDOMStorageItemParams) {
  233. out.RawByte('{')
  234. first := true
  235. _ = first
  236. {
  237. const prefix string = ",\"storageId\":"
  238. out.RawString(prefix[1:])
  239. if in.StorageID == nil {
  240. out.RawString("null")
  241. } else {
  242. (*in.StorageID).MarshalEasyJSON(out)
  243. }
  244. }
  245. {
  246. const prefix string = ",\"key\":"
  247. out.RawString(prefix)
  248. out.String(string(in.Key))
  249. }
  250. out.RawByte('}')
  251. }
  252. // MarshalJSON supports json.Marshaler interface
  253. func (v RemoveDOMStorageItemParams) MarshalJSON() ([]byte, error) {
  254. w := jwriter.Writer{}
  255. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage2(&w, v)
  256. return w.Buffer.BuildBytes(), w.Error
  257. }
  258. // MarshalEasyJSON supports easyjson.Marshaler interface
  259. func (v RemoveDOMStorageItemParams) MarshalEasyJSON(w *jwriter.Writer) {
  260. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage2(w, v)
  261. }
  262. // UnmarshalJSON supports json.Unmarshaler interface
  263. func (v *RemoveDOMStorageItemParams) UnmarshalJSON(data []byte) error {
  264. r := jlexer.Lexer{Data: data}
  265. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage2(&r, v)
  266. return r.Error()
  267. }
  268. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  269. func (v *RemoveDOMStorageItemParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  270. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage2(l, v)
  271. }
  272. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage3(in *jlexer.Lexer, out *GetDOMStorageItemsReturns) {
  273. isTopLevel := in.IsStart()
  274. if in.IsNull() {
  275. if isTopLevel {
  276. in.Consumed()
  277. }
  278. in.Skip()
  279. return
  280. }
  281. in.Delim('{')
  282. for !in.IsDelim('}') {
  283. key := in.UnsafeFieldName(false)
  284. in.WantColon()
  285. if in.IsNull() {
  286. in.Skip()
  287. in.WantComma()
  288. continue
  289. }
  290. switch key {
  291. case "entries":
  292. if in.IsNull() {
  293. in.Skip()
  294. out.Entries = nil
  295. } else {
  296. in.Delim('[')
  297. if out.Entries == nil {
  298. if !in.IsDelim(']') {
  299. out.Entries = make([]Item, 0, 2)
  300. } else {
  301. out.Entries = []Item{}
  302. }
  303. } else {
  304. out.Entries = (out.Entries)[:0]
  305. }
  306. for !in.IsDelim(']') {
  307. var v1 Item
  308. if in.IsNull() {
  309. in.Skip()
  310. v1 = nil
  311. } else {
  312. in.Delim('[')
  313. if v1 == nil {
  314. if !in.IsDelim(']') {
  315. v1 = make(Item, 0, 4)
  316. } else {
  317. v1 = Item{}
  318. }
  319. } else {
  320. v1 = (v1)[:0]
  321. }
  322. for !in.IsDelim(']') {
  323. var v2 string
  324. v2 = string(in.String())
  325. v1 = append(v1, v2)
  326. in.WantComma()
  327. }
  328. in.Delim(']')
  329. }
  330. out.Entries = append(out.Entries, v1)
  331. in.WantComma()
  332. }
  333. in.Delim(']')
  334. }
  335. default:
  336. in.SkipRecursive()
  337. }
  338. in.WantComma()
  339. }
  340. in.Delim('}')
  341. if isTopLevel {
  342. in.Consumed()
  343. }
  344. }
  345. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage3(out *jwriter.Writer, in GetDOMStorageItemsReturns) {
  346. out.RawByte('{')
  347. first := true
  348. _ = first
  349. if len(in.Entries) != 0 {
  350. const prefix string = ",\"entries\":"
  351. first = false
  352. out.RawString(prefix[1:])
  353. {
  354. out.RawByte('[')
  355. for v3, v4 := range in.Entries {
  356. if v3 > 0 {
  357. out.RawByte(',')
  358. }
  359. if v4 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  360. out.RawString("null")
  361. } else {
  362. out.RawByte('[')
  363. for v5, v6 := range v4 {
  364. if v5 > 0 {
  365. out.RawByte(',')
  366. }
  367. out.String(string(v6))
  368. }
  369. out.RawByte(']')
  370. }
  371. }
  372. out.RawByte(']')
  373. }
  374. }
  375. out.RawByte('}')
  376. }
  377. // MarshalJSON supports json.Marshaler interface
  378. func (v GetDOMStorageItemsReturns) MarshalJSON() ([]byte, error) {
  379. w := jwriter.Writer{}
  380. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage3(&w, v)
  381. return w.Buffer.BuildBytes(), w.Error
  382. }
  383. // MarshalEasyJSON supports easyjson.Marshaler interface
  384. func (v GetDOMStorageItemsReturns) MarshalEasyJSON(w *jwriter.Writer) {
  385. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage3(w, v)
  386. }
  387. // UnmarshalJSON supports json.Unmarshaler interface
  388. func (v *GetDOMStorageItemsReturns) UnmarshalJSON(data []byte) error {
  389. r := jlexer.Lexer{Data: data}
  390. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage3(&r, v)
  391. return r.Error()
  392. }
  393. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  394. func (v *GetDOMStorageItemsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  395. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage3(l, v)
  396. }
  397. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage4(in *jlexer.Lexer, out *GetDOMStorageItemsParams) {
  398. isTopLevel := in.IsStart()
  399. if in.IsNull() {
  400. if isTopLevel {
  401. in.Consumed()
  402. }
  403. in.Skip()
  404. return
  405. }
  406. in.Delim('{')
  407. for !in.IsDelim('}') {
  408. key := in.UnsafeFieldName(false)
  409. in.WantColon()
  410. if in.IsNull() {
  411. in.Skip()
  412. in.WantComma()
  413. continue
  414. }
  415. switch key {
  416. case "storageId":
  417. if in.IsNull() {
  418. in.Skip()
  419. out.StorageID = nil
  420. } else {
  421. if out.StorageID == nil {
  422. out.StorageID = new(StorageID)
  423. }
  424. (*out.StorageID).UnmarshalEasyJSON(in)
  425. }
  426. default:
  427. in.SkipRecursive()
  428. }
  429. in.WantComma()
  430. }
  431. in.Delim('}')
  432. if isTopLevel {
  433. in.Consumed()
  434. }
  435. }
  436. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage4(out *jwriter.Writer, in GetDOMStorageItemsParams) {
  437. out.RawByte('{')
  438. first := true
  439. _ = first
  440. {
  441. const prefix string = ",\"storageId\":"
  442. out.RawString(prefix[1:])
  443. if in.StorageID == nil {
  444. out.RawString("null")
  445. } else {
  446. (*in.StorageID).MarshalEasyJSON(out)
  447. }
  448. }
  449. out.RawByte('}')
  450. }
  451. // MarshalJSON supports json.Marshaler interface
  452. func (v GetDOMStorageItemsParams) MarshalJSON() ([]byte, error) {
  453. w := jwriter.Writer{}
  454. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage4(&w, v)
  455. return w.Buffer.BuildBytes(), w.Error
  456. }
  457. // MarshalEasyJSON supports easyjson.Marshaler interface
  458. func (v GetDOMStorageItemsParams) MarshalEasyJSON(w *jwriter.Writer) {
  459. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage4(w, v)
  460. }
  461. // UnmarshalJSON supports json.Unmarshaler interface
  462. func (v *GetDOMStorageItemsParams) UnmarshalJSON(data []byte) error {
  463. r := jlexer.Lexer{Data: data}
  464. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage4(&r, v)
  465. return r.Error()
  466. }
  467. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  468. func (v *GetDOMStorageItemsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  469. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage4(l, v)
  470. }
  471. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage5(in *jlexer.Lexer, out *EventDomStorageItemsCleared) {
  472. isTopLevel := in.IsStart()
  473. if in.IsNull() {
  474. if isTopLevel {
  475. in.Consumed()
  476. }
  477. in.Skip()
  478. return
  479. }
  480. in.Delim('{')
  481. for !in.IsDelim('}') {
  482. key := in.UnsafeFieldName(false)
  483. in.WantColon()
  484. if in.IsNull() {
  485. in.Skip()
  486. in.WantComma()
  487. continue
  488. }
  489. switch key {
  490. case "storageId":
  491. if in.IsNull() {
  492. in.Skip()
  493. out.StorageID = nil
  494. } else {
  495. if out.StorageID == nil {
  496. out.StorageID = new(StorageID)
  497. }
  498. (*out.StorageID).UnmarshalEasyJSON(in)
  499. }
  500. default:
  501. in.SkipRecursive()
  502. }
  503. in.WantComma()
  504. }
  505. in.Delim('}')
  506. if isTopLevel {
  507. in.Consumed()
  508. }
  509. }
  510. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage5(out *jwriter.Writer, in EventDomStorageItemsCleared) {
  511. out.RawByte('{')
  512. first := true
  513. _ = first
  514. {
  515. const prefix string = ",\"storageId\":"
  516. out.RawString(prefix[1:])
  517. if in.StorageID == nil {
  518. out.RawString("null")
  519. } else {
  520. (*in.StorageID).MarshalEasyJSON(out)
  521. }
  522. }
  523. out.RawByte('}')
  524. }
  525. // MarshalJSON supports json.Marshaler interface
  526. func (v EventDomStorageItemsCleared) MarshalJSON() ([]byte, error) {
  527. w := jwriter.Writer{}
  528. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage5(&w, v)
  529. return w.Buffer.BuildBytes(), w.Error
  530. }
  531. // MarshalEasyJSON supports easyjson.Marshaler interface
  532. func (v EventDomStorageItemsCleared) MarshalEasyJSON(w *jwriter.Writer) {
  533. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage5(w, v)
  534. }
  535. // UnmarshalJSON supports json.Unmarshaler interface
  536. func (v *EventDomStorageItemsCleared) UnmarshalJSON(data []byte) error {
  537. r := jlexer.Lexer{Data: data}
  538. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage5(&r, v)
  539. return r.Error()
  540. }
  541. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  542. func (v *EventDomStorageItemsCleared) UnmarshalEasyJSON(l *jlexer.Lexer) {
  543. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage5(l, v)
  544. }
  545. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage6(in *jlexer.Lexer, out *EventDomStorageItemUpdated) {
  546. isTopLevel := in.IsStart()
  547. if in.IsNull() {
  548. if isTopLevel {
  549. in.Consumed()
  550. }
  551. in.Skip()
  552. return
  553. }
  554. in.Delim('{')
  555. for !in.IsDelim('}') {
  556. key := in.UnsafeFieldName(false)
  557. in.WantColon()
  558. if in.IsNull() {
  559. in.Skip()
  560. in.WantComma()
  561. continue
  562. }
  563. switch key {
  564. case "storageId":
  565. if in.IsNull() {
  566. in.Skip()
  567. out.StorageID = nil
  568. } else {
  569. if out.StorageID == nil {
  570. out.StorageID = new(StorageID)
  571. }
  572. (*out.StorageID).UnmarshalEasyJSON(in)
  573. }
  574. case "key":
  575. out.Key = string(in.String())
  576. case "oldValue":
  577. out.OldValue = string(in.String())
  578. case "newValue":
  579. out.NewValue = string(in.String())
  580. default:
  581. in.SkipRecursive()
  582. }
  583. in.WantComma()
  584. }
  585. in.Delim('}')
  586. if isTopLevel {
  587. in.Consumed()
  588. }
  589. }
  590. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage6(out *jwriter.Writer, in EventDomStorageItemUpdated) {
  591. out.RawByte('{')
  592. first := true
  593. _ = first
  594. {
  595. const prefix string = ",\"storageId\":"
  596. out.RawString(prefix[1:])
  597. if in.StorageID == nil {
  598. out.RawString("null")
  599. } else {
  600. (*in.StorageID).MarshalEasyJSON(out)
  601. }
  602. }
  603. {
  604. const prefix string = ",\"key\":"
  605. out.RawString(prefix)
  606. out.String(string(in.Key))
  607. }
  608. {
  609. const prefix string = ",\"oldValue\":"
  610. out.RawString(prefix)
  611. out.String(string(in.OldValue))
  612. }
  613. {
  614. const prefix string = ",\"newValue\":"
  615. out.RawString(prefix)
  616. out.String(string(in.NewValue))
  617. }
  618. out.RawByte('}')
  619. }
  620. // MarshalJSON supports json.Marshaler interface
  621. func (v EventDomStorageItemUpdated) MarshalJSON() ([]byte, error) {
  622. w := jwriter.Writer{}
  623. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage6(&w, v)
  624. return w.Buffer.BuildBytes(), w.Error
  625. }
  626. // MarshalEasyJSON supports easyjson.Marshaler interface
  627. func (v EventDomStorageItemUpdated) MarshalEasyJSON(w *jwriter.Writer) {
  628. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage6(w, v)
  629. }
  630. // UnmarshalJSON supports json.Unmarshaler interface
  631. func (v *EventDomStorageItemUpdated) UnmarshalJSON(data []byte) error {
  632. r := jlexer.Lexer{Data: data}
  633. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage6(&r, v)
  634. return r.Error()
  635. }
  636. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  637. func (v *EventDomStorageItemUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
  638. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage6(l, v)
  639. }
  640. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage7(in *jlexer.Lexer, out *EventDomStorageItemRemoved) {
  641. isTopLevel := in.IsStart()
  642. if in.IsNull() {
  643. if isTopLevel {
  644. in.Consumed()
  645. }
  646. in.Skip()
  647. return
  648. }
  649. in.Delim('{')
  650. for !in.IsDelim('}') {
  651. key := in.UnsafeFieldName(false)
  652. in.WantColon()
  653. if in.IsNull() {
  654. in.Skip()
  655. in.WantComma()
  656. continue
  657. }
  658. switch key {
  659. case "storageId":
  660. if in.IsNull() {
  661. in.Skip()
  662. out.StorageID = nil
  663. } else {
  664. if out.StorageID == nil {
  665. out.StorageID = new(StorageID)
  666. }
  667. (*out.StorageID).UnmarshalEasyJSON(in)
  668. }
  669. case "key":
  670. out.Key = string(in.String())
  671. default:
  672. in.SkipRecursive()
  673. }
  674. in.WantComma()
  675. }
  676. in.Delim('}')
  677. if isTopLevel {
  678. in.Consumed()
  679. }
  680. }
  681. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage7(out *jwriter.Writer, in EventDomStorageItemRemoved) {
  682. out.RawByte('{')
  683. first := true
  684. _ = first
  685. {
  686. const prefix string = ",\"storageId\":"
  687. out.RawString(prefix[1:])
  688. if in.StorageID == nil {
  689. out.RawString("null")
  690. } else {
  691. (*in.StorageID).MarshalEasyJSON(out)
  692. }
  693. }
  694. {
  695. const prefix string = ",\"key\":"
  696. out.RawString(prefix)
  697. out.String(string(in.Key))
  698. }
  699. out.RawByte('}')
  700. }
  701. // MarshalJSON supports json.Marshaler interface
  702. func (v EventDomStorageItemRemoved) MarshalJSON() ([]byte, error) {
  703. w := jwriter.Writer{}
  704. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage7(&w, v)
  705. return w.Buffer.BuildBytes(), w.Error
  706. }
  707. // MarshalEasyJSON supports easyjson.Marshaler interface
  708. func (v EventDomStorageItemRemoved) MarshalEasyJSON(w *jwriter.Writer) {
  709. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage7(w, v)
  710. }
  711. // UnmarshalJSON supports json.Unmarshaler interface
  712. func (v *EventDomStorageItemRemoved) UnmarshalJSON(data []byte) error {
  713. r := jlexer.Lexer{Data: data}
  714. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage7(&r, v)
  715. return r.Error()
  716. }
  717. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  718. func (v *EventDomStorageItemRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) {
  719. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage7(l, v)
  720. }
  721. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage8(in *jlexer.Lexer, out *EventDomStorageItemAdded) {
  722. isTopLevel := in.IsStart()
  723. if in.IsNull() {
  724. if isTopLevel {
  725. in.Consumed()
  726. }
  727. in.Skip()
  728. return
  729. }
  730. in.Delim('{')
  731. for !in.IsDelim('}') {
  732. key := in.UnsafeFieldName(false)
  733. in.WantColon()
  734. if in.IsNull() {
  735. in.Skip()
  736. in.WantComma()
  737. continue
  738. }
  739. switch key {
  740. case "storageId":
  741. if in.IsNull() {
  742. in.Skip()
  743. out.StorageID = nil
  744. } else {
  745. if out.StorageID == nil {
  746. out.StorageID = new(StorageID)
  747. }
  748. (*out.StorageID).UnmarshalEasyJSON(in)
  749. }
  750. case "key":
  751. out.Key = string(in.String())
  752. case "newValue":
  753. out.NewValue = string(in.String())
  754. default:
  755. in.SkipRecursive()
  756. }
  757. in.WantComma()
  758. }
  759. in.Delim('}')
  760. if isTopLevel {
  761. in.Consumed()
  762. }
  763. }
  764. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage8(out *jwriter.Writer, in EventDomStorageItemAdded) {
  765. out.RawByte('{')
  766. first := true
  767. _ = first
  768. {
  769. const prefix string = ",\"storageId\":"
  770. out.RawString(prefix[1:])
  771. if in.StorageID == nil {
  772. out.RawString("null")
  773. } else {
  774. (*in.StorageID).MarshalEasyJSON(out)
  775. }
  776. }
  777. {
  778. const prefix string = ",\"key\":"
  779. out.RawString(prefix)
  780. out.String(string(in.Key))
  781. }
  782. {
  783. const prefix string = ",\"newValue\":"
  784. out.RawString(prefix)
  785. out.String(string(in.NewValue))
  786. }
  787. out.RawByte('}')
  788. }
  789. // MarshalJSON supports json.Marshaler interface
  790. func (v EventDomStorageItemAdded) MarshalJSON() ([]byte, error) {
  791. w := jwriter.Writer{}
  792. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage8(&w, v)
  793. return w.Buffer.BuildBytes(), w.Error
  794. }
  795. // MarshalEasyJSON supports easyjson.Marshaler interface
  796. func (v EventDomStorageItemAdded) MarshalEasyJSON(w *jwriter.Writer) {
  797. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage8(w, v)
  798. }
  799. // UnmarshalJSON supports json.Unmarshaler interface
  800. func (v *EventDomStorageItemAdded) UnmarshalJSON(data []byte) error {
  801. r := jlexer.Lexer{Data: data}
  802. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage8(&r, v)
  803. return r.Error()
  804. }
  805. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  806. func (v *EventDomStorageItemAdded) UnmarshalEasyJSON(l *jlexer.Lexer) {
  807. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage8(l, v)
  808. }
  809. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage9(in *jlexer.Lexer, out *EnableParams) {
  810. isTopLevel := in.IsStart()
  811. if in.IsNull() {
  812. if isTopLevel {
  813. in.Consumed()
  814. }
  815. in.Skip()
  816. return
  817. }
  818. in.Delim('{')
  819. for !in.IsDelim('}') {
  820. key := in.UnsafeFieldName(false)
  821. in.WantColon()
  822. if in.IsNull() {
  823. in.Skip()
  824. in.WantComma()
  825. continue
  826. }
  827. switch key {
  828. default:
  829. in.SkipRecursive()
  830. }
  831. in.WantComma()
  832. }
  833. in.Delim('}')
  834. if isTopLevel {
  835. in.Consumed()
  836. }
  837. }
  838. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage9(out *jwriter.Writer, in EnableParams) {
  839. out.RawByte('{')
  840. first := true
  841. _ = first
  842. out.RawByte('}')
  843. }
  844. // MarshalJSON supports json.Marshaler interface
  845. func (v EnableParams) MarshalJSON() ([]byte, error) {
  846. w := jwriter.Writer{}
  847. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage9(&w, v)
  848. return w.Buffer.BuildBytes(), w.Error
  849. }
  850. // MarshalEasyJSON supports easyjson.Marshaler interface
  851. func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
  852. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage9(w, v)
  853. }
  854. // UnmarshalJSON supports json.Unmarshaler interface
  855. func (v *EnableParams) UnmarshalJSON(data []byte) error {
  856. r := jlexer.Lexer{Data: data}
  857. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage9(&r, v)
  858. return r.Error()
  859. }
  860. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  861. func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  862. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage9(l, v)
  863. }
  864. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage10(in *jlexer.Lexer, out *DisableParams) {
  865. isTopLevel := in.IsStart()
  866. if in.IsNull() {
  867. if isTopLevel {
  868. in.Consumed()
  869. }
  870. in.Skip()
  871. return
  872. }
  873. in.Delim('{')
  874. for !in.IsDelim('}') {
  875. key := in.UnsafeFieldName(false)
  876. in.WantColon()
  877. if in.IsNull() {
  878. in.Skip()
  879. in.WantComma()
  880. continue
  881. }
  882. switch key {
  883. default:
  884. in.SkipRecursive()
  885. }
  886. in.WantComma()
  887. }
  888. in.Delim('}')
  889. if isTopLevel {
  890. in.Consumed()
  891. }
  892. }
  893. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage10(out *jwriter.Writer, in DisableParams) {
  894. out.RawByte('{')
  895. first := true
  896. _ = first
  897. out.RawByte('}')
  898. }
  899. // MarshalJSON supports json.Marshaler interface
  900. func (v DisableParams) MarshalJSON() ([]byte, error) {
  901. w := jwriter.Writer{}
  902. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage10(&w, v)
  903. return w.Buffer.BuildBytes(), w.Error
  904. }
  905. // MarshalEasyJSON supports easyjson.Marshaler interface
  906. func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
  907. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage10(w, v)
  908. }
  909. // UnmarshalJSON supports json.Unmarshaler interface
  910. func (v *DisableParams) UnmarshalJSON(data []byte) error {
  911. r := jlexer.Lexer{Data: data}
  912. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage10(&r, v)
  913. return r.Error()
  914. }
  915. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  916. func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  917. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage10(l, v)
  918. }
  919. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage11(in *jlexer.Lexer, out *ClearParams) {
  920. isTopLevel := in.IsStart()
  921. if in.IsNull() {
  922. if isTopLevel {
  923. in.Consumed()
  924. }
  925. in.Skip()
  926. return
  927. }
  928. in.Delim('{')
  929. for !in.IsDelim('}') {
  930. key := in.UnsafeFieldName(false)
  931. in.WantColon()
  932. if in.IsNull() {
  933. in.Skip()
  934. in.WantComma()
  935. continue
  936. }
  937. switch key {
  938. case "storageId":
  939. if in.IsNull() {
  940. in.Skip()
  941. out.StorageID = nil
  942. } else {
  943. if out.StorageID == nil {
  944. out.StorageID = new(StorageID)
  945. }
  946. (*out.StorageID).UnmarshalEasyJSON(in)
  947. }
  948. default:
  949. in.SkipRecursive()
  950. }
  951. in.WantComma()
  952. }
  953. in.Delim('}')
  954. if isTopLevel {
  955. in.Consumed()
  956. }
  957. }
  958. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage11(out *jwriter.Writer, in ClearParams) {
  959. out.RawByte('{')
  960. first := true
  961. _ = first
  962. {
  963. const prefix string = ",\"storageId\":"
  964. out.RawString(prefix[1:])
  965. if in.StorageID == nil {
  966. out.RawString("null")
  967. } else {
  968. (*in.StorageID).MarshalEasyJSON(out)
  969. }
  970. }
  971. out.RawByte('}')
  972. }
  973. // MarshalJSON supports json.Marshaler interface
  974. func (v ClearParams) MarshalJSON() ([]byte, error) {
  975. w := jwriter.Writer{}
  976. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage11(&w, v)
  977. return w.Buffer.BuildBytes(), w.Error
  978. }
  979. // MarshalEasyJSON supports easyjson.Marshaler interface
  980. func (v ClearParams) MarshalEasyJSON(w *jwriter.Writer) {
  981. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomstorage11(w, v)
  982. }
  983. // UnmarshalJSON supports json.Unmarshaler interface
  984. func (v *ClearParams) UnmarshalJSON(data []byte) error {
  985. r := jlexer.Lexer{Data: data}
  986. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage11(&r, v)
  987. return r.Error()
  988. }
  989. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  990. func (v *ClearParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  991. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomstorage11(l, v)
  992. }