easyjson.go 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package backgroundservice
  3. import (
  4. json "encoding/json"
  5. cdp "github.com/chromedp/cdproto/cdp"
  6. serviceworker "github.com/chromedp/cdproto/serviceworker"
  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 easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice(in *jlexer.Lexer, out *StopObservingParams) {
  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 "service":
  38. (out.Service).UnmarshalEasyJSON(in)
  39. default:
  40. in.SkipRecursive()
  41. }
  42. in.WantComma()
  43. }
  44. in.Delim('}')
  45. if isTopLevel {
  46. in.Consumed()
  47. }
  48. }
  49. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice(out *jwriter.Writer, in StopObservingParams) {
  50. out.RawByte('{')
  51. first := true
  52. _ = first
  53. {
  54. const prefix string = ",\"service\":"
  55. out.RawString(prefix[1:])
  56. (in.Service).MarshalEasyJSON(out)
  57. }
  58. out.RawByte('}')
  59. }
  60. // MarshalJSON supports json.Marshaler interface
  61. func (v StopObservingParams) MarshalJSON() ([]byte, error) {
  62. w := jwriter.Writer{}
  63. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice(&w, v)
  64. return w.Buffer.BuildBytes(), w.Error
  65. }
  66. // MarshalEasyJSON supports easyjson.Marshaler interface
  67. func (v StopObservingParams) MarshalEasyJSON(w *jwriter.Writer) {
  68. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice(w, v)
  69. }
  70. // UnmarshalJSON supports json.Unmarshaler interface
  71. func (v *StopObservingParams) UnmarshalJSON(data []byte) error {
  72. r := jlexer.Lexer{Data: data}
  73. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice(&r, v)
  74. return r.Error()
  75. }
  76. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  77. func (v *StopObservingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  78. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice(l, v)
  79. }
  80. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice1(in *jlexer.Lexer, out *StartObservingParams) {
  81. isTopLevel := in.IsStart()
  82. if in.IsNull() {
  83. if isTopLevel {
  84. in.Consumed()
  85. }
  86. in.Skip()
  87. return
  88. }
  89. in.Delim('{')
  90. for !in.IsDelim('}') {
  91. key := in.UnsafeFieldName(false)
  92. in.WantColon()
  93. if in.IsNull() {
  94. in.Skip()
  95. in.WantComma()
  96. continue
  97. }
  98. switch key {
  99. case "service":
  100. (out.Service).UnmarshalEasyJSON(in)
  101. default:
  102. in.SkipRecursive()
  103. }
  104. in.WantComma()
  105. }
  106. in.Delim('}')
  107. if isTopLevel {
  108. in.Consumed()
  109. }
  110. }
  111. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice1(out *jwriter.Writer, in StartObservingParams) {
  112. out.RawByte('{')
  113. first := true
  114. _ = first
  115. {
  116. const prefix string = ",\"service\":"
  117. out.RawString(prefix[1:])
  118. (in.Service).MarshalEasyJSON(out)
  119. }
  120. out.RawByte('}')
  121. }
  122. // MarshalJSON supports json.Marshaler interface
  123. func (v StartObservingParams) MarshalJSON() ([]byte, error) {
  124. w := jwriter.Writer{}
  125. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice1(&w, v)
  126. return w.Buffer.BuildBytes(), w.Error
  127. }
  128. // MarshalEasyJSON supports easyjson.Marshaler interface
  129. func (v StartObservingParams) MarshalEasyJSON(w *jwriter.Writer) {
  130. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice1(w, v)
  131. }
  132. // UnmarshalJSON supports json.Unmarshaler interface
  133. func (v *StartObservingParams) UnmarshalJSON(data []byte) error {
  134. r := jlexer.Lexer{Data: data}
  135. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice1(&r, v)
  136. return r.Error()
  137. }
  138. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  139. func (v *StartObservingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  140. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice1(l, v)
  141. }
  142. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice2(in *jlexer.Lexer, out *SetRecordingParams) {
  143. isTopLevel := in.IsStart()
  144. if in.IsNull() {
  145. if isTopLevel {
  146. in.Consumed()
  147. }
  148. in.Skip()
  149. return
  150. }
  151. in.Delim('{')
  152. for !in.IsDelim('}') {
  153. key := in.UnsafeFieldName(false)
  154. in.WantColon()
  155. if in.IsNull() {
  156. in.Skip()
  157. in.WantComma()
  158. continue
  159. }
  160. switch key {
  161. case "shouldRecord":
  162. out.ShouldRecord = bool(in.Bool())
  163. case "service":
  164. (out.Service).UnmarshalEasyJSON(in)
  165. default:
  166. in.SkipRecursive()
  167. }
  168. in.WantComma()
  169. }
  170. in.Delim('}')
  171. if isTopLevel {
  172. in.Consumed()
  173. }
  174. }
  175. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice2(out *jwriter.Writer, in SetRecordingParams) {
  176. out.RawByte('{')
  177. first := true
  178. _ = first
  179. {
  180. const prefix string = ",\"shouldRecord\":"
  181. out.RawString(prefix[1:])
  182. out.Bool(bool(in.ShouldRecord))
  183. }
  184. {
  185. const prefix string = ",\"service\":"
  186. out.RawString(prefix)
  187. (in.Service).MarshalEasyJSON(out)
  188. }
  189. out.RawByte('}')
  190. }
  191. // MarshalJSON supports json.Marshaler interface
  192. func (v SetRecordingParams) MarshalJSON() ([]byte, error) {
  193. w := jwriter.Writer{}
  194. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice2(&w, v)
  195. return w.Buffer.BuildBytes(), w.Error
  196. }
  197. // MarshalEasyJSON supports easyjson.Marshaler interface
  198. func (v SetRecordingParams) MarshalEasyJSON(w *jwriter.Writer) {
  199. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice2(w, v)
  200. }
  201. // UnmarshalJSON supports json.Unmarshaler interface
  202. func (v *SetRecordingParams) UnmarshalJSON(data []byte) error {
  203. r := jlexer.Lexer{Data: data}
  204. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice2(&r, v)
  205. return r.Error()
  206. }
  207. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  208. func (v *SetRecordingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  209. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice2(l, v)
  210. }
  211. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice3(in *jlexer.Lexer, out *EventRecordingStateChanged) {
  212. isTopLevel := in.IsStart()
  213. if in.IsNull() {
  214. if isTopLevel {
  215. in.Consumed()
  216. }
  217. in.Skip()
  218. return
  219. }
  220. in.Delim('{')
  221. for !in.IsDelim('}') {
  222. key := in.UnsafeFieldName(false)
  223. in.WantColon()
  224. if in.IsNull() {
  225. in.Skip()
  226. in.WantComma()
  227. continue
  228. }
  229. switch key {
  230. case "isRecording":
  231. out.IsRecording = bool(in.Bool())
  232. case "service":
  233. (out.Service).UnmarshalEasyJSON(in)
  234. default:
  235. in.SkipRecursive()
  236. }
  237. in.WantComma()
  238. }
  239. in.Delim('}')
  240. if isTopLevel {
  241. in.Consumed()
  242. }
  243. }
  244. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice3(out *jwriter.Writer, in EventRecordingStateChanged) {
  245. out.RawByte('{')
  246. first := true
  247. _ = first
  248. {
  249. const prefix string = ",\"isRecording\":"
  250. out.RawString(prefix[1:])
  251. out.Bool(bool(in.IsRecording))
  252. }
  253. {
  254. const prefix string = ",\"service\":"
  255. out.RawString(prefix)
  256. (in.Service).MarshalEasyJSON(out)
  257. }
  258. out.RawByte('}')
  259. }
  260. // MarshalJSON supports json.Marshaler interface
  261. func (v EventRecordingStateChanged) MarshalJSON() ([]byte, error) {
  262. w := jwriter.Writer{}
  263. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice3(&w, v)
  264. return w.Buffer.BuildBytes(), w.Error
  265. }
  266. // MarshalEasyJSON supports easyjson.Marshaler interface
  267. func (v EventRecordingStateChanged) MarshalEasyJSON(w *jwriter.Writer) {
  268. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice3(w, v)
  269. }
  270. // UnmarshalJSON supports json.Unmarshaler interface
  271. func (v *EventRecordingStateChanged) UnmarshalJSON(data []byte) error {
  272. r := jlexer.Lexer{Data: data}
  273. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice3(&r, v)
  274. return r.Error()
  275. }
  276. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  277. func (v *EventRecordingStateChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
  278. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice3(l, v)
  279. }
  280. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice4(in *jlexer.Lexer, out *EventMetadata) {
  281. isTopLevel := in.IsStart()
  282. if in.IsNull() {
  283. if isTopLevel {
  284. in.Consumed()
  285. }
  286. in.Skip()
  287. return
  288. }
  289. in.Delim('{')
  290. for !in.IsDelim('}') {
  291. key := in.UnsafeFieldName(false)
  292. in.WantColon()
  293. if in.IsNull() {
  294. in.Skip()
  295. in.WantComma()
  296. continue
  297. }
  298. switch key {
  299. case "key":
  300. out.Key = string(in.String())
  301. case "value":
  302. out.Value = string(in.String())
  303. default:
  304. in.SkipRecursive()
  305. }
  306. in.WantComma()
  307. }
  308. in.Delim('}')
  309. if isTopLevel {
  310. in.Consumed()
  311. }
  312. }
  313. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice4(out *jwriter.Writer, in EventMetadata) {
  314. out.RawByte('{')
  315. first := true
  316. _ = first
  317. {
  318. const prefix string = ",\"key\":"
  319. out.RawString(prefix[1:])
  320. out.String(string(in.Key))
  321. }
  322. {
  323. const prefix string = ",\"value\":"
  324. out.RawString(prefix)
  325. out.String(string(in.Value))
  326. }
  327. out.RawByte('}')
  328. }
  329. // MarshalJSON supports json.Marshaler interface
  330. func (v EventMetadata) MarshalJSON() ([]byte, error) {
  331. w := jwriter.Writer{}
  332. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice4(&w, v)
  333. return w.Buffer.BuildBytes(), w.Error
  334. }
  335. // MarshalEasyJSON supports easyjson.Marshaler interface
  336. func (v EventMetadata) MarshalEasyJSON(w *jwriter.Writer) {
  337. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice4(w, v)
  338. }
  339. // UnmarshalJSON supports json.Unmarshaler interface
  340. func (v *EventMetadata) UnmarshalJSON(data []byte) error {
  341. r := jlexer.Lexer{Data: data}
  342. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice4(&r, v)
  343. return r.Error()
  344. }
  345. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  346. func (v *EventMetadata) UnmarshalEasyJSON(l *jlexer.Lexer) {
  347. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice4(l, v)
  348. }
  349. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice5(in *jlexer.Lexer, out *EventBackgroundServiceEventReceived) {
  350. isTopLevel := in.IsStart()
  351. if in.IsNull() {
  352. if isTopLevel {
  353. in.Consumed()
  354. }
  355. in.Skip()
  356. return
  357. }
  358. in.Delim('{')
  359. for !in.IsDelim('}') {
  360. key := in.UnsafeFieldName(false)
  361. in.WantColon()
  362. if in.IsNull() {
  363. in.Skip()
  364. in.WantComma()
  365. continue
  366. }
  367. switch key {
  368. case "backgroundServiceEvent":
  369. if in.IsNull() {
  370. in.Skip()
  371. out.BackgroundServiceEvent = nil
  372. } else {
  373. if out.BackgroundServiceEvent == nil {
  374. out.BackgroundServiceEvent = new(Event)
  375. }
  376. (*out.BackgroundServiceEvent).UnmarshalEasyJSON(in)
  377. }
  378. default:
  379. in.SkipRecursive()
  380. }
  381. in.WantComma()
  382. }
  383. in.Delim('}')
  384. if isTopLevel {
  385. in.Consumed()
  386. }
  387. }
  388. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice5(out *jwriter.Writer, in EventBackgroundServiceEventReceived) {
  389. out.RawByte('{')
  390. first := true
  391. _ = first
  392. {
  393. const prefix string = ",\"backgroundServiceEvent\":"
  394. out.RawString(prefix[1:])
  395. if in.BackgroundServiceEvent == nil {
  396. out.RawString("null")
  397. } else {
  398. (*in.BackgroundServiceEvent).MarshalEasyJSON(out)
  399. }
  400. }
  401. out.RawByte('}')
  402. }
  403. // MarshalJSON supports json.Marshaler interface
  404. func (v EventBackgroundServiceEventReceived) MarshalJSON() ([]byte, error) {
  405. w := jwriter.Writer{}
  406. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice5(&w, v)
  407. return w.Buffer.BuildBytes(), w.Error
  408. }
  409. // MarshalEasyJSON supports easyjson.Marshaler interface
  410. func (v EventBackgroundServiceEventReceived) MarshalEasyJSON(w *jwriter.Writer) {
  411. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice5(w, v)
  412. }
  413. // UnmarshalJSON supports json.Unmarshaler interface
  414. func (v *EventBackgroundServiceEventReceived) UnmarshalJSON(data []byte) error {
  415. r := jlexer.Lexer{Data: data}
  416. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice5(&r, v)
  417. return r.Error()
  418. }
  419. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  420. func (v *EventBackgroundServiceEventReceived) UnmarshalEasyJSON(l *jlexer.Lexer) {
  421. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice5(l, v)
  422. }
  423. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice6(in *jlexer.Lexer, out *Event) {
  424. isTopLevel := in.IsStart()
  425. if in.IsNull() {
  426. if isTopLevel {
  427. in.Consumed()
  428. }
  429. in.Skip()
  430. return
  431. }
  432. in.Delim('{')
  433. for !in.IsDelim('}') {
  434. key := in.UnsafeFieldName(false)
  435. in.WantColon()
  436. if in.IsNull() {
  437. in.Skip()
  438. in.WantComma()
  439. continue
  440. }
  441. switch key {
  442. case "timestamp":
  443. if in.IsNull() {
  444. in.Skip()
  445. out.Timestamp = nil
  446. } else {
  447. if out.Timestamp == nil {
  448. out.Timestamp = new(cdp.TimeSinceEpoch)
  449. }
  450. (*out.Timestamp).UnmarshalEasyJSON(in)
  451. }
  452. case "origin":
  453. out.Origin = string(in.String())
  454. case "serviceWorkerRegistrationId":
  455. out.ServiceWorkerRegistrationID = serviceworker.RegistrationID(in.String())
  456. case "service":
  457. (out.Service).UnmarshalEasyJSON(in)
  458. case "eventName":
  459. out.EventName = string(in.String())
  460. case "instanceId":
  461. out.InstanceID = string(in.String())
  462. case "eventMetadata":
  463. if in.IsNull() {
  464. in.Skip()
  465. out.EventMetadata = nil
  466. } else {
  467. in.Delim('[')
  468. if out.EventMetadata == nil {
  469. if !in.IsDelim(']') {
  470. out.EventMetadata = make([]*EventMetadata, 0, 8)
  471. } else {
  472. out.EventMetadata = []*EventMetadata{}
  473. }
  474. } else {
  475. out.EventMetadata = (out.EventMetadata)[:0]
  476. }
  477. for !in.IsDelim(']') {
  478. var v1 *EventMetadata
  479. if in.IsNull() {
  480. in.Skip()
  481. v1 = nil
  482. } else {
  483. if v1 == nil {
  484. v1 = new(EventMetadata)
  485. }
  486. (*v1).UnmarshalEasyJSON(in)
  487. }
  488. out.EventMetadata = append(out.EventMetadata, v1)
  489. in.WantComma()
  490. }
  491. in.Delim(']')
  492. }
  493. case "storageKey":
  494. out.StorageKey = string(in.String())
  495. default:
  496. in.SkipRecursive()
  497. }
  498. in.WantComma()
  499. }
  500. in.Delim('}')
  501. if isTopLevel {
  502. in.Consumed()
  503. }
  504. }
  505. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice6(out *jwriter.Writer, in Event) {
  506. out.RawByte('{')
  507. first := true
  508. _ = first
  509. {
  510. const prefix string = ",\"timestamp\":"
  511. out.RawString(prefix[1:])
  512. if in.Timestamp == nil {
  513. out.RawString("null")
  514. } else {
  515. (*in.Timestamp).MarshalEasyJSON(out)
  516. }
  517. }
  518. {
  519. const prefix string = ",\"origin\":"
  520. out.RawString(prefix)
  521. out.String(string(in.Origin))
  522. }
  523. {
  524. const prefix string = ",\"serviceWorkerRegistrationId\":"
  525. out.RawString(prefix)
  526. out.String(string(in.ServiceWorkerRegistrationID))
  527. }
  528. {
  529. const prefix string = ",\"service\":"
  530. out.RawString(prefix)
  531. (in.Service).MarshalEasyJSON(out)
  532. }
  533. {
  534. const prefix string = ",\"eventName\":"
  535. out.RawString(prefix)
  536. out.String(string(in.EventName))
  537. }
  538. {
  539. const prefix string = ",\"instanceId\":"
  540. out.RawString(prefix)
  541. out.String(string(in.InstanceID))
  542. }
  543. {
  544. const prefix string = ",\"eventMetadata\":"
  545. out.RawString(prefix)
  546. if in.EventMetadata == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  547. out.RawString("null")
  548. } else {
  549. out.RawByte('[')
  550. for v2, v3 := range in.EventMetadata {
  551. if v2 > 0 {
  552. out.RawByte(',')
  553. }
  554. if v3 == nil {
  555. out.RawString("null")
  556. } else {
  557. (*v3).MarshalEasyJSON(out)
  558. }
  559. }
  560. out.RawByte(']')
  561. }
  562. }
  563. {
  564. const prefix string = ",\"storageKey\":"
  565. out.RawString(prefix)
  566. out.String(string(in.StorageKey))
  567. }
  568. out.RawByte('}')
  569. }
  570. // MarshalJSON supports json.Marshaler interface
  571. func (v Event) MarshalJSON() ([]byte, error) {
  572. w := jwriter.Writer{}
  573. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice6(&w, v)
  574. return w.Buffer.BuildBytes(), w.Error
  575. }
  576. // MarshalEasyJSON supports easyjson.Marshaler interface
  577. func (v Event) MarshalEasyJSON(w *jwriter.Writer) {
  578. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice6(w, v)
  579. }
  580. // UnmarshalJSON supports json.Unmarshaler interface
  581. func (v *Event) UnmarshalJSON(data []byte) error {
  582. r := jlexer.Lexer{Data: data}
  583. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice6(&r, v)
  584. return r.Error()
  585. }
  586. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  587. func (v *Event) UnmarshalEasyJSON(l *jlexer.Lexer) {
  588. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice6(l, v)
  589. }
  590. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice7(in *jlexer.Lexer, out *ClearEventsParams) {
  591. isTopLevel := in.IsStart()
  592. if in.IsNull() {
  593. if isTopLevel {
  594. in.Consumed()
  595. }
  596. in.Skip()
  597. return
  598. }
  599. in.Delim('{')
  600. for !in.IsDelim('}') {
  601. key := in.UnsafeFieldName(false)
  602. in.WantColon()
  603. if in.IsNull() {
  604. in.Skip()
  605. in.WantComma()
  606. continue
  607. }
  608. switch key {
  609. case "service":
  610. (out.Service).UnmarshalEasyJSON(in)
  611. default:
  612. in.SkipRecursive()
  613. }
  614. in.WantComma()
  615. }
  616. in.Delim('}')
  617. if isTopLevel {
  618. in.Consumed()
  619. }
  620. }
  621. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice7(out *jwriter.Writer, in ClearEventsParams) {
  622. out.RawByte('{')
  623. first := true
  624. _ = first
  625. {
  626. const prefix string = ",\"service\":"
  627. out.RawString(prefix[1:])
  628. (in.Service).MarshalEasyJSON(out)
  629. }
  630. out.RawByte('}')
  631. }
  632. // MarshalJSON supports json.Marshaler interface
  633. func (v ClearEventsParams) MarshalJSON() ([]byte, error) {
  634. w := jwriter.Writer{}
  635. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice7(&w, v)
  636. return w.Buffer.BuildBytes(), w.Error
  637. }
  638. // MarshalEasyJSON supports easyjson.Marshaler interface
  639. func (v ClearEventsParams) MarshalEasyJSON(w *jwriter.Writer) {
  640. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBackgroundservice7(w, v)
  641. }
  642. // UnmarshalJSON supports json.Unmarshaler interface
  643. func (v *ClearEventsParams) UnmarshalJSON(data []byte) error {
  644. r := jlexer.Lexer{Data: data}
  645. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice7(&r, v)
  646. return r.Error()
  647. }
  648. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  649. func (v *ClearEventsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  650. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBackgroundservice7(l, v)
  651. }