easyjson.go 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package domdebugger
  3. import (
  4. json "encoding/json"
  5. runtime "github.com/chromedp/cdproto/runtime"
  6. easyjson "github.com/mailru/easyjson"
  7. jlexer "github.com/mailru/easyjson/jlexer"
  8. jwriter "github.com/mailru/easyjson/jwriter"
  9. )
  10. // suppress unused package warning
  11. var (
  12. _ *json.RawMessage
  13. _ *jlexer.Lexer
  14. _ *jwriter.Writer
  15. _ easyjson.Marshaler
  16. )
  17. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger(in *jlexer.Lexer, out *SetXHRBreakpointParams) {
  18. isTopLevel := in.IsStart()
  19. if in.IsNull() {
  20. if isTopLevel {
  21. in.Consumed()
  22. }
  23. in.Skip()
  24. return
  25. }
  26. in.Delim('{')
  27. for !in.IsDelim('}') {
  28. key := in.UnsafeFieldName(false)
  29. in.WantColon()
  30. if in.IsNull() {
  31. in.Skip()
  32. in.WantComma()
  33. continue
  34. }
  35. switch key {
  36. case "url":
  37. out.URL = string(in.String())
  38. default:
  39. in.SkipRecursive()
  40. }
  41. in.WantComma()
  42. }
  43. in.Delim('}')
  44. if isTopLevel {
  45. in.Consumed()
  46. }
  47. }
  48. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger(out *jwriter.Writer, in SetXHRBreakpointParams) {
  49. out.RawByte('{')
  50. first := true
  51. _ = first
  52. {
  53. const prefix string = ",\"url\":"
  54. out.RawString(prefix[1:])
  55. out.String(string(in.URL))
  56. }
  57. out.RawByte('}')
  58. }
  59. // MarshalJSON supports json.Marshaler interface
  60. func (v SetXHRBreakpointParams) MarshalJSON() ([]byte, error) {
  61. w := jwriter.Writer{}
  62. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger(&w, v)
  63. return w.Buffer.BuildBytes(), w.Error
  64. }
  65. // MarshalEasyJSON supports easyjson.Marshaler interface
  66. func (v SetXHRBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
  67. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger(w, v)
  68. }
  69. // UnmarshalJSON supports json.Unmarshaler interface
  70. func (v *SetXHRBreakpointParams) UnmarshalJSON(data []byte) error {
  71. r := jlexer.Lexer{Data: data}
  72. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger(&r, v)
  73. return r.Error()
  74. }
  75. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  76. func (v *SetXHRBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  77. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger(l, v)
  78. }
  79. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger1(in *jlexer.Lexer, out *SetEventListenerBreakpointParams) {
  80. isTopLevel := in.IsStart()
  81. if in.IsNull() {
  82. if isTopLevel {
  83. in.Consumed()
  84. }
  85. in.Skip()
  86. return
  87. }
  88. in.Delim('{')
  89. for !in.IsDelim('}') {
  90. key := in.UnsafeFieldName(false)
  91. in.WantColon()
  92. if in.IsNull() {
  93. in.Skip()
  94. in.WantComma()
  95. continue
  96. }
  97. switch key {
  98. case "eventName":
  99. out.EventName = string(in.String())
  100. case "targetName":
  101. out.TargetName = string(in.String())
  102. default:
  103. in.SkipRecursive()
  104. }
  105. in.WantComma()
  106. }
  107. in.Delim('}')
  108. if isTopLevel {
  109. in.Consumed()
  110. }
  111. }
  112. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger1(out *jwriter.Writer, in SetEventListenerBreakpointParams) {
  113. out.RawByte('{')
  114. first := true
  115. _ = first
  116. {
  117. const prefix string = ",\"eventName\":"
  118. out.RawString(prefix[1:])
  119. out.String(string(in.EventName))
  120. }
  121. if in.TargetName != "" {
  122. const prefix string = ",\"targetName\":"
  123. out.RawString(prefix)
  124. out.String(string(in.TargetName))
  125. }
  126. out.RawByte('}')
  127. }
  128. // MarshalJSON supports json.Marshaler interface
  129. func (v SetEventListenerBreakpointParams) MarshalJSON() ([]byte, error) {
  130. w := jwriter.Writer{}
  131. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger1(&w, v)
  132. return w.Buffer.BuildBytes(), w.Error
  133. }
  134. // MarshalEasyJSON supports easyjson.Marshaler interface
  135. func (v SetEventListenerBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
  136. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger1(w, v)
  137. }
  138. // UnmarshalJSON supports json.Unmarshaler interface
  139. func (v *SetEventListenerBreakpointParams) UnmarshalJSON(data []byte) error {
  140. r := jlexer.Lexer{Data: data}
  141. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger1(&r, v)
  142. return r.Error()
  143. }
  144. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  145. func (v *SetEventListenerBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  146. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger1(l, v)
  147. }
  148. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger2(in *jlexer.Lexer, out *SetDOMBreakpointParams) {
  149. isTopLevel := in.IsStart()
  150. if in.IsNull() {
  151. if isTopLevel {
  152. in.Consumed()
  153. }
  154. in.Skip()
  155. return
  156. }
  157. in.Delim('{')
  158. for !in.IsDelim('}') {
  159. key := in.UnsafeFieldName(false)
  160. in.WantColon()
  161. if in.IsNull() {
  162. in.Skip()
  163. in.WantComma()
  164. continue
  165. }
  166. switch key {
  167. case "nodeId":
  168. (out.NodeID).UnmarshalEasyJSON(in)
  169. case "type":
  170. (out.Type).UnmarshalEasyJSON(in)
  171. default:
  172. in.SkipRecursive()
  173. }
  174. in.WantComma()
  175. }
  176. in.Delim('}')
  177. if isTopLevel {
  178. in.Consumed()
  179. }
  180. }
  181. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger2(out *jwriter.Writer, in SetDOMBreakpointParams) {
  182. out.RawByte('{')
  183. first := true
  184. _ = first
  185. {
  186. const prefix string = ",\"nodeId\":"
  187. out.RawString(prefix[1:])
  188. out.Int64(int64(in.NodeID))
  189. }
  190. {
  191. const prefix string = ",\"type\":"
  192. out.RawString(prefix)
  193. (in.Type).MarshalEasyJSON(out)
  194. }
  195. out.RawByte('}')
  196. }
  197. // MarshalJSON supports json.Marshaler interface
  198. func (v SetDOMBreakpointParams) MarshalJSON() ([]byte, error) {
  199. w := jwriter.Writer{}
  200. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger2(&w, v)
  201. return w.Buffer.BuildBytes(), w.Error
  202. }
  203. // MarshalEasyJSON supports easyjson.Marshaler interface
  204. func (v SetDOMBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
  205. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger2(w, v)
  206. }
  207. // UnmarshalJSON supports json.Unmarshaler interface
  208. func (v *SetDOMBreakpointParams) UnmarshalJSON(data []byte) error {
  209. r := jlexer.Lexer{Data: data}
  210. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger2(&r, v)
  211. return r.Error()
  212. }
  213. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  214. func (v *SetDOMBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  215. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger2(l, v)
  216. }
  217. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger3(in *jlexer.Lexer, out *SetBreakOnCSPViolationParams) {
  218. isTopLevel := in.IsStart()
  219. if in.IsNull() {
  220. if isTopLevel {
  221. in.Consumed()
  222. }
  223. in.Skip()
  224. return
  225. }
  226. in.Delim('{')
  227. for !in.IsDelim('}') {
  228. key := in.UnsafeFieldName(false)
  229. in.WantColon()
  230. if in.IsNull() {
  231. in.Skip()
  232. in.WantComma()
  233. continue
  234. }
  235. switch key {
  236. case "violationTypes":
  237. if in.IsNull() {
  238. in.Skip()
  239. out.ViolationTypes = nil
  240. } else {
  241. in.Delim('[')
  242. if out.ViolationTypes == nil {
  243. if !in.IsDelim(']') {
  244. out.ViolationTypes = make([]CSPViolationType, 0, 4)
  245. } else {
  246. out.ViolationTypes = []CSPViolationType{}
  247. }
  248. } else {
  249. out.ViolationTypes = (out.ViolationTypes)[:0]
  250. }
  251. for !in.IsDelim(']') {
  252. var v1 CSPViolationType
  253. (v1).UnmarshalEasyJSON(in)
  254. out.ViolationTypes = append(out.ViolationTypes, v1)
  255. in.WantComma()
  256. }
  257. in.Delim(']')
  258. }
  259. default:
  260. in.SkipRecursive()
  261. }
  262. in.WantComma()
  263. }
  264. in.Delim('}')
  265. if isTopLevel {
  266. in.Consumed()
  267. }
  268. }
  269. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger3(out *jwriter.Writer, in SetBreakOnCSPViolationParams) {
  270. out.RawByte('{')
  271. first := true
  272. _ = first
  273. {
  274. const prefix string = ",\"violationTypes\":"
  275. out.RawString(prefix[1:])
  276. if in.ViolationTypes == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  277. out.RawString("null")
  278. } else {
  279. out.RawByte('[')
  280. for v2, v3 := range in.ViolationTypes {
  281. if v2 > 0 {
  282. out.RawByte(',')
  283. }
  284. (v3).MarshalEasyJSON(out)
  285. }
  286. out.RawByte(']')
  287. }
  288. }
  289. out.RawByte('}')
  290. }
  291. // MarshalJSON supports json.Marshaler interface
  292. func (v SetBreakOnCSPViolationParams) MarshalJSON() ([]byte, error) {
  293. w := jwriter.Writer{}
  294. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger3(&w, v)
  295. return w.Buffer.BuildBytes(), w.Error
  296. }
  297. // MarshalEasyJSON supports easyjson.Marshaler interface
  298. func (v SetBreakOnCSPViolationParams) MarshalEasyJSON(w *jwriter.Writer) {
  299. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger3(w, v)
  300. }
  301. // UnmarshalJSON supports json.Unmarshaler interface
  302. func (v *SetBreakOnCSPViolationParams) UnmarshalJSON(data []byte) error {
  303. r := jlexer.Lexer{Data: data}
  304. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger3(&r, v)
  305. return r.Error()
  306. }
  307. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  308. func (v *SetBreakOnCSPViolationParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  309. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger3(l, v)
  310. }
  311. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger4(in *jlexer.Lexer, out *RemoveXHRBreakpointParams) {
  312. isTopLevel := in.IsStart()
  313. if in.IsNull() {
  314. if isTopLevel {
  315. in.Consumed()
  316. }
  317. in.Skip()
  318. return
  319. }
  320. in.Delim('{')
  321. for !in.IsDelim('}') {
  322. key := in.UnsafeFieldName(false)
  323. in.WantColon()
  324. if in.IsNull() {
  325. in.Skip()
  326. in.WantComma()
  327. continue
  328. }
  329. switch key {
  330. case "url":
  331. out.URL = string(in.String())
  332. default:
  333. in.SkipRecursive()
  334. }
  335. in.WantComma()
  336. }
  337. in.Delim('}')
  338. if isTopLevel {
  339. in.Consumed()
  340. }
  341. }
  342. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger4(out *jwriter.Writer, in RemoveXHRBreakpointParams) {
  343. out.RawByte('{')
  344. first := true
  345. _ = first
  346. {
  347. const prefix string = ",\"url\":"
  348. out.RawString(prefix[1:])
  349. out.String(string(in.URL))
  350. }
  351. out.RawByte('}')
  352. }
  353. // MarshalJSON supports json.Marshaler interface
  354. func (v RemoveXHRBreakpointParams) MarshalJSON() ([]byte, error) {
  355. w := jwriter.Writer{}
  356. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger4(&w, v)
  357. return w.Buffer.BuildBytes(), w.Error
  358. }
  359. // MarshalEasyJSON supports easyjson.Marshaler interface
  360. func (v RemoveXHRBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
  361. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger4(w, v)
  362. }
  363. // UnmarshalJSON supports json.Unmarshaler interface
  364. func (v *RemoveXHRBreakpointParams) UnmarshalJSON(data []byte) error {
  365. r := jlexer.Lexer{Data: data}
  366. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger4(&r, v)
  367. return r.Error()
  368. }
  369. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  370. func (v *RemoveXHRBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  371. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger4(l, v)
  372. }
  373. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger5(in *jlexer.Lexer, out *RemoveEventListenerBreakpointParams) {
  374. isTopLevel := in.IsStart()
  375. if in.IsNull() {
  376. if isTopLevel {
  377. in.Consumed()
  378. }
  379. in.Skip()
  380. return
  381. }
  382. in.Delim('{')
  383. for !in.IsDelim('}') {
  384. key := in.UnsafeFieldName(false)
  385. in.WantColon()
  386. if in.IsNull() {
  387. in.Skip()
  388. in.WantComma()
  389. continue
  390. }
  391. switch key {
  392. case "eventName":
  393. out.EventName = string(in.String())
  394. case "targetName":
  395. out.TargetName = string(in.String())
  396. default:
  397. in.SkipRecursive()
  398. }
  399. in.WantComma()
  400. }
  401. in.Delim('}')
  402. if isTopLevel {
  403. in.Consumed()
  404. }
  405. }
  406. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger5(out *jwriter.Writer, in RemoveEventListenerBreakpointParams) {
  407. out.RawByte('{')
  408. first := true
  409. _ = first
  410. {
  411. const prefix string = ",\"eventName\":"
  412. out.RawString(prefix[1:])
  413. out.String(string(in.EventName))
  414. }
  415. if in.TargetName != "" {
  416. const prefix string = ",\"targetName\":"
  417. out.RawString(prefix)
  418. out.String(string(in.TargetName))
  419. }
  420. out.RawByte('}')
  421. }
  422. // MarshalJSON supports json.Marshaler interface
  423. func (v RemoveEventListenerBreakpointParams) MarshalJSON() ([]byte, error) {
  424. w := jwriter.Writer{}
  425. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger5(&w, v)
  426. return w.Buffer.BuildBytes(), w.Error
  427. }
  428. // MarshalEasyJSON supports easyjson.Marshaler interface
  429. func (v RemoveEventListenerBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
  430. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger5(w, v)
  431. }
  432. // UnmarshalJSON supports json.Unmarshaler interface
  433. func (v *RemoveEventListenerBreakpointParams) UnmarshalJSON(data []byte) error {
  434. r := jlexer.Lexer{Data: data}
  435. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger5(&r, v)
  436. return r.Error()
  437. }
  438. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  439. func (v *RemoveEventListenerBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  440. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger5(l, v)
  441. }
  442. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger6(in *jlexer.Lexer, out *RemoveDOMBreakpointParams) {
  443. isTopLevel := in.IsStart()
  444. if in.IsNull() {
  445. if isTopLevel {
  446. in.Consumed()
  447. }
  448. in.Skip()
  449. return
  450. }
  451. in.Delim('{')
  452. for !in.IsDelim('}') {
  453. key := in.UnsafeFieldName(false)
  454. in.WantColon()
  455. if in.IsNull() {
  456. in.Skip()
  457. in.WantComma()
  458. continue
  459. }
  460. switch key {
  461. case "nodeId":
  462. (out.NodeID).UnmarshalEasyJSON(in)
  463. case "type":
  464. (out.Type).UnmarshalEasyJSON(in)
  465. default:
  466. in.SkipRecursive()
  467. }
  468. in.WantComma()
  469. }
  470. in.Delim('}')
  471. if isTopLevel {
  472. in.Consumed()
  473. }
  474. }
  475. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger6(out *jwriter.Writer, in RemoveDOMBreakpointParams) {
  476. out.RawByte('{')
  477. first := true
  478. _ = first
  479. {
  480. const prefix string = ",\"nodeId\":"
  481. out.RawString(prefix[1:])
  482. out.Int64(int64(in.NodeID))
  483. }
  484. {
  485. const prefix string = ",\"type\":"
  486. out.RawString(prefix)
  487. (in.Type).MarshalEasyJSON(out)
  488. }
  489. out.RawByte('}')
  490. }
  491. // MarshalJSON supports json.Marshaler interface
  492. func (v RemoveDOMBreakpointParams) MarshalJSON() ([]byte, error) {
  493. w := jwriter.Writer{}
  494. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger6(&w, v)
  495. return w.Buffer.BuildBytes(), w.Error
  496. }
  497. // MarshalEasyJSON supports easyjson.Marshaler interface
  498. func (v RemoveDOMBreakpointParams) MarshalEasyJSON(w *jwriter.Writer) {
  499. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger6(w, v)
  500. }
  501. // UnmarshalJSON supports json.Unmarshaler interface
  502. func (v *RemoveDOMBreakpointParams) UnmarshalJSON(data []byte) error {
  503. r := jlexer.Lexer{Data: data}
  504. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger6(&r, v)
  505. return r.Error()
  506. }
  507. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  508. func (v *RemoveDOMBreakpointParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  509. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger6(l, v)
  510. }
  511. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger7(in *jlexer.Lexer, out *GetEventListenersReturns) {
  512. isTopLevel := in.IsStart()
  513. if in.IsNull() {
  514. if isTopLevel {
  515. in.Consumed()
  516. }
  517. in.Skip()
  518. return
  519. }
  520. in.Delim('{')
  521. for !in.IsDelim('}') {
  522. key := in.UnsafeFieldName(false)
  523. in.WantColon()
  524. if in.IsNull() {
  525. in.Skip()
  526. in.WantComma()
  527. continue
  528. }
  529. switch key {
  530. case "listeners":
  531. if in.IsNull() {
  532. in.Skip()
  533. out.Listeners = nil
  534. } else {
  535. in.Delim('[')
  536. if out.Listeners == nil {
  537. if !in.IsDelim(']') {
  538. out.Listeners = make([]*EventListener, 0, 8)
  539. } else {
  540. out.Listeners = []*EventListener{}
  541. }
  542. } else {
  543. out.Listeners = (out.Listeners)[:0]
  544. }
  545. for !in.IsDelim(']') {
  546. var v4 *EventListener
  547. if in.IsNull() {
  548. in.Skip()
  549. v4 = nil
  550. } else {
  551. if v4 == nil {
  552. v4 = new(EventListener)
  553. }
  554. (*v4).UnmarshalEasyJSON(in)
  555. }
  556. out.Listeners = append(out.Listeners, v4)
  557. in.WantComma()
  558. }
  559. in.Delim(']')
  560. }
  561. default:
  562. in.SkipRecursive()
  563. }
  564. in.WantComma()
  565. }
  566. in.Delim('}')
  567. if isTopLevel {
  568. in.Consumed()
  569. }
  570. }
  571. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger7(out *jwriter.Writer, in GetEventListenersReturns) {
  572. out.RawByte('{')
  573. first := true
  574. _ = first
  575. if len(in.Listeners) != 0 {
  576. const prefix string = ",\"listeners\":"
  577. first = false
  578. out.RawString(prefix[1:])
  579. {
  580. out.RawByte('[')
  581. for v5, v6 := range in.Listeners {
  582. if v5 > 0 {
  583. out.RawByte(',')
  584. }
  585. if v6 == nil {
  586. out.RawString("null")
  587. } else {
  588. (*v6).MarshalEasyJSON(out)
  589. }
  590. }
  591. out.RawByte(']')
  592. }
  593. }
  594. out.RawByte('}')
  595. }
  596. // MarshalJSON supports json.Marshaler interface
  597. func (v GetEventListenersReturns) MarshalJSON() ([]byte, error) {
  598. w := jwriter.Writer{}
  599. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger7(&w, v)
  600. return w.Buffer.BuildBytes(), w.Error
  601. }
  602. // MarshalEasyJSON supports easyjson.Marshaler interface
  603. func (v GetEventListenersReturns) MarshalEasyJSON(w *jwriter.Writer) {
  604. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger7(w, v)
  605. }
  606. // UnmarshalJSON supports json.Unmarshaler interface
  607. func (v *GetEventListenersReturns) UnmarshalJSON(data []byte) error {
  608. r := jlexer.Lexer{Data: data}
  609. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger7(&r, v)
  610. return r.Error()
  611. }
  612. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  613. func (v *GetEventListenersReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  614. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger7(l, v)
  615. }
  616. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger8(in *jlexer.Lexer, out *GetEventListenersParams) {
  617. isTopLevel := in.IsStart()
  618. if in.IsNull() {
  619. if isTopLevel {
  620. in.Consumed()
  621. }
  622. in.Skip()
  623. return
  624. }
  625. in.Delim('{')
  626. for !in.IsDelim('}') {
  627. key := in.UnsafeFieldName(false)
  628. in.WantColon()
  629. if in.IsNull() {
  630. in.Skip()
  631. in.WantComma()
  632. continue
  633. }
  634. switch key {
  635. case "objectId":
  636. out.ObjectID = runtime.RemoteObjectID(in.String())
  637. case "depth":
  638. out.Depth = int64(in.Int64())
  639. case "pierce":
  640. out.Pierce = bool(in.Bool())
  641. default:
  642. in.SkipRecursive()
  643. }
  644. in.WantComma()
  645. }
  646. in.Delim('}')
  647. if isTopLevel {
  648. in.Consumed()
  649. }
  650. }
  651. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger8(out *jwriter.Writer, in GetEventListenersParams) {
  652. out.RawByte('{')
  653. first := true
  654. _ = first
  655. {
  656. const prefix string = ",\"objectId\":"
  657. out.RawString(prefix[1:])
  658. out.String(string(in.ObjectID))
  659. }
  660. if in.Depth != 0 {
  661. const prefix string = ",\"depth\":"
  662. out.RawString(prefix)
  663. out.Int64(int64(in.Depth))
  664. }
  665. if in.Pierce {
  666. const prefix string = ",\"pierce\":"
  667. out.RawString(prefix)
  668. out.Bool(bool(in.Pierce))
  669. }
  670. out.RawByte('}')
  671. }
  672. // MarshalJSON supports json.Marshaler interface
  673. func (v GetEventListenersParams) MarshalJSON() ([]byte, error) {
  674. w := jwriter.Writer{}
  675. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger8(&w, v)
  676. return w.Buffer.BuildBytes(), w.Error
  677. }
  678. // MarshalEasyJSON supports easyjson.Marshaler interface
  679. func (v GetEventListenersParams) MarshalEasyJSON(w *jwriter.Writer) {
  680. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger8(w, v)
  681. }
  682. // UnmarshalJSON supports json.Unmarshaler interface
  683. func (v *GetEventListenersParams) UnmarshalJSON(data []byte) error {
  684. r := jlexer.Lexer{Data: data}
  685. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger8(&r, v)
  686. return r.Error()
  687. }
  688. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  689. func (v *GetEventListenersParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  690. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger8(l, v)
  691. }
  692. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger9(in *jlexer.Lexer, out *EventListener) {
  693. isTopLevel := in.IsStart()
  694. if in.IsNull() {
  695. if isTopLevel {
  696. in.Consumed()
  697. }
  698. in.Skip()
  699. return
  700. }
  701. in.Delim('{')
  702. for !in.IsDelim('}') {
  703. key := in.UnsafeFieldName(false)
  704. in.WantColon()
  705. if in.IsNull() {
  706. in.Skip()
  707. in.WantComma()
  708. continue
  709. }
  710. switch key {
  711. case "type":
  712. out.Type = string(in.String())
  713. case "useCapture":
  714. out.UseCapture = bool(in.Bool())
  715. case "passive":
  716. out.Passive = bool(in.Bool())
  717. case "once":
  718. out.Once = bool(in.Bool())
  719. case "scriptId":
  720. out.ScriptID = runtime.ScriptID(in.String())
  721. case "lineNumber":
  722. out.LineNumber = int64(in.Int64())
  723. case "columnNumber":
  724. out.ColumnNumber = int64(in.Int64())
  725. case "handler":
  726. if in.IsNull() {
  727. in.Skip()
  728. out.Handler = nil
  729. } else {
  730. if out.Handler == nil {
  731. out.Handler = new(runtime.RemoteObject)
  732. }
  733. (*out.Handler).UnmarshalEasyJSON(in)
  734. }
  735. case "originalHandler":
  736. if in.IsNull() {
  737. in.Skip()
  738. out.OriginalHandler = nil
  739. } else {
  740. if out.OriginalHandler == nil {
  741. out.OriginalHandler = new(runtime.RemoteObject)
  742. }
  743. (*out.OriginalHandler).UnmarshalEasyJSON(in)
  744. }
  745. case "backendNodeId":
  746. (out.BackendNodeID).UnmarshalEasyJSON(in)
  747. default:
  748. in.SkipRecursive()
  749. }
  750. in.WantComma()
  751. }
  752. in.Delim('}')
  753. if isTopLevel {
  754. in.Consumed()
  755. }
  756. }
  757. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger9(out *jwriter.Writer, in EventListener) {
  758. out.RawByte('{')
  759. first := true
  760. _ = first
  761. {
  762. const prefix string = ",\"type\":"
  763. out.RawString(prefix[1:])
  764. out.String(string(in.Type))
  765. }
  766. {
  767. const prefix string = ",\"useCapture\":"
  768. out.RawString(prefix)
  769. out.Bool(bool(in.UseCapture))
  770. }
  771. {
  772. const prefix string = ",\"passive\":"
  773. out.RawString(prefix)
  774. out.Bool(bool(in.Passive))
  775. }
  776. {
  777. const prefix string = ",\"once\":"
  778. out.RawString(prefix)
  779. out.Bool(bool(in.Once))
  780. }
  781. {
  782. const prefix string = ",\"scriptId\":"
  783. out.RawString(prefix)
  784. out.String(string(in.ScriptID))
  785. }
  786. {
  787. const prefix string = ",\"lineNumber\":"
  788. out.RawString(prefix)
  789. out.Int64(int64(in.LineNumber))
  790. }
  791. {
  792. const prefix string = ",\"columnNumber\":"
  793. out.RawString(prefix)
  794. out.Int64(int64(in.ColumnNumber))
  795. }
  796. if in.Handler != nil {
  797. const prefix string = ",\"handler\":"
  798. out.RawString(prefix)
  799. (*in.Handler).MarshalEasyJSON(out)
  800. }
  801. if in.OriginalHandler != nil {
  802. const prefix string = ",\"originalHandler\":"
  803. out.RawString(prefix)
  804. (*in.OriginalHandler).MarshalEasyJSON(out)
  805. }
  806. if in.BackendNodeID != 0 {
  807. const prefix string = ",\"backendNodeId\":"
  808. out.RawString(prefix)
  809. out.Int64(int64(in.BackendNodeID))
  810. }
  811. out.RawByte('}')
  812. }
  813. // MarshalJSON supports json.Marshaler interface
  814. func (v EventListener) MarshalJSON() ([]byte, error) {
  815. w := jwriter.Writer{}
  816. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger9(&w, v)
  817. return w.Buffer.BuildBytes(), w.Error
  818. }
  819. // MarshalEasyJSON supports easyjson.Marshaler interface
  820. func (v EventListener) MarshalEasyJSON(w *jwriter.Writer) {
  821. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDomdebugger9(w, v)
  822. }
  823. // UnmarshalJSON supports json.Unmarshaler interface
  824. func (v *EventListener) UnmarshalJSON(data []byte) error {
  825. r := jlexer.Lexer{Data: data}
  826. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger9(&r, v)
  827. return r.Error()
  828. }
  829. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  830. func (v *EventListener) UnmarshalEasyJSON(l *jlexer.Lexer) {
  831. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDomdebugger9(l, v)
  832. }