easyjson.go 48 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package layertree
  3. import (
  4. json "encoding/json"
  5. dom "github.com/chromedp/cdproto/dom"
  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 easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree(in *jlexer.Lexer, out *StickyPositionConstraint) {
  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 "stickyBoxRect":
  37. if in.IsNull() {
  38. in.Skip()
  39. out.StickyBoxRect = nil
  40. } else {
  41. if out.StickyBoxRect == nil {
  42. out.StickyBoxRect = new(dom.Rect)
  43. }
  44. (*out.StickyBoxRect).UnmarshalEasyJSON(in)
  45. }
  46. case "containingBlockRect":
  47. if in.IsNull() {
  48. in.Skip()
  49. out.ContainingBlockRect = nil
  50. } else {
  51. if out.ContainingBlockRect == nil {
  52. out.ContainingBlockRect = new(dom.Rect)
  53. }
  54. (*out.ContainingBlockRect).UnmarshalEasyJSON(in)
  55. }
  56. case "nearestLayerShiftingStickyBox":
  57. out.NearestLayerShiftingStickyBox = LayerID(in.String())
  58. case "nearestLayerShiftingContainingBlock":
  59. out.NearestLayerShiftingContainingBlock = LayerID(in.String())
  60. default:
  61. in.SkipRecursive()
  62. }
  63. in.WantComma()
  64. }
  65. in.Delim('}')
  66. if isTopLevel {
  67. in.Consumed()
  68. }
  69. }
  70. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree(out *jwriter.Writer, in StickyPositionConstraint) {
  71. out.RawByte('{')
  72. first := true
  73. _ = first
  74. {
  75. const prefix string = ",\"stickyBoxRect\":"
  76. out.RawString(prefix[1:])
  77. if in.StickyBoxRect == nil {
  78. out.RawString("null")
  79. } else {
  80. (*in.StickyBoxRect).MarshalEasyJSON(out)
  81. }
  82. }
  83. {
  84. const prefix string = ",\"containingBlockRect\":"
  85. out.RawString(prefix)
  86. if in.ContainingBlockRect == nil {
  87. out.RawString("null")
  88. } else {
  89. (*in.ContainingBlockRect).MarshalEasyJSON(out)
  90. }
  91. }
  92. if in.NearestLayerShiftingStickyBox != "" {
  93. const prefix string = ",\"nearestLayerShiftingStickyBox\":"
  94. out.RawString(prefix)
  95. out.String(string(in.NearestLayerShiftingStickyBox))
  96. }
  97. if in.NearestLayerShiftingContainingBlock != "" {
  98. const prefix string = ",\"nearestLayerShiftingContainingBlock\":"
  99. out.RawString(prefix)
  100. out.String(string(in.NearestLayerShiftingContainingBlock))
  101. }
  102. out.RawByte('}')
  103. }
  104. // MarshalJSON supports json.Marshaler interface
  105. func (v StickyPositionConstraint) MarshalJSON() ([]byte, error) {
  106. w := jwriter.Writer{}
  107. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree(&w, v)
  108. return w.Buffer.BuildBytes(), w.Error
  109. }
  110. // MarshalEasyJSON supports easyjson.Marshaler interface
  111. func (v StickyPositionConstraint) MarshalEasyJSON(w *jwriter.Writer) {
  112. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree(w, v)
  113. }
  114. // UnmarshalJSON supports json.Unmarshaler interface
  115. func (v *StickyPositionConstraint) UnmarshalJSON(data []byte) error {
  116. r := jlexer.Lexer{Data: data}
  117. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree(&r, v)
  118. return r.Error()
  119. }
  120. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  121. func (v *StickyPositionConstraint) UnmarshalEasyJSON(l *jlexer.Lexer) {
  122. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree(l, v)
  123. }
  124. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree1(in *jlexer.Lexer, out *SnapshotCommandLogReturns) {
  125. isTopLevel := in.IsStart()
  126. if in.IsNull() {
  127. if isTopLevel {
  128. in.Consumed()
  129. }
  130. in.Skip()
  131. return
  132. }
  133. in.Delim('{')
  134. for !in.IsDelim('}') {
  135. key := in.UnsafeFieldName(false)
  136. in.WantColon()
  137. if in.IsNull() {
  138. in.Skip()
  139. in.WantComma()
  140. continue
  141. }
  142. switch key {
  143. case "commandLog":
  144. if in.IsNull() {
  145. in.Skip()
  146. out.CommandLog = nil
  147. } else {
  148. in.Delim('[')
  149. if out.CommandLog == nil {
  150. if !in.IsDelim(']') {
  151. out.CommandLog = make([]easyjson.RawMessage, 0, 2)
  152. } else {
  153. out.CommandLog = []easyjson.RawMessage{}
  154. }
  155. } else {
  156. out.CommandLog = (out.CommandLog)[:0]
  157. }
  158. for !in.IsDelim(']') {
  159. var v1 easyjson.RawMessage
  160. (v1).UnmarshalEasyJSON(in)
  161. out.CommandLog = append(out.CommandLog, v1)
  162. in.WantComma()
  163. }
  164. in.Delim(']')
  165. }
  166. default:
  167. in.SkipRecursive()
  168. }
  169. in.WantComma()
  170. }
  171. in.Delim('}')
  172. if isTopLevel {
  173. in.Consumed()
  174. }
  175. }
  176. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree1(out *jwriter.Writer, in SnapshotCommandLogReturns) {
  177. out.RawByte('{')
  178. first := true
  179. _ = first
  180. if len(in.CommandLog) != 0 {
  181. const prefix string = ",\"commandLog\":"
  182. first = false
  183. out.RawString(prefix[1:])
  184. {
  185. out.RawByte('[')
  186. for v2, v3 := range in.CommandLog {
  187. if v2 > 0 {
  188. out.RawByte(',')
  189. }
  190. (v3).MarshalEasyJSON(out)
  191. }
  192. out.RawByte(']')
  193. }
  194. }
  195. out.RawByte('}')
  196. }
  197. // MarshalJSON supports json.Marshaler interface
  198. func (v SnapshotCommandLogReturns) MarshalJSON() ([]byte, error) {
  199. w := jwriter.Writer{}
  200. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree1(&w, v)
  201. return w.Buffer.BuildBytes(), w.Error
  202. }
  203. // MarshalEasyJSON supports easyjson.Marshaler interface
  204. func (v SnapshotCommandLogReturns) MarshalEasyJSON(w *jwriter.Writer) {
  205. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree1(w, v)
  206. }
  207. // UnmarshalJSON supports json.Unmarshaler interface
  208. func (v *SnapshotCommandLogReturns) UnmarshalJSON(data []byte) error {
  209. r := jlexer.Lexer{Data: data}
  210. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree1(&r, v)
  211. return r.Error()
  212. }
  213. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  214. func (v *SnapshotCommandLogReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  215. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree1(l, v)
  216. }
  217. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree2(in *jlexer.Lexer, out *SnapshotCommandLogParams) {
  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 "snapshotId":
  237. out.SnapshotID = SnapshotID(in.String())
  238. default:
  239. in.SkipRecursive()
  240. }
  241. in.WantComma()
  242. }
  243. in.Delim('}')
  244. if isTopLevel {
  245. in.Consumed()
  246. }
  247. }
  248. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree2(out *jwriter.Writer, in SnapshotCommandLogParams) {
  249. out.RawByte('{')
  250. first := true
  251. _ = first
  252. {
  253. const prefix string = ",\"snapshotId\":"
  254. out.RawString(prefix[1:])
  255. out.String(string(in.SnapshotID))
  256. }
  257. out.RawByte('}')
  258. }
  259. // MarshalJSON supports json.Marshaler interface
  260. func (v SnapshotCommandLogParams) MarshalJSON() ([]byte, error) {
  261. w := jwriter.Writer{}
  262. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree2(&w, v)
  263. return w.Buffer.BuildBytes(), w.Error
  264. }
  265. // MarshalEasyJSON supports easyjson.Marshaler interface
  266. func (v SnapshotCommandLogParams) MarshalEasyJSON(w *jwriter.Writer) {
  267. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree2(w, v)
  268. }
  269. // UnmarshalJSON supports json.Unmarshaler interface
  270. func (v *SnapshotCommandLogParams) UnmarshalJSON(data []byte) error {
  271. r := jlexer.Lexer{Data: data}
  272. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree2(&r, v)
  273. return r.Error()
  274. }
  275. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  276. func (v *SnapshotCommandLogParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  277. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree2(l, v)
  278. }
  279. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree3(in *jlexer.Lexer, out *ScrollRect) {
  280. isTopLevel := in.IsStart()
  281. if in.IsNull() {
  282. if isTopLevel {
  283. in.Consumed()
  284. }
  285. in.Skip()
  286. return
  287. }
  288. in.Delim('{')
  289. for !in.IsDelim('}') {
  290. key := in.UnsafeFieldName(false)
  291. in.WantColon()
  292. if in.IsNull() {
  293. in.Skip()
  294. in.WantComma()
  295. continue
  296. }
  297. switch key {
  298. case "rect":
  299. if in.IsNull() {
  300. in.Skip()
  301. out.Rect = nil
  302. } else {
  303. if out.Rect == nil {
  304. out.Rect = new(dom.Rect)
  305. }
  306. (*out.Rect).UnmarshalEasyJSON(in)
  307. }
  308. case "type":
  309. (out.Type).UnmarshalEasyJSON(in)
  310. default:
  311. in.SkipRecursive()
  312. }
  313. in.WantComma()
  314. }
  315. in.Delim('}')
  316. if isTopLevel {
  317. in.Consumed()
  318. }
  319. }
  320. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree3(out *jwriter.Writer, in ScrollRect) {
  321. out.RawByte('{')
  322. first := true
  323. _ = first
  324. {
  325. const prefix string = ",\"rect\":"
  326. out.RawString(prefix[1:])
  327. if in.Rect == nil {
  328. out.RawString("null")
  329. } else {
  330. (*in.Rect).MarshalEasyJSON(out)
  331. }
  332. }
  333. {
  334. const prefix string = ",\"type\":"
  335. out.RawString(prefix)
  336. (in.Type).MarshalEasyJSON(out)
  337. }
  338. out.RawByte('}')
  339. }
  340. // MarshalJSON supports json.Marshaler interface
  341. func (v ScrollRect) MarshalJSON() ([]byte, error) {
  342. w := jwriter.Writer{}
  343. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree3(&w, v)
  344. return w.Buffer.BuildBytes(), w.Error
  345. }
  346. // MarshalEasyJSON supports easyjson.Marshaler interface
  347. func (v ScrollRect) MarshalEasyJSON(w *jwriter.Writer) {
  348. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree3(w, v)
  349. }
  350. // UnmarshalJSON supports json.Unmarshaler interface
  351. func (v *ScrollRect) UnmarshalJSON(data []byte) error {
  352. r := jlexer.Lexer{Data: data}
  353. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree3(&r, v)
  354. return r.Error()
  355. }
  356. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  357. func (v *ScrollRect) UnmarshalEasyJSON(l *jlexer.Lexer) {
  358. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree3(l, v)
  359. }
  360. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree4(in *jlexer.Lexer, out *ReplaySnapshotReturns) {
  361. isTopLevel := in.IsStart()
  362. if in.IsNull() {
  363. if isTopLevel {
  364. in.Consumed()
  365. }
  366. in.Skip()
  367. return
  368. }
  369. in.Delim('{')
  370. for !in.IsDelim('}') {
  371. key := in.UnsafeFieldName(false)
  372. in.WantColon()
  373. if in.IsNull() {
  374. in.Skip()
  375. in.WantComma()
  376. continue
  377. }
  378. switch key {
  379. case "dataURL":
  380. out.DataURL = string(in.String())
  381. default:
  382. in.SkipRecursive()
  383. }
  384. in.WantComma()
  385. }
  386. in.Delim('}')
  387. if isTopLevel {
  388. in.Consumed()
  389. }
  390. }
  391. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree4(out *jwriter.Writer, in ReplaySnapshotReturns) {
  392. out.RawByte('{')
  393. first := true
  394. _ = first
  395. if in.DataURL != "" {
  396. const prefix string = ",\"dataURL\":"
  397. first = false
  398. out.RawString(prefix[1:])
  399. out.String(string(in.DataURL))
  400. }
  401. out.RawByte('}')
  402. }
  403. // MarshalJSON supports json.Marshaler interface
  404. func (v ReplaySnapshotReturns) MarshalJSON() ([]byte, error) {
  405. w := jwriter.Writer{}
  406. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree4(&w, v)
  407. return w.Buffer.BuildBytes(), w.Error
  408. }
  409. // MarshalEasyJSON supports easyjson.Marshaler interface
  410. func (v ReplaySnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
  411. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree4(w, v)
  412. }
  413. // UnmarshalJSON supports json.Unmarshaler interface
  414. func (v *ReplaySnapshotReturns) UnmarshalJSON(data []byte) error {
  415. r := jlexer.Lexer{Data: data}
  416. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree4(&r, v)
  417. return r.Error()
  418. }
  419. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  420. func (v *ReplaySnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  421. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree4(l, v)
  422. }
  423. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree5(in *jlexer.Lexer, out *ReplaySnapshotParams) {
  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 "snapshotId":
  443. out.SnapshotID = SnapshotID(in.String())
  444. case "fromStep":
  445. out.FromStep = int64(in.Int64())
  446. case "toStep":
  447. out.ToStep = int64(in.Int64())
  448. case "scale":
  449. out.Scale = float64(in.Float64())
  450. default:
  451. in.SkipRecursive()
  452. }
  453. in.WantComma()
  454. }
  455. in.Delim('}')
  456. if isTopLevel {
  457. in.Consumed()
  458. }
  459. }
  460. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree5(out *jwriter.Writer, in ReplaySnapshotParams) {
  461. out.RawByte('{')
  462. first := true
  463. _ = first
  464. {
  465. const prefix string = ",\"snapshotId\":"
  466. out.RawString(prefix[1:])
  467. out.String(string(in.SnapshotID))
  468. }
  469. if in.FromStep != 0 {
  470. const prefix string = ",\"fromStep\":"
  471. out.RawString(prefix)
  472. out.Int64(int64(in.FromStep))
  473. }
  474. if in.ToStep != 0 {
  475. const prefix string = ",\"toStep\":"
  476. out.RawString(prefix)
  477. out.Int64(int64(in.ToStep))
  478. }
  479. if in.Scale != 0 {
  480. const prefix string = ",\"scale\":"
  481. out.RawString(prefix)
  482. out.Float64(float64(in.Scale))
  483. }
  484. out.RawByte('}')
  485. }
  486. // MarshalJSON supports json.Marshaler interface
  487. func (v ReplaySnapshotParams) MarshalJSON() ([]byte, error) {
  488. w := jwriter.Writer{}
  489. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree5(&w, v)
  490. return w.Buffer.BuildBytes(), w.Error
  491. }
  492. // MarshalEasyJSON supports easyjson.Marshaler interface
  493. func (v ReplaySnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
  494. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree5(w, v)
  495. }
  496. // UnmarshalJSON supports json.Unmarshaler interface
  497. func (v *ReplaySnapshotParams) UnmarshalJSON(data []byte) error {
  498. r := jlexer.Lexer{Data: data}
  499. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree5(&r, v)
  500. return r.Error()
  501. }
  502. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  503. func (v *ReplaySnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  504. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree5(l, v)
  505. }
  506. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree6(in *jlexer.Lexer, out *ReleaseSnapshotParams) {
  507. isTopLevel := in.IsStart()
  508. if in.IsNull() {
  509. if isTopLevel {
  510. in.Consumed()
  511. }
  512. in.Skip()
  513. return
  514. }
  515. in.Delim('{')
  516. for !in.IsDelim('}') {
  517. key := in.UnsafeFieldName(false)
  518. in.WantColon()
  519. if in.IsNull() {
  520. in.Skip()
  521. in.WantComma()
  522. continue
  523. }
  524. switch key {
  525. case "snapshotId":
  526. out.SnapshotID = SnapshotID(in.String())
  527. default:
  528. in.SkipRecursive()
  529. }
  530. in.WantComma()
  531. }
  532. in.Delim('}')
  533. if isTopLevel {
  534. in.Consumed()
  535. }
  536. }
  537. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree6(out *jwriter.Writer, in ReleaseSnapshotParams) {
  538. out.RawByte('{')
  539. first := true
  540. _ = first
  541. {
  542. const prefix string = ",\"snapshotId\":"
  543. out.RawString(prefix[1:])
  544. out.String(string(in.SnapshotID))
  545. }
  546. out.RawByte('}')
  547. }
  548. // MarshalJSON supports json.Marshaler interface
  549. func (v ReleaseSnapshotParams) MarshalJSON() ([]byte, error) {
  550. w := jwriter.Writer{}
  551. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree6(&w, v)
  552. return w.Buffer.BuildBytes(), w.Error
  553. }
  554. // MarshalEasyJSON supports easyjson.Marshaler interface
  555. func (v ReleaseSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
  556. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree6(w, v)
  557. }
  558. // UnmarshalJSON supports json.Unmarshaler interface
  559. func (v *ReleaseSnapshotParams) UnmarshalJSON(data []byte) error {
  560. r := jlexer.Lexer{Data: data}
  561. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree6(&r, v)
  562. return r.Error()
  563. }
  564. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  565. func (v *ReleaseSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  566. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree6(l, v)
  567. }
  568. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree7(in *jlexer.Lexer, out *ProfileSnapshotReturns) {
  569. isTopLevel := in.IsStart()
  570. if in.IsNull() {
  571. if isTopLevel {
  572. in.Consumed()
  573. }
  574. in.Skip()
  575. return
  576. }
  577. in.Delim('{')
  578. for !in.IsDelim('}') {
  579. key := in.UnsafeFieldName(false)
  580. in.WantColon()
  581. if in.IsNull() {
  582. in.Skip()
  583. in.WantComma()
  584. continue
  585. }
  586. switch key {
  587. case "timings":
  588. if in.IsNull() {
  589. in.Skip()
  590. out.Timings = nil
  591. } else {
  592. in.Delim('[')
  593. if out.Timings == nil {
  594. if !in.IsDelim(']') {
  595. out.Timings = make([]PaintProfile, 0, 2)
  596. } else {
  597. out.Timings = []PaintProfile{}
  598. }
  599. } else {
  600. out.Timings = (out.Timings)[:0]
  601. }
  602. for !in.IsDelim(']') {
  603. var v4 PaintProfile
  604. if in.IsNull() {
  605. in.Skip()
  606. v4 = nil
  607. } else {
  608. in.Delim('[')
  609. if v4 == nil {
  610. if !in.IsDelim(']') {
  611. v4 = make(PaintProfile, 0, 8)
  612. } else {
  613. v4 = PaintProfile{}
  614. }
  615. } else {
  616. v4 = (v4)[:0]
  617. }
  618. for !in.IsDelim(']') {
  619. var v5 float64
  620. v5 = float64(in.Float64())
  621. v4 = append(v4, v5)
  622. in.WantComma()
  623. }
  624. in.Delim(']')
  625. }
  626. out.Timings = append(out.Timings, v4)
  627. in.WantComma()
  628. }
  629. in.Delim(']')
  630. }
  631. default:
  632. in.SkipRecursive()
  633. }
  634. in.WantComma()
  635. }
  636. in.Delim('}')
  637. if isTopLevel {
  638. in.Consumed()
  639. }
  640. }
  641. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree7(out *jwriter.Writer, in ProfileSnapshotReturns) {
  642. out.RawByte('{')
  643. first := true
  644. _ = first
  645. if len(in.Timings) != 0 {
  646. const prefix string = ",\"timings\":"
  647. first = false
  648. out.RawString(prefix[1:])
  649. {
  650. out.RawByte('[')
  651. for v6, v7 := range in.Timings {
  652. if v6 > 0 {
  653. out.RawByte(',')
  654. }
  655. if v7 == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  656. out.RawString("null")
  657. } else {
  658. out.RawByte('[')
  659. for v8, v9 := range v7 {
  660. if v8 > 0 {
  661. out.RawByte(',')
  662. }
  663. out.Float64(float64(v9))
  664. }
  665. out.RawByte(']')
  666. }
  667. }
  668. out.RawByte(']')
  669. }
  670. }
  671. out.RawByte('}')
  672. }
  673. // MarshalJSON supports json.Marshaler interface
  674. func (v ProfileSnapshotReturns) MarshalJSON() ([]byte, error) {
  675. w := jwriter.Writer{}
  676. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree7(&w, v)
  677. return w.Buffer.BuildBytes(), w.Error
  678. }
  679. // MarshalEasyJSON supports easyjson.Marshaler interface
  680. func (v ProfileSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
  681. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree7(w, v)
  682. }
  683. // UnmarshalJSON supports json.Unmarshaler interface
  684. func (v *ProfileSnapshotReturns) UnmarshalJSON(data []byte) error {
  685. r := jlexer.Lexer{Data: data}
  686. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree7(&r, v)
  687. return r.Error()
  688. }
  689. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  690. func (v *ProfileSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  691. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree7(l, v)
  692. }
  693. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree8(in *jlexer.Lexer, out *ProfileSnapshotParams) {
  694. isTopLevel := in.IsStart()
  695. if in.IsNull() {
  696. if isTopLevel {
  697. in.Consumed()
  698. }
  699. in.Skip()
  700. return
  701. }
  702. in.Delim('{')
  703. for !in.IsDelim('}') {
  704. key := in.UnsafeFieldName(false)
  705. in.WantColon()
  706. if in.IsNull() {
  707. in.Skip()
  708. in.WantComma()
  709. continue
  710. }
  711. switch key {
  712. case "snapshotId":
  713. out.SnapshotID = SnapshotID(in.String())
  714. case "minRepeatCount":
  715. out.MinRepeatCount = int64(in.Int64())
  716. case "minDuration":
  717. out.MinDuration = float64(in.Float64())
  718. case "clipRect":
  719. if in.IsNull() {
  720. in.Skip()
  721. out.ClipRect = nil
  722. } else {
  723. if out.ClipRect == nil {
  724. out.ClipRect = new(dom.Rect)
  725. }
  726. (*out.ClipRect).UnmarshalEasyJSON(in)
  727. }
  728. default:
  729. in.SkipRecursive()
  730. }
  731. in.WantComma()
  732. }
  733. in.Delim('}')
  734. if isTopLevel {
  735. in.Consumed()
  736. }
  737. }
  738. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree8(out *jwriter.Writer, in ProfileSnapshotParams) {
  739. out.RawByte('{')
  740. first := true
  741. _ = first
  742. {
  743. const prefix string = ",\"snapshotId\":"
  744. out.RawString(prefix[1:])
  745. out.String(string(in.SnapshotID))
  746. }
  747. if in.MinRepeatCount != 0 {
  748. const prefix string = ",\"minRepeatCount\":"
  749. out.RawString(prefix)
  750. out.Int64(int64(in.MinRepeatCount))
  751. }
  752. if in.MinDuration != 0 {
  753. const prefix string = ",\"minDuration\":"
  754. out.RawString(prefix)
  755. out.Float64(float64(in.MinDuration))
  756. }
  757. if in.ClipRect != nil {
  758. const prefix string = ",\"clipRect\":"
  759. out.RawString(prefix)
  760. (*in.ClipRect).MarshalEasyJSON(out)
  761. }
  762. out.RawByte('}')
  763. }
  764. // MarshalJSON supports json.Marshaler interface
  765. func (v ProfileSnapshotParams) MarshalJSON() ([]byte, error) {
  766. w := jwriter.Writer{}
  767. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree8(&w, v)
  768. return w.Buffer.BuildBytes(), w.Error
  769. }
  770. // MarshalEasyJSON supports easyjson.Marshaler interface
  771. func (v ProfileSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
  772. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree8(w, v)
  773. }
  774. // UnmarshalJSON supports json.Unmarshaler interface
  775. func (v *ProfileSnapshotParams) UnmarshalJSON(data []byte) error {
  776. r := jlexer.Lexer{Data: data}
  777. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree8(&r, v)
  778. return r.Error()
  779. }
  780. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  781. func (v *ProfileSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  782. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree8(l, v)
  783. }
  784. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree9(in *jlexer.Lexer, out *PictureTile) {
  785. isTopLevel := in.IsStart()
  786. if in.IsNull() {
  787. if isTopLevel {
  788. in.Consumed()
  789. }
  790. in.Skip()
  791. return
  792. }
  793. in.Delim('{')
  794. for !in.IsDelim('}') {
  795. key := in.UnsafeFieldName(false)
  796. in.WantColon()
  797. if in.IsNull() {
  798. in.Skip()
  799. in.WantComma()
  800. continue
  801. }
  802. switch key {
  803. case "x":
  804. out.X = float64(in.Float64())
  805. case "y":
  806. out.Y = float64(in.Float64())
  807. case "picture":
  808. out.Picture = string(in.String())
  809. default:
  810. in.SkipRecursive()
  811. }
  812. in.WantComma()
  813. }
  814. in.Delim('}')
  815. if isTopLevel {
  816. in.Consumed()
  817. }
  818. }
  819. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree9(out *jwriter.Writer, in PictureTile) {
  820. out.RawByte('{')
  821. first := true
  822. _ = first
  823. {
  824. const prefix string = ",\"x\":"
  825. out.RawString(prefix[1:])
  826. out.Float64(float64(in.X))
  827. }
  828. {
  829. const prefix string = ",\"y\":"
  830. out.RawString(prefix)
  831. out.Float64(float64(in.Y))
  832. }
  833. {
  834. const prefix string = ",\"picture\":"
  835. out.RawString(prefix)
  836. out.String(string(in.Picture))
  837. }
  838. out.RawByte('}')
  839. }
  840. // MarshalJSON supports json.Marshaler interface
  841. func (v PictureTile) MarshalJSON() ([]byte, error) {
  842. w := jwriter.Writer{}
  843. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree9(&w, v)
  844. return w.Buffer.BuildBytes(), w.Error
  845. }
  846. // MarshalEasyJSON supports easyjson.Marshaler interface
  847. func (v PictureTile) MarshalEasyJSON(w *jwriter.Writer) {
  848. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree9(w, v)
  849. }
  850. // UnmarshalJSON supports json.Unmarshaler interface
  851. func (v *PictureTile) UnmarshalJSON(data []byte) error {
  852. r := jlexer.Lexer{Data: data}
  853. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree9(&r, v)
  854. return r.Error()
  855. }
  856. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  857. func (v *PictureTile) UnmarshalEasyJSON(l *jlexer.Lexer) {
  858. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree9(l, v)
  859. }
  860. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree10(in *jlexer.Lexer, out *MakeSnapshotReturns) {
  861. isTopLevel := in.IsStart()
  862. if in.IsNull() {
  863. if isTopLevel {
  864. in.Consumed()
  865. }
  866. in.Skip()
  867. return
  868. }
  869. in.Delim('{')
  870. for !in.IsDelim('}') {
  871. key := in.UnsafeFieldName(false)
  872. in.WantColon()
  873. if in.IsNull() {
  874. in.Skip()
  875. in.WantComma()
  876. continue
  877. }
  878. switch key {
  879. case "snapshotId":
  880. out.SnapshotID = SnapshotID(in.String())
  881. default:
  882. in.SkipRecursive()
  883. }
  884. in.WantComma()
  885. }
  886. in.Delim('}')
  887. if isTopLevel {
  888. in.Consumed()
  889. }
  890. }
  891. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree10(out *jwriter.Writer, in MakeSnapshotReturns) {
  892. out.RawByte('{')
  893. first := true
  894. _ = first
  895. if in.SnapshotID != "" {
  896. const prefix string = ",\"snapshotId\":"
  897. first = false
  898. out.RawString(prefix[1:])
  899. out.String(string(in.SnapshotID))
  900. }
  901. out.RawByte('}')
  902. }
  903. // MarshalJSON supports json.Marshaler interface
  904. func (v MakeSnapshotReturns) MarshalJSON() ([]byte, error) {
  905. w := jwriter.Writer{}
  906. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree10(&w, v)
  907. return w.Buffer.BuildBytes(), w.Error
  908. }
  909. // MarshalEasyJSON supports easyjson.Marshaler interface
  910. func (v MakeSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
  911. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree10(w, v)
  912. }
  913. // UnmarshalJSON supports json.Unmarshaler interface
  914. func (v *MakeSnapshotReturns) UnmarshalJSON(data []byte) error {
  915. r := jlexer.Lexer{Data: data}
  916. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree10(&r, v)
  917. return r.Error()
  918. }
  919. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  920. func (v *MakeSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  921. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree10(l, v)
  922. }
  923. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree11(in *jlexer.Lexer, out *MakeSnapshotParams) {
  924. isTopLevel := in.IsStart()
  925. if in.IsNull() {
  926. if isTopLevel {
  927. in.Consumed()
  928. }
  929. in.Skip()
  930. return
  931. }
  932. in.Delim('{')
  933. for !in.IsDelim('}') {
  934. key := in.UnsafeFieldName(false)
  935. in.WantColon()
  936. if in.IsNull() {
  937. in.Skip()
  938. in.WantComma()
  939. continue
  940. }
  941. switch key {
  942. case "layerId":
  943. out.LayerID = LayerID(in.String())
  944. default:
  945. in.SkipRecursive()
  946. }
  947. in.WantComma()
  948. }
  949. in.Delim('}')
  950. if isTopLevel {
  951. in.Consumed()
  952. }
  953. }
  954. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree11(out *jwriter.Writer, in MakeSnapshotParams) {
  955. out.RawByte('{')
  956. first := true
  957. _ = first
  958. {
  959. const prefix string = ",\"layerId\":"
  960. out.RawString(prefix[1:])
  961. out.String(string(in.LayerID))
  962. }
  963. out.RawByte('}')
  964. }
  965. // MarshalJSON supports json.Marshaler interface
  966. func (v MakeSnapshotParams) MarshalJSON() ([]byte, error) {
  967. w := jwriter.Writer{}
  968. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree11(&w, v)
  969. return w.Buffer.BuildBytes(), w.Error
  970. }
  971. // MarshalEasyJSON supports easyjson.Marshaler interface
  972. func (v MakeSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
  973. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree11(w, v)
  974. }
  975. // UnmarshalJSON supports json.Unmarshaler interface
  976. func (v *MakeSnapshotParams) UnmarshalJSON(data []byte) error {
  977. r := jlexer.Lexer{Data: data}
  978. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree11(&r, v)
  979. return r.Error()
  980. }
  981. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  982. func (v *MakeSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  983. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree11(l, v)
  984. }
  985. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree12(in *jlexer.Lexer, out *LoadSnapshotReturns) {
  986. isTopLevel := in.IsStart()
  987. if in.IsNull() {
  988. if isTopLevel {
  989. in.Consumed()
  990. }
  991. in.Skip()
  992. return
  993. }
  994. in.Delim('{')
  995. for !in.IsDelim('}') {
  996. key := in.UnsafeFieldName(false)
  997. in.WantColon()
  998. if in.IsNull() {
  999. in.Skip()
  1000. in.WantComma()
  1001. continue
  1002. }
  1003. switch key {
  1004. case "snapshotId":
  1005. out.SnapshotID = SnapshotID(in.String())
  1006. default:
  1007. in.SkipRecursive()
  1008. }
  1009. in.WantComma()
  1010. }
  1011. in.Delim('}')
  1012. if isTopLevel {
  1013. in.Consumed()
  1014. }
  1015. }
  1016. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree12(out *jwriter.Writer, in LoadSnapshotReturns) {
  1017. out.RawByte('{')
  1018. first := true
  1019. _ = first
  1020. if in.SnapshotID != "" {
  1021. const prefix string = ",\"snapshotId\":"
  1022. first = false
  1023. out.RawString(prefix[1:])
  1024. out.String(string(in.SnapshotID))
  1025. }
  1026. out.RawByte('}')
  1027. }
  1028. // MarshalJSON supports json.Marshaler interface
  1029. func (v LoadSnapshotReturns) MarshalJSON() ([]byte, error) {
  1030. w := jwriter.Writer{}
  1031. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree12(&w, v)
  1032. return w.Buffer.BuildBytes(), w.Error
  1033. }
  1034. // MarshalEasyJSON supports easyjson.Marshaler interface
  1035. func (v LoadSnapshotReturns) MarshalEasyJSON(w *jwriter.Writer) {
  1036. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree12(w, v)
  1037. }
  1038. // UnmarshalJSON supports json.Unmarshaler interface
  1039. func (v *LoadSnapshotReturns) UnmarshalJSON(data []byte) error {
  1040. r := jlexer.Lexer{Data: data}
  1041. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree12(&r, v)
  1042. return r.Error()
  1043. }
  1044. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1045. func (v *LoadSnapshotReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1046. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree12(l, v)
  1047. }
  1048. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree13(in *jlexer.Lexer, out *LoadSnapshotParams) {
  1049. isTopLevel := in.IsStart()
  1050. if in.IsNull() {
  1051. if isTopLevel {
  1052. in.Consumed()
  1053. }
  1054. in.Skip()
  1055. return
  1056. }
  1057. in.Delim('{')
  1058. for !in.IsDelim('}') {
  1059. key := in.UnsafeFieldName(false)
  1060. in.WantColon()
  1061. if in.IsNull() {
  1062. in.Skip()
  1063. in.WantComma()
  1064. continue
  1065. }
  1066. switch key {
  1067. case "tiles":
  1068. if in.IsNull() {
  1069. in.Skip()
  1070. out.Tiles = nil
  1071. } else {
  1072. in.Delim('[')
  1073. if out.Tiles == nil {
  1074. if !in.IsDelim(']') {
  1075. out.Tiles = make([]*PictureTile, 0, 8)
  1076. } else {
  1077. out.Tiles = []*PictureTile{}
  1078. }
  1079. } else {
  1080. out.Tiles = (out.Tiles)[:0]
  1081. }
  1082. for !in.IsDelim(']') {
  1083. var v10 *PictureTile
  1084. if in.IsNull() {
  1085. in.Skip()
  1086. v10 = nil
  1087. } else {
  1088. if v10 == nil {
  1089. v10 = new(PictureTile)
  1090. }
  1091. (*v10).UnmarshalEasyJSON(in)
  1092. }
  1093. out.Tiles = append(out.Tiles, v10)
  1094. in.WantComma()
  1095. }
  1096. in.Delim(']')
  1097. }
  1098. default:
  1099. in.SkipRecursive()
  1100. }
  1101. in.WantComma()
  1102. }
  1103. in.Delim('}')
  1104. if isTopLevel {
  1105. in.Consumed()
  1106. }
  1107. }
  1108. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree13(out *jwriter.Writer, in LoadSnapshotParams) {
  1109. out.RawByte('{')
  1110. first := true
  1111. _ = first
  1112. {
  1113. const prefix string = ",\"tiles\":"
  1114. out.RawString(prefix[1:])
  1115. if in.Tiles == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1116. out.RawString("null")
  1117. } else {
  1118. out.RawByte('[')
  1119. for v11, v12 := range in.Tiles {
  1120. if v11 > 0 {
  1121. out.RawByte(',')
  1122. }
  1123. if v12 == nil {
  1124. out.RawString("null")
  1125. } else {
  1126. (*v12).MarshalEasyJSON(out)
  1127. }
  1128. }
  1129. out.RawByte(']')
  1130. }
  1131. }
  1132. out.RawByte('}')
  1133. }
  1134. // MarshalJSON supports json.Marshaler interface
  1135. func (v LoadSnapshotParams) MarshalJSON() ([]byte, error) {
  1136. w := jwriter.Writer{}
  1137. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree13(&w, v)
  1138. return w.Buffer.BuildBytes(), w.Error
  1139. }
  1140. // MarshalEasyJSON supports easyjson.Marshaler interface
  1141. func (v LoadSnapshotParams) MarshalEasyJSON(w *jwriter.Writer) {
  1142. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree13(w, v)
  1143. }
  1144. // UnmarshalJSON supports json.Unmarshaler interface
  1145. func (v *LoadSnapshotParams) UnmarshalJSON(data []byte) error {
  1146. r := jlexer.Lexer{Data: data}
  1147. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree13(&r, v)
  1148. return r.Error()
  1149. }
  1150. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1151. func (v *LoadSnapshotParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1152. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree13(l, v)
  1153. }
  1154. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree14(in *jlexer.Lexer, out *Layer) {
  1155. isTopLevel := in.IsStart()
  1156. if in.IsNull() {
  1157. if isTopLevel {
  1158. in.Consumed()
  1159. }
  1160. in.Skip()
  1161. return
  1162. }
  1163. in.Delim('{')
  1164. for !in.IsDelim('}') {
  1165. key := in.UnsafeFieldName(false)
  1166. in.WantColon()
  1167. if in.IsNull() {
  1168. in.Skip()
  1169. in.WantComma()
  1170. continue
  1171. }
  1172. switch key {
  1173. case "layerId":
  1174. out.LayerID = LayerID(in.String())
  1175. case "parentLayerId":
  1176. out.ParentLayerID = LayerID(in.String())
  1177. case "backendNodeId":
  1178. (out.BackendNodeID).UnmarshalEasyJSON(in)
  1179. case "offsetX":
  1180. out.OffsetX = float64(in.Float64())
  1181. case "offsetY":
  1182. out.OffsetY = float64(in.Float64())
  1183. case "width":
  1184. out.Width = float64(in.Float64())
  1185. case "height":
  1186. out.Height = float64(in.Float64())
  1187. case "transform":
  1188. if in.IsNull() {
  1189. in.Skip()
  1190. out.Transform = nil
  1191. } else {
  1192. in.Delim('[')
  1193. if out.Transform == nil {
  1194. if !in.IsDelim(']') {
  1195. out.Transform = make([]float64, 0, 8)
  1196. } else {
  1197. out.Transform = []float64{}
  1198. }
  1199. } else {
  1200. out.Transform = (out.Transform)[:0]
  1201. }
  1202. for !in.IsDelim(']') {
  1203. var v13 float64
  1204. v13 = float64(in.Float64())
  1205. out.Transform = append(out.Transform, v13)
  1206. in.WantComma()
  1207. }
  1208. in.Delim(']')
  1209. }
  1210. case "anchorX":
  1211. out.AnchorX = float64(in.Float64())
  1212. case "anchorY":
  1213. out.AnchorY = float64(in.Float64())
  1214. case "anchorZ":
  1215. out.AnchorZ = float64(in.Float64())
  1216. case "paintCount":
  1217. out.PaintCount = int64(in.Int64())
  1218. case "drawsContent":
  1219. out.DrawsContent = bool(in.Bool())
  1220. case "invisible":
  1221. out.Invisible = bool(in.Bool())
  1222. case "scrollRects":
  1223. if in.IsNull() {
  1224. in.Skip()
  1225. out.ScrollRects = nil
  1226. } else {
  1227. in.Delim('[')
  1228. if out.ScrollRects == nil {
  1229. if !in.IsDelim(']') {
  1230. out.ScrollRects = make([]*ScrollRect, 0, 8)
  1231. } else {
  1232. out.ScrollRects = []*ScrollRect{}
  1233. }
  1234. } else {
  1235. out.ScrollRects = (out.ScrollRects)[:0]
  1236. }
  1237. for !in.IsDelim(']') {
  1238. var v14 *ScrollRect
  1239. if in.IsNull() {
  1240. in.Skip()
  1241. v14 = nil
  1242. } else {
  1243. if v14 == nil {
  1244. v14 = new(ScrollRect)
  1245. }
  1246. (*v14).UnmarshalEasyJSON(in)
  1247. }
  1248. out.ScrollRects = append(out.ScrollRects, v14)
  1249. in.WantComma()
  1250. }
  1251. in.Delim(']')
  1252. }
  1253. case "stickyPositionConstraint":
  1254. if in.IsNull() {
  1255. in.Skip()
  1256. out.StickyPositionConstraint = nil
  1257. } else {
  1258. if out.StickyPositionConstraint == nil {
  1259. out.StickyPositionConstraint = new(StickyPositionConstraint)
  1260. }
  1261. (*out.StickyPositionConstraint).UnmarshalEasyJSON(in)
  1262. }
  1263. default:
  1264. in.SkipRecursive()
  1265. }
  1266. in.WantComma()
  1267. }
  1268. in.Delim('}')
  1269. if isTopLevel {
  1270. in.Consumed()
  1271. }
  1272. }
  1273. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree14(out *jwriter.Writer, in Layer) {
  1274. out.RawByte('{')
  1275. first := true
  1276. _ = first
  1277. {
  1278. const prefix string = ",\"layerId\":"
  1279. out.RawString(prefix[1:])
  1280. out.String(string(in.LayerID))
  1281. }
  1282. if in.ParentLayerID != "" {
  1283. const prefix string = ",\"parentLayerId\":"
  1284. out.RawString(prefix)
  1285. out.String(string(in.ParentLayerID))
  1286. }
  1287. if in.BackendNodeID != 0 {
  1288. const prefix string = ",\"backendNodeId\":"
  1289. out.RawString(prefix)
  1290. out.Int64(int64(in.BackendNodeID))
  1291. }
  1292. {
  1293. const prefix string = ",\"offsetX\":"
  1294. out.RawString(prefix)
  1295. out.Float64(float64(in.OffsetX))
  1296. }
  1297. {
  1298. const prefix string = ",\"offsetY\":"
  1299. out.RawString(prefix)
  1300. out.Float64(float64(in.OffsetY))
  1301. }
  1302. {
  1303. const prefix string = ",\"width\":"
  1304. out.RawString(prefix)
  1305. out.Float64(float64(in.Width))
  1306. }
  1307. {
  1308. const prefix string = ",\"height\":"
  1309. out.RawString(prefix)
  1310. out.Float64(float64(in.Height))
  1311. }
  1312. if len(in.Transform) != 0 {
  1313. const prefix string = ",\"transform\":"
  1314. out.RawString(prefix)
  1315. {
  1316. out.RawByte('[')
  1317. for v15, v16 := range in.Transform {
  1318. if v15 > 0 {
  1319. out.RawByte(',')
  1320. }
  1321. out.Float64(float64(v16))
  1322. }
  1323. out.RawByte(']')
  1324. }
  1325. }
  1326. if in.AnchorX != 0 {
  1327. const prefix string = ",\"anchorX\":"
  1328. out.RawString(prefix)
  1329. out.Float64(float64(in.AnchorX))
  1330. }
  1331. if in.AnchorY != 0 {
  1332. const prefix string = ",\"anchorY\":"
  1333. out.RawString(prefix)
  1334. out.Float64(float64(in.AnchorY))
  1335. }
  1336. if in.AnchorZ != 0 {
  1337. const prefix string = ",\"anchorZ\":"
  1338. out.RawString(prefix)
  1339. out.Float64(float64(in.AnchorZ))
  1340. }
  1341. {
  1342. const prefix string = ",\"paintCount\":"
  1343. out.RawString(prefix)
  1344. out.Int64(int64(in.PaintCount))
  1345. }
  1346. {
  1347. const prefix string = ",\"drawsContent\":"
  1348. out.RawString(prefix)
  1349. out.Bool(bool(in.DrawsContent))
  1350. }
  1351. if in.Invisible {
  1352. const prefix string = ",\"invisible\":"
  1353. out.RawString(prefix)
  1354. out.Bool(bool(in.Invisible))
  1355. }
  1356. if len(in.ScrollRects) != 0 {
  1357. const prefix string = ",\"scrollRects\":"
  1358. out.RawString(prefix)
  1359. {
  1360. out.RawByte('[')
  1361. for v17, v18 := range in.ScrollRects {
  1362. if v17 > 0 {
  1363. out.RawByte(',')
  1364. }
  1365. if v18 == nil {
  1366. out.RawString("null")
  1367. } else {
  1368. (*v18).MarshalEasyJSON(out)
  1369. }
  1370. }
  1371. out.RawByte(']')
  1372. }
  1373. }
  1374. if in.StickyPositionConstraint != nil {
  1375. const prefix string = ",\"stickyPositionConstraint\":"
  1376. out.RawString(prefix)
  1377. (*in.StickyPositionConstraint).MarshalEasyJSON(out)
  1378. }
  1379. out.RawByte('}')
  1380. }
  1381. // MarshalJSON supports json.Marshaler interface
  1382. func (v Layer) MarshalJSON() ([]byte, error) {
  1383. w := jwriter.Writer{}
  1384. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree14(&w, v)
  1385. return w.Buffer.BuildBytes(), w.Error
  1386. }
  1387. // MarshalEasyJSON supports easyjson.Marshaler interface
  1388. func (v Layer) MarshalEasyJSON(w *jwriter.Writer) {
  1389. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree14(w, v)
  1390. }
  1391. // UnmarshalJSON supports json.Unmarshaler interface
  1392. func (v *Layer) UnmarshalJSON(data []byte) error {
  1393. r := jlexer.Lexer{Data: data}
  1394. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree14(&r, v)
  1395. return r.Error()
  1396. }
  1397. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1398. func (v *Layer) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1399. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree14(l, v)
  1400. }
  1401. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree15(in *jlexer.Lexer, out *EventLayerTreeDidChange) {
  1402. isTopLevel := in.IsStart()
  1403. if in.IsNull() {
  1404. if isTopLevel {
  1405. in.Consumed()
  1406. }
  1407. in.Skip()
  1408. return
  1409. }
  1410. in.Delim('{')
  1411. for !in.IsDelim('}') {
  1412. key := in.UnsafeFieldName(false)
  1413. in.WantColon()
  1414. if in.IsNull() {
  1415. in.Skip()
  1416. in.WantComma()
  1417. continue
  1418. }
  1419. switch key {
  1420. case "layers":
  1421. if in.IsNull() {
  1422. in.Skip()
  1423. out.Layers = nil
  1424. } else {
  1425. in.Delim('[')
  1426. if out.Layers == nil {
  1427. if !in.IsDelim(']') {
  1428. out.Layers = make([]*Layer, 0, 8)
  1429. } else {
  1430. out.Layers = []*Layer{}
  1431. }
  1432. } else {
  1433. out.Layers = (out.Layers)[:0]
  1434. }
  1435. for !in.IsDelim(']') {
  1436. var v19 *Layer
  1437. if in.IsNull() {
  1438. in.Skip()
  1439. v19 = nil
  1440. } else {
  1441. if v19 == nil {
  1442. v19 = new(Layer)
  1443. }
  1444. (*v19).UnmarshalEasyJSON(in)
  1445. }
  1446. out.Layers = append(out.Layers, v19)
  1447. in.WantComma()
  1448. }
  1449. in.Delim(']')
  1450. }
  1451. default:
  1452. in.SkipRecursive()
  1453. }
  1454. in.WantComma()
  1455. }
  1456. in.Delim('}')
  1457. if isTopLevel {
  1458. in.Consumed()
  1459. }
  1460. }
  1461. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree15(out *jwriter.Writer, in EventLayerTreeDidChange) {
  1462. out.RawByte('{')
  1463. first := true
  1464. _ = first
  1465. if len(in.Layers) != 0 {
  1466. const prefix string = ",\"layers\":"
  1467. first = false
  1468. out.RawString(prefix[1:])
  1469. {
  1470. out.RawByte('[')
  1471. for v20, v21 := range in.Layers {
  1472. if v20 > 0 {
  1473. out.RawByte(',')
  1474. }
  1475. if v21 == nil {
  1476. out.RawString("null")
  1477. } else {
  1478. (*v21).MarshalEasyJSON(out)
  1479. }
  1480. }
  1481. out.RawByte(']')
  1482. }
  1483. }
  1484. out.RawByte('}')
  1485. }
  1486. // MarshalJSON supports json.Marshaler interface
  1487. func (v EventLayerTreeDidChange) MarshalJSON() ([]byte, error) {
  1488. w := jwriter.Writer{}
  1489. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree15(&w, v)
  1490. return w.Buffer.BuildBytes(), w.Error
  1491. }
  1492. // MarshalEasyJSON supports easyjson.Marshaler interface
  1493. func (v EventLayerTreeDidChange) MarshalEasyJSON(w *jwriter.Writer) {
  1494. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree15(w, v)
  1495. }
  1496. // UnmarshalJSON supports json.Unmarshaler interface
  1497. func (v *EventLayerTreeDidChange) UnmarshalJSON(data []byte) error {
  1498. r := jlexer.Lexer{Data: data}
  1499. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree15(&r, v)
  1500. return r.Error()
  1501. }
  1502. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1503. func (v *EventLayerTreeDidChange) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1504. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree15(l, v)
  1505. }
  1506. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree16(in *jlexer.Lexer, out *EventLayerPainted) {
  1507. isTopLevel := in.IsStart()
  1508. if in.IsNull() {
  1509. if isTopLevel {
  1510. in.Consumed()
  1511. }
  1512. in.Skip()
  1513. return
  1514. }
  1515. in.Delim('{')
  1516. for !in.IsDelim('}') {
  1517. key := in.UnsafeFieldName(false)
  1518. in.WantColon()
  1519. if in.IsNull() {
  1520. in.Skip()
  1521. in.WantComma()
  1522. continue
  1523. }
  1524. switch key {
  1525. case "layerId":
  1526. out.LayerID = LayerID(in.String())
  1527. case "clip":
  1528. if in.IsNull() {
  1529. in.Skip()
  1530. out.Clip = nil
  1531. } else {
  1532. if out.Clip == nil {
  1533. out.Clip = new(dom.Rect)
  1534. }
  1535. (*out.Clip).UnmarshalEasyJSON(in)
  1536. }
  1537. default:
  1538. in.SkipRecursive()
  1539. }
  1540. in.WantComma()
  1541. }
  1542. in.Delim('}')
  1543. if isTopLevel {
  1544. in.Consumed()
  1545. }
  1546. }
  1547. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree16(out *jwriter.Writer, in EventLayerPainted) {
  1548. out.RawByte('{')
  1549. first := true
  1550. _ = first
  1551. {
  1552. const prefix string = ",\"layerId\":"
  1553. out.RawString(prefix[1:])
  1554. out.String(string(in.LayerID))
  1555. }
  1556. {
  1557. const prefix string = ",\"clip\":"
  1558. out.RawString(prefix)
  1559. if in.Clip == nil {
  1560. out.RawString("null")
  1561. } else {
  1562. (*in.Clip).MarshalEasyJSON(out)
  1563. }
  1564. }
  1565. out.RawByte('}')
  1566. }
  1567. // MarshalJSON supports json.Marshaler interface
  1568. func (v EventLayerPainted) MarshalJSON() ([]byte, error) {
  1569. w := jwriter.Writer{}
  1570. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree16(&w, v)
  1571. return w.Buffer.BuildBytes(), w.Error
  1572. }
  1573. // MarshalEasyJSON supports easyjson.Marshaler interface
  1574. func (v EventLayerPainted) MarshalEasyJSON(w *jwriter.Writer) {
  1575. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree16(w, v)
  1576. }
  1577. // UnmarshalJSON supports json.Unmarshaler interface
  1578. func (v *EventLayerPainted) UnmarshalJSON(data []byte) error {
  1579. r := jlexer.Lexer{Data: data}
  1580. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree16(&r, v)
  1581. return r.Error()
  1582. }
  1583. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1584. func (v *EventLayerPainted) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1585. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree16(l, v)
  1586. }
  1587. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree17(in *jlexer.Lexer, out *EnableParams) {
  1588. isTopLevel := in.IsStart()
  1589. if in.IsNull() {
  1590. if isTopLevel {
  1591. in.Consumed()
  1592. }
  1593. in.Skip()
  1594. return
  1595. }
  1596. in.Delim('{')
  1597. for !in.IsDelim('}') {
  1598. key := in.UnsafeFieldName(false)
  1599. in.WantColon()
  1600. if in.IsNull() {
  1601. in.Skip()
  1602. in.WantComma()
  1603. continue
  1604. }
  1605. switch key {
  1606. default:
  1607. in.SkipRecursive()
  1608. }
  1609. in.WantComma()
  1610. }
  1611. in.Delim('}')
  1612. if isTopLevel {
  1613. in.Consumed()
  1614. }
  1615. }
  1616. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree17(out *jwriter.Writer, in EnableParams) {
  1617. out.RawByte('{')
  1618. first := true
  1619. _ = first
  1620. out.RawByte('}')
  1621. }
  1622. // MarshalJSON supports json.Marshaler interface
  1623. func (v EnableParams) MarshalJSON() ([]byte, error) {
  1624. w := jwriter.Writer{}
  1625. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree17(&w, v)
  1626. return w.Buffer.BuildBytes(), w.Error
  1627. }
  1628. // MarshalEasyJSON supports easyjson.Marshaler interface
  1629. func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
  1630. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree17(w, v)
  1631. }
  1632. // UnmarshalJSON supports json.Unmarshaler interface
  1633. func (v *EnableParams) UnmarshalJSON(data []byte) error {
  1634. r := jlexer.Lexer{Data: data}
  1635. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree17(&r, v)
  1636. return r.Error()
  1637. }
  1638. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1639. func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1640. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree17(l, v)
  1641. }
  1642. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree18(in *jlexer.Lexer, out *DisableParams) {
  1643. isTopLevel := in.IsStart()
  1644. if in.IsNull() {
  1645. if isTopLevel {
  1646. in.Consumed()
  1647. }
  1648. in.Skip()
  1649. return
  1650. }
  1651. in.Delim('{')
  1652. for !in.IsDelim('}') {
  1653. key := in.UnsafeFieldName(false)
  1654. in.WantColon()
  1655. if in.IsNull() {
  1656. in.Skip()
  1657. in.WantComma()
  1658. continue
  1659. }
  1660. switch key {
  1661. default:
  1662. in.SkipRecursive()
  1663. }
  1664. in.WantComma()
  1665. }
  1666. in.Delim('}')
  1667. if isTopLevel {
  1668. in.Consumed()
  1669. }
  1670. }
  1671. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree18(out *jwriter.Writer, in DisableParams) {
  1672. out.RawByte('{')
  1673. first := true
  1674. _ = first
  1675. out.RawByte('}')
  1676. }
  1677. // MarshalJSON supports json.Marshaler interface
  1678. func (v DisableParams) MarshalJSON() ([]byte, error) {
  1679. w := jwriter.Writer{}
  1680. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree18(&w, v)
  1681. return w.Buffer.BuildBytes(), w.Error
  1682. }
  1683. // MarshalEasyJSON supports easyjson.Marshaler interface
  1684. func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
  1685. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree18(w, v)
  1686. }
  1687. // UnmarshalJSON supports json.Unmarshaler interface
  1688. func (v *DisableParams) UnmarshalJSON(data []byte) error {
  1689. r := jlexer.Lexer{Data: data}
  1690. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree18(&r, v)
  1691. return r.Error()
  1692. }
  1693. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1694. func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1695. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree18(l, v)
  1696. }
  1697. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree19(in *jlexer.Lexer, out *CompositingReasonsReturns) {
  1698. isTopLevel := in.IsStart()
  1699. if in.IsNull() {
  1700. if isTopLevel {
  1701. in.Consumed()
  1702. }
  1703. in.Skip()
  1704. return
  1705. }
  1706. in.Delim('{')
  1707. for !in.IsDelim('}') {
  1708. key := in.UnsafeFieldName(false)
  1709. in.WantColon()
  1710. if in.IsNull() {
  1711. in.Skip()
  1712. in.WantComma()
  1713. continue
  1714. }
  1715. switch key {
  1716. case "compositingReasons":
  1717. if in.IsNull() {
  1718. in.Skip()
  1719. out.CompositingReasons = nil
  1720. } else {
  1721. in.Delim('[')
  1722. if out.CompositingReasons == nil {
  1723. if !in.IsDelim(']') {
  1724. out.CompositingReasons = make([]string, 0, 4)
  1725. } else {
  1726. out.CompositingReasons = []string{}
  1727. }
  1728. } else {
  1729. out.CompositingReasons = (out.CompositingReasons)[:0]
  1730. }
  1731. for !in.IsDelim(']') {
  1732. var v22 string
  1733. v22 = string(in.String())
  1734. out.CompositingReasons = append(out.CompositingReasons, v22)
  1735. in.WantComma()
  1736. }
  1737. in.Delim(']')
  1738. }
  1739. case "compositingReasonIds":
  1740. if in.IsNull() {
  1741. in.Skip()
  1742. out.CompositingReasonIDs = nil
  1743. } else {
  1744. in.Delim('[')
  1745. if out.CompositingReasonIDs == nil {
  1746. if !in.IsDelim(']') {
  1747. out.CompositingReasonIDs = make([]string, 0, 4)
  1748. } else {
  1749. out.CompositingReasonIDs = []string{}
  1750. }
  1751. } else {
  1752. out.CompositingReasonIDs = (out.CompositingReasonIDs)[:0]
  1753. }
  1754. for !in.IsDelim(']') {
  1755. var v23 string
  1756. v23 = string(in.String())
  1757. out.CompositingReasonIDs = append(out.CompositingReasonIDs, v23)
  1758. in.WantComma()
  1759. }
  1760. in.Delim(']')
  1761. }
  1762. default:
  1763. in.SkipRecursive()
  1764. }
  1765. in.WantComma()
  1766. }
  1767. in.Delim('}')
  1768. if isTopLevel {
  1769. in.Consumed()
  1770. }
  1771. }
  1772. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree19(out *jwriter.Writer, in CompositingReasonsReturns) {
  1773. out.RawByte('{')
  1774. first := true
  1775. _ = first
  1776. if len(in.CompositingReasons) != 0 {
  1777. const prefix string = ",\"compositingReasons\":"
  1778. first = false
  1779. out.RawString(prefix[1:])
  1780. {
  1781. out.RawByte('[')
  1782. for v24, v25 := range in.CompositingReasons {
  1783. if v24 > 0 {
  1784. out.RawByte(',')
  1785. }
  1786. out.String(string(v25))
  1787. }
  1788. out.RawByte(']')
  1789. }
  1790. }
  1791. if len(in.CompositingReasonIDs) != 0 {
  1792. const prefix string = ",\"compositingReasonIds\":"
  1793. if first {
  1794. first = false
  1795. out.RawString(prefix[1:])
  1796. } else {
  1797. out.RawString(prefix)
  1798. }
  1799. {
  1800. out.RawByte('[')
  1801. for v26, v27 := range in.CompositingReasonIDs {
  1802. if v26 > 0 {
  1803. out.RawByte(',')
  1804. }
  1805. out.String(string(v27))
  1806. }
  1807. out.RawByte(']')
  1808. }
  1809. }
  1810. out.RawByte('}')
  1811. }
  1812. // MarshalJSON supports json.Marshaler interface
  1813. func (v CompositingReasonsReturns) MarshalJSON() ([]byte, error) {
  1814. w := jwriter.Writer{}
  1815. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree19(&w, v)
  1816. return w.Buffer.BuildBytes(), w.Error
  1817. }
  1818. // MarshalEasyJSON supports easyjson.Marshaler interface
  1819. func (v CompositingReasonsReturns) MarshalEasyJSON(w *jwriter.Writer) {
  1820. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree19(w, v)
  1821. }
  1822. // UnmarshalJSON supports json.Unmarshaler interface
  1823. func (v *CompositingReasonsReturns) UnmarshalJSON(data []byte) error {
  1824. r := jlexer.Lexer{Data: data}
  1825. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree19(&r, v)
  1826. return r.Error()
  1827. }
  1828. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1829. func (v *CompositingReasonsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1830. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree19(l, v)
  1831. }
  1832. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree20(in *jlexer.Lexer, out *CompositingReasonsParams) {
  1833. isTopLevel := in.IsStart()
  1834. if in.IsNull() {
  1835. if isTopLevel {
  1836. in.Consumed()
  1837. }
  1838. in.Skip()
  1839. return
  1840. }
  1841. in.Delim('{')
  1842. for !in.IsDelim('}') {
  1843. key := in.UnsafeFieldName(false)
  1844. in.WantColon()
  1845. if in.IsNull() {
  1846. in.Skip()
  1847. in.WantComma()
  1848. continue
  1849. }
  1850. switch key {
  1851. case "layerId":
  1852. out.LayerID = LayerID(in.String())
  1853. default:
  1854. in.SkipRecursive()
  1855. }
  1856. in.WantComma()
  1857. }
  1858. in.Delim('}')
  1859. if isTopLevel {
  1860. in.Consumed()
  1861. }
  1862. }
  1863. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree20(out *jwriter.Writer, in CompositingReasonsParams) {
  1864. out.RawByte('{')
  1865. first := true
  1866. _ = first
  1867. {
  1868. const prefix string = ",\"layerId\":"
  1869. out.RawString(prefix[1:])
  1870. out.String(string(in.LayerID))
  1871. }
  1872. out.RawByte('}')
  1873. }
  1874. // MarshalJSON supports json.Marshaler interface
  1875. func (v CompositingReasonsParams) MarshalJSON() ([]byte, error) {
  1876. w := jwriter.Writer{}
  1877. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree20(&w, v)
  1878. return w.Buffer.BuildBytes(), w.Error
  1879. }
  1880. // MarshalEasyJSON supports easyjson.Marshaler interface
  1881. func (v CompositingReasonsParams) MarshalEasyJSON(w *jwriter.Writer) {
  1882. easyjsonC5a4559bEncodeGithubComChromedpCdprotoLayertree20(w, v)
  1883. }
  1884. // UnmarshalJSON supports json.Unmarshaler interface
  1885. func (v *CompositingReasonsParams) UnmarshalJSON(data []byte) error {
  1886. r := jlexer.Lexer{Data: data}
  1887. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree20(&r, v)
  1888. return r.Error()
  1889. }
  1890. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1891. func (v *CompositingReasonsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1892. easyjsonC5a4559bDecodeGithubComChromedpCdprotoLayertree20(l, v)
  1893. }