easyjson.go 34 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package systeminfo
  3. import (
  4. json "encoding/json"
  5. easyjson "github.com/mailru/easyjson"
  6. jlexer "github.com/mailru/easyjson/jlexer"
  7. jwriter "github.com/mailru/easyjson/jwriter"
  8. )
  9. // suppress unused package warning
  10. var (
  11. _ *json.RawMessage
  12. _ *jlexer.Lexer
  13. _ *jwriter.Writer
  14. _ easyjson.Marshaler
  15. )
  16. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo(in *jlexer.Lexer, out *VideoEncodeAcceleratorCapability) {
  17. isTopLevel := in.IsStart()
  18. if in.IsNull() {
  19. if isTopLevel {
  20. in.Consumed()
  21. }
  22. in.Skip()
  23. return
  24. }
  25. in.Delim('{')
  26. for !in.IsDelim('}') {
  27. key := in.UnsafeFieldName(false)
  28. in.WantColon()
  29. if in.IsNull() {
  30. in.Skip()
  31. in.WantComma()
  32. continue
  33. }
  34. switch key {
  35. case "profile":
  36. out.Profile = string(in.String())
  37. case "maxResolution":
  38. if in.IsNull() {
  39. in.Skip()
  40. out.MaxResolution = nil
  41. } else {
  42. if out.MaxResolution == nil {
  43. out.MaxResolution = new(Size)
  44. }
  45. (*out.MaxResolution).UnmarshalEasyJSON(in)
  46. }
  47. case "maxFramerateNumerator":
  48. out.MaxFramerateNumerator = int64(in.Int64())
  49. case "maxFramerateDenominator":
  50. out.MaxFramerateDenominator = int64(in.Int64())
  51. default:
  52. in.SkipRecursive()
  53. }
  54. in.WantComma()
  55. }
  56. in.Delim('}')
  57. if isTopLevel {
  58. in.Consumed()
  59. }
  60. }
  61. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo(out *jwriter.Writer, in VideoEncodeAcceleratorCapability) {
  62. out.RawByte('{')
  63. first := true
  64. _ = first
  65. {
  66. const prefix string = ",\"profile\":"
  67. out.RawString(prefix[1:])
  68. out.String(string(in.Profile))
  69. }
  70. {
  71. const prefix string = ",\"maxResolution\":"
  72. out.RawString(prefix)
  73. if in.MaxResolution == nil {
  74. out.RawString("null")
  75. } else {
  76. (*in.MaxResolution).MarshalEasyJSON(out)
  77. }
  78. }
  79. {
  80. const prefix string = ",\"maxFramerateNumerator\":"
  81. out.RawString(prefix)
  82. out.Int64(int64(in.MaxFramerateNumerator))
  83. }
  84. {
  85. const prefix string = ",\"maxFramerateDenominator\":"
  86. out.RawString(prefix)
  87. out.Int64(int64(in.MaxFramerateDenominator))
  88. }
  89. out.RawByte('}')
  90. }
  91. // MarshalJSON supports json.Marshaler interface
  92. func (v VideoEncodeAcceleratorCapability) MarshalJSON() ([]byte, error) {
  93. w := jwriter.Writer{}
  94. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo(&w, v)
  95. return w.Buffer.BuildBytes(), w.Error
  96. }
  97. // MarshalEasyJSON supports easyjson.Marshaler interface
  98. func (v VideoEncodeAcceleratorCapability) MarshalEasyJSON(w *jwriter.Writer) {
  99. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo(w, v)
  100. }
  101. // UnmarshalJSON supports json.Unmarshaler interface
  102. func (v *VideoEncodeAcceleratorCapability) UnmarshalJSON(data []byte) error {
  103. r := jlexer.Lexer{Data: data}
  104. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo(&r, v)
  105. return r.Error()
  106. }
  107. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  108. func (v *VideoEncodeAcceleratorCapability) UnmarshalEasyJSON(l *jlexer.Lexer) {
  109. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo(l, v)
  110. }
  111. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo1(in *jlexer.Lexer, out *VideoDecodeAcceleratorCapability) {
  112. isTopLevel := in.IsStart()
  113. if in.IsNull() {
  114. if isTopLevel {
  115. in.Consumed()
  116. }
  117. in.Skip()
  118. return
  119. }
  120. in.Delim('{')
  121. for !in.IsDelim('}') {
  122. key := in.UnsafeFieldName(false)
  123. in.WantColon()
  124. if in.IsNull() {
  125. in.Skip()
  126. in.WantComma()
  127. continue
  128. }
  129. switch key {
  130. case "profile":
  131. out.Profile = string(in.String())
  132. case "maxResolution":
  133. if in.IsNull() {
  134. in.Skip()
  135. out.MaxResolution = nil
  136. } else {
  137. if out.MaxResolution == nil {
  138. out.MaxResolution = new(Size)
  139. }
  140. (*out.MaxResolution).UnmarshalEasyJSON(in)
  141. }
  142. case "minResolution":
  143. if in.IsNull() {
  144. in.Skip()
  145. out.MinResolution = nil
  146. } else {
  147. if out.MinResolution == nil {
  148. out.MinResolution = new(Size)
  149. }
  150. (*out.MinResolution).UnmarshalEasyJSON(in)
  151. }
  152. default:
  153. in.SkipRecursive()
  154. }
  155. in.WantComma()
  156. }
  157. in.Delim('}')
  158. if isTopLevel {
  159. in.Consumed()
  160. }
  161. }
  162. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo1(out *jwriter.Writer, in VideoDecodeAcceleratorCapability) {
  163. out.RawByte('{')
  164. first := true
  165. _ = first
  166. {
  167. const prefix string = ",\"profile\":"
  168. out.RawString(prefix[1:])
  169. out.String(string(in.Profile))
  170. }
  171. {
  172. const prefix string = ",\"maxResolution\":"
  173. out.RawString(prefix)
  174. if in.MaxResolution == nil {
  175. out.RawString("null")
  176. } else {
  177. (*in.MaxResolution).MarshalEasyJSON(out)
  178. }
  179. }
  180. {
  181. const prefix string = ",\"minResolution\":"
  182. out.RawString(prefix)
  183. if in.MinResolution == nil {
  184. out.RawString("null")
  185. } else {
  186. (*in.MinResolution).MarshalEasyJSON(out)
  187. }
  188. }
  189. out.RawByte('}')
  190. }
  191. // MarshalJSON supports json.Marshaler interface
  192. func (v VideoDecodeAcceleratorCapability) MarshalJSON() ([]byte, error) {
  193. w := jwriter.Writer{}
  194. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo1(&w, v)
  195. return w.Buffer.BuildBytes(), w.Error
  196. }
  197. // MarshalEasyJSON supports easyjson.Marshaler interface
  198. func (v VideoDecodeAcceleratorCapability) MarshalEasyJSON(w *jwriter.Writer) {
  199. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo1(w, v)
  200. }
  201. // UnmarshalJSON supports json.Unmarshaler interface
  202. func (v *VideoDecodeAcceleratorCapability) UnmarshalJSON(data []byte) error {
  203. r := jlexer.Lexer{Data: data}
  204. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo1(&r, v)
  205. return r.Error()
  206. }
  207. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  208. func (v *VideoDecodeAcceleratorCapability) UnmarshalEasyJSON(l *jlexer.Lexer) {
  209. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo1(l, v)
  210. }
  211. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo2(in *jlexer.Lexer, out *Size) {
  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 "width":
  231. out.Width = int64(in.Int64())
  232. case "height":
  233. out.Height = int64(in.Int64())
  234. default:
  235. in.SkipRecursive()
  236. }
  237. in.WantComma()
  238. }
  239. in.Delim('}')
  240. if isTopLevel {
  241. in.Consumed()
  242. }
  243. }
  244. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo2(out *jwriter.Writer, in Size) {
  245. out.RawByte('{')
  246. first := true
  247. _ = first
  248. {
  249. const prefix string = ",\"width\":"
  250. out.RawString(prefix[1:])
  251. out.Int64(int64(in.Width))
  252. }
  253. {
  254. const prefix string = ",\"height\":"
  255. out.RawString(prefix)
  256. out.Int64(int64(in.Height))
  257. }
  258. out.RawByte('}')
  259. }
  260. // MarshalJSON supports json.Marshaler interface
  261. func (v Size) MarshalJSON() ([]byte, error) {
  262. w := jwriter.Writer{}
  263. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo2(&w, v)
  264. return w.Buffer.BuildBytes(), w.Error
  265. }
  266. // MarshalEasyJSON supports easyjson.Marshaler interface
  267. func (v Size) MarshalEasyJSON(w *jwriter.Writer) {
  268. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo2(w, v)
  269. }
  270. // UnmarshalJSON supports json.Unmarshaler interface
  271. func (v *Size) UnmarshalJSON(data []byte) error {
  272. r := jlexer.Lexer{Data: data}
  273. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo2(&r, v)
  274. return r.Error()
  275. }
  276. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  277. func (v *Size) UnmarshalEasyJSON(l *jlexer.Lexer) {
  278. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo2(l, v)
  279. }
  280. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo3(in *jlexer.Lexer, out *ProcessInfo) {
  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 "type":
  300. out.Type = string(in.String())
  301. case "id":
  302. out.ID = int64(in.Int64())
  303. case "cpuTime":
  304. out.CPUTime = float64(in.Float64())
  305. default:
  306. in.SkipRecursive()
  307. }
  308. in.WantComma()
  309. }
  310. in.Delim('}')
  311. if isTopLevel {
  312. in.Consumed()
  313. }
  314. }
  315. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo3(out *jwriter.Writer, in ProcessInfo) {
  316. out.RawByte('{')
  317. first := true
  318. _ = first
  319. {
  320. const prefix string = ",\"type\":"
  321. out.RawString(prefix[1:])
  322. out.String(string(in.Type))
  323. }
  324. {
  325. const prefix string = ",\"id\":"
  326. out.RawString(prefix)
  327. out.Int64(int64(in.ID))
  328. }
  329. {
  330. const prefix string = ",\"cpuTime\":"
  331. out.RawString(prefix)
  332. out.Float64(float64(in.CPUTime))
  333. }
  334. out.RawByte('}')
  335. }
  336. // MarshalJSON supports json.Marshaler interface
  337. func (v ProcessInfo) MarshalJSON() ([]byte, error) {
  338. w := jwriter.Writer{}
  339. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo3(&w, v)
  340. return w.Buffer.BuildBytes(), w.Error
  341. }
  342. // MarshalEasyJSON supports easyjson.Marshaler interface
  343. func (v ProcessInfo) MarshalEasyJSON(w *jwriter.Writer) {
  344. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo3(w, v)
  345. }
  346. // UnmarshalJSON supports json.Unmarshaler interface
  347. func (v *ProcessInfo) UnmarshalJSON(data []byte) error {
  348. r := jlexer.Lexer{Data: data}
  349. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo3(&r, v)
  350. return r.Error()
  351. }
  352. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  353. func (v *ProcessInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
  354. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo3(l, v)
  355. }
  356. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo4(in *jlexer.Lexer, out *ImageDecodeAcceleratorCapability) {
  357. isTopLevel := in.IsStart()
  358. if in.IsNull() {
  359. if isTopLevel {
  360. in.Consumed()
  361. }
  362. in.Skip()
  363. return
  364. }
  365. in.Delim('{')
  366. for !in.IsDelim('}') {
  367. key := in.UnsafeFieldName(false)
  368. in.WantColon()
  369. if in.IsNull() {
  370. in.Skip()
  371. in.WantComma()
  372. continue
  373. }
  374. switch key {
  375. case "imageType":
  376. (out.ImageType).UnmarshalEasyJSON(in)
  377. case "maxDimensions":
  378. if in.IsNull() {
  379. in.Skip()
  380. out.MaxDimensions = nil
  381. } else {
  382. if out.MaxDimensions == nil {
  383. out.MaxDimensions = new(Size)
  384. }
  385. (*out.MaxDimensions).UnmarshalEasyJSON(in)
  386. }
  387. case "minDimensions":
  388. if in.IsNull() {
  389. in.Skip()
  390. out.MinDimensions = nil
  391. } else {
  392. if out.MinDimensions == nil {
  393. out.MinDimensions = new(Size)
  394. }
  395. (*out.MinDimensions).UnmarshalEasyJSON(in)
  396. }
  397. case "subsamplings":
  398. if in.IsNull() {
  399. in.Skip()
  400. out.Subsamplings = nil
  401. } else {
  402. in.Delim('[')
  403. if out.Subsamplings == nil {
  404. if !in.IsDelim(']') {
  405. out.Subsamplings = make([]SubsamplingFormat, 0, 4)
  406. } else {
  407. out.Subsamplings = []SubsamplingFormat{}
  408. }
  409. } else {
  410. out.Subsamplings = (out.Subsamplings)[:0]
  411. }
  412. for !in.IsDelim(']') {
  413. var v1 SubsamplingFormat
  414. (v1).UnmarshalEasyJSON(in)
  415. out.Subsamplings = append(out.Subsamplings, v1)
  416. in.WantComma()
  417. }
  418. in.Delim(']')
  419. }
  420. default:
  421. in.SkipRecursive()
  422. }
  423. in.WantComma()
  424. }
  425. in.Delim('}')
  426. if isTopLevel {
  427. in.Consumed()
  428. }
  429. }
  430. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo4(out *jwriter.Writer, in ImageDecodeAcceleratorCapability) {
  431. out.RawByte('{')
  432. first := true
  433. _ = first
  434. {
  435. const prefix string = ",\"imageType\":"
  436. out.RawString(prefix[1:])
  437. (in.ImageType).MarshalEasyJSON(out)
  438. }
  439. {
  440. const prefix string = ",\"maxDimensions\":"
  441. out.RawString(prefix)
  442. if in.MaxDimensions == nil {
  443. out.RawString("null")
  444. } else {
  445. (*in.MaxDimensions).MarshalEasyJSON(out)
  446. }
  447. }
  448. {
  449. const prefix string = ",\"minDimensions\":"
  450. out.RawString(prefix)
  451. if in.MinDimensions == nil {
  452. out.RawString("null")
  453. } else {
  454. (*in.MinDimensions).MarshalEasyJSON(out)
  455. }
  456. }
  457. {
  458. const prefix string = ",\"subsamplings\":"
  459. out.RawString(prefix)
  460. if in.Subsamplings == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  461. out.RawString("null")
  462. } else {
  463. out.RawByte('[')
  464. for v2, v3 := range in.Subsamplings {
  465. if v2 > 0 {
  466. out.RawByte(',')
  467. }
  468. (v3).MarshalEasyJSON(out)
  469. }
  470. out.RawByte(']')
  471. }
  472. }
  473. out.RawByte('}')
  474. }
  475. // MarshalJSON supports json.Marshaler interface
  476. func (v ImageDecodeAcceleratorCapability) MarshalJSON() ([]byte, error) {
  477. w := jwriter.Writer{}
  478. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo4(&w, v)
  479. return w.Buffer.BuildBytes(), w.Error
  480. }
  481. // MarshalEasyJSON supports easyjson.Marshaler interface
  482. func (v ImageDecodeAcceleratorCapability) MarshalEasyJSON(w *jwriter.Writer) {
  483. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo4(w, v)
  484. }
  485. // UnmarshalJSON supports json.Unmarshaler interface
  486. func (v *ImageDecodeAcceleratorCapability) UnmarshalJSON(data []byte) error {
  487. r := jlexer.Lexer{Data: data}
  488. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo4(&r, v)
  489. return r.Error()
  490. }
  491. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  492. func (v *ImageDecodeAcceleratorCapability) UnmarshalEasyJSON(l *jlexer.Lexer) {
  493. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo4(l, v)
  494. }
  495. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo5(in *jlexer.Lexer, out *GetProcessInfoReturns) {
  496. isTopLevel := in.IsStart()
  497. if in.IsNull() {
  498. if isTopLevel {
  499. in.Consumed()
  500. }
  501. in.Skip()
  502. return
  503. }
  504. in.Delim('{')
  505. for !in.IsDelim('}') {
  506. key := in.UnsafeFieldName(false)
  507. in.WantColon()
  508. if in.IsNull() {
  509. in.Skip()
  510. in.WantComma()
  511. continue
  512. }
  513. switch key {
  514. case "processInfo":
  515. if in.IsNull() {
  516. in.Skip()
  517. out.ProcessInfo = nil
  518. } else {
  519. in.Delim('[')
  520. if out.ProcessInfo == nil {
  521. if !in.IsDelim(']') {
  522. out.ProcessInfo = make([]*ProcessInfo, 0, 8)
  523. } else {
  524. out.ProcessInfo = []*ProcessInfo{}
  525. }
  526. } else {
  527. out.ProcessInfo = (out.ProcessInfo)[:0]
  528. }
  529. for !in.IsDelim(']') {
  530. var v4 *ProcessInfo
  531. if in.IsNull() {
  532. in.Skip()
  533. v4 = nil
  534. } else {
  535. if v4 == nil {
  536. v4 = new(ProcessInfo)
  537. }
  538. (*v4).UnmarshalEasyJSON(in)
  539. }
  540. out.ProcessInfo = append(out.ProcessInfo, v4)
  541. in.WantComma()
  542. }
  543. in.Delim(']')
  544. }
  545. default:
  546. in.SkipRecursive()
  547. }
  548. in.WantComma()
  549. }
  550. in.Delim('}')
  551. if isTopLevel {
  552. in.Consumed()
  553. }
  554. }
  555. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo5(out *jwriter.Writer, in GetProcessInfoReturns) {
  556. out.RawByte('{')
  557. first := true
  558. _ = first
  559. if len(in.ProcessInfo) != 0 {
  560. const prefix string = ",\"processInfo\":"
  561. first = false
  562. out.RawString(prefix[1:])
  563. {
  564. out.RawByte('[')
  565. for v5, v6 := range in.ProcessInfo {
  566. if v5 > 0 {
  567. out.RawByte(',')
  568. }
  569. if v6 == nil {
  570. out.RawString("null")
  571. } else {
  572. (*v6).MarshalEasyJSON(out)
  573. }
  574. }
  575. out.RawByte(']')
  576. }
  577. }
  578. out.RawByte('}')
  579. }
  580. // MarshalJSON supports json.Marshaler interface
  581. func (v GetProcessInfoReturns) MarshalJSON() ([]byte, error) {
  582. w := jwriter.Writer{}
  583. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo5(&w, v)
  584. return w.Buffer.BuildBytes(), w.Error
  585. }
  586. // MarshalEasyJSON supports easyjson.Marshaler interface
  587. func (v GetProcessInfoReturns) MarshalEasyJSON(w *jwriter.Writer) {
  588. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo5(w, v)
  589. }
  590. // UnmarshalJSON supports json.Unmarshaler interface
  591. func (v *GetProcessInfoReturns) UnmarshalJSON(data []byte) error {
  592. r := jlexer.Lexer{Data: data}
  593. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo5(&r, v)
  594. return r.Error()
  595. }
  596. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  597. func (v *GetProcessInfoReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  598. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo5(l, v)
  599. }
  600. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo6(in *jlexer.Lexer, out *GetProcessInfoParams) {
  601. isTopLevel := in.IsStart()
  602. if in.IsNull() {
  603. if isTopLevel {
  604. in.Consumed()
  605. }
  606. in.Skip()
  607. return
  608. }
  609. in.Delim('{')
  610. for !in.IsDelim('}') {
  611. key := in.UnsafeFieldName(false)
  612. in.WantColon()
  613. if in.IsNull() {
  614. in.Skip()
  615. in.WantComma()
  616. continue
  617. }
  618. switch key {
  619. default:
  620. in.SkipRecursive()
  621. }
  622. in.WantComma()
  623. }
  624. in.Delim('}')
  625. if isTopLevel {
  626. in.Consumed()
  627. }
  628. }
  629. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo6(out *jwriter.Writer, in GetProcessInfoParams) {
  630. out.RawByte('{')
  631. first := true
  632. _ = first
  633. out.RawByte('}')
  634. }
  635. // MarshalJSON supports json.Marshaler interface
  636. func (v GetProcessInfoParams) MarshalJSON() ([]byte, error) {
  637. w := jwriter.Writer{}
  638. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo6(&w, v)
  639. return w.Buffer.BuildBytes(), w.Error
  640. }
  641. // MarshalEasyJSON supports easyjson.Marshaler interface
  642. func (v GetProcessInfoParams) MarshalEasyJSON(w *jwriter.Writer) {
  643. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo6(w, v)
  644. }
  645. // UnmarshalJSON supports json.Unmarshaler interface
  646. func (v *GetProcessInfoParams) UnmarshalJSON(data []byte) error {
  647. r := jlexer.Lexer{Data: data}
  648. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo6(&r, v)
  649. return r.Error()
  650. }
  651. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  652. func (v *GetProcessInfoParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  653. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo6(l, v)
  654. }
  655. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo7(in *jlexer.Lexer, out *GetInfoReturns) {
  656. isTopLevel := in.IsStart()
  657. if in.IsNull() {
  658. if isTopLevel {
  659. in.Consumed()
  660. }
  661. in.Skip()
  662. return
  663. }
  664. in.Delim('{')
  665. for !in.IsDelim('}') {
  666. key := in.UnsafeFieldName(false)
  667. in.WantColon()
  668. if in.IsNull() {
  669. in.Skip()
  670. in.WantComma()
  671. continue
  672. }
  673. switch key {
  674. case "gpu":
  675. if in.IsNull() {
  676. in.Skip()
  677. out.Gpu = nil
  678. } else {
  679. if out.Gpu == nil {
  680. out.Gpu = new(GPUInfo)
  681. }
  682. (*out.Gpu).UnmarshalEasyJSON(in)
  683. }
  684. case "modelName":
  685. out.ModelName = string(in.String())
  686. case "modelVersion":
  687. out.ModelVersion = string(in.String())
  688. case "commandLine":
  689. out.CommandLine = string(in.String())
  690. default:
  691. in.SkipRecursive()
  692. }
  693. in.WantComma()
  694. }
  695. in.Delim('}')
  696. if isTopLevel {
  697. in.Consumed()
  698. }
  699. }
  700. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo7(out *jwriter.Writer, in GetInfoReturns) {
  701. out.RawByte('{')
  702. first := true
  703. _ = first
  704. if in.Gpu != nil {
  705. const prefix string = ",\"gpu\":"
  706. first = false
  707. out.RawString(prefix[1:])
  708. (*in.Gpu).MarshalEasyJSON(out)
  709. }
  710. if in.ModelName != "" {
  711. const prefix string = ",\"modelName\":"
  712. if first {
  713. first = false
  714. out.RawString(prefix[1:])
  715. } else {
  716. out.RawString(prefix)
  717. }
  718. out.String(string(in.ModelName))
  719. }
  720. if in.ModelVersion != "" {
  721. const prefix string = ",\"modelVersion\":"
  722. if first {
  723. first = false
  724. out.RawString(prefix[1:])
  725. } else {
  726. out.RawString(prefix)
  727. }
  728. out.String(string(in.ModelVersion))
  729. }
  730. if in.CommandLine != "" {
  731. const prefix string = ",\"commandLine\":"
  732. if first {
  733. first = false
  734. out.RawString(prefix[1:])
  735. } else {
  736. out.RawString(prefix)
  737. }
  738. out.String(string(in.CommandLine))
  739. }
  740. out.RawByte('}')
  741. }
  742. // MarshalJSON supports json.Marshaler interface
  743. func (v GetInfoReturns) MarshalJSON() ([]byte, error) {
  744. w := jwriter.Writer{}
  745. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo7(&w, v)
  746. return w.Buffer.BuildBytes(), w.Error
  747. }
  748. // MarshalEasyJSON supports easyjson.Marshaler interface
  749. func (v GetInfoReturns) MarshalEasyJSON(w *jwriter.Writer) {
  750. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo7(w, v)
  751. }
  752. // UnmarshalJSON supports json.Unmarshaler interface
  753. func (v *GetInfoReturns) UnmarshalJSON(data []byte) error {
  754. r := jlexer.Lexer{Data: data}
  755. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo7(&r, v)
  756. return r.Error()
  757. }
  758. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  759. func (v *GetInfoReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  760. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo7(l, v)
  761. }
  762. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo8(in *jlexer.Lexer, out *GetInfoParams) {
  763. isTopLevel := in.IsStart()
  764. if in.IsNull() {
  765. if isTopLevel {
  766. in.Consumed()
  767. }
  768. in.Skip()
  769. return
  770. }
  771. in.Delim('{')
  772. for !in.IsDelim('}') {
  773. key := in.UnsafeFieldName(false)
  774. in.WantColon()
  775. if in.IsNull() {
  776. in.Skip()
  777. in.WantComma()
  778. continue
  779. }
  780. switch key {
  781. default:
  782. in.SkipRecursive()
  783. }
  784. in.WantComma()
  785. }
  786. in.Delim('}')
  787. if isTopLevel {
  788. in.Consumed()
  789. }
  790. }
  791. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo8(out *jwriter.Writer, in GetInfoParams) {
  792. out.RawByte('{')
  793. first := true
  794. _ = first
  795. out.RawByte('}')
  796. }
  797. // MarshalJSON supports json.Marshaler interface
  798. func (v GetInfoParams) MarshalJSON() ([]byte, error) {
  799. w := jwriter.Writer{}
  800. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo8(&w, v)
  801. return w.Buffer.BuildBytes(), w.Error
  802. }
  803. // MarshalEasyJSON supports easyjson.Marshaler interface
  804. func (v GetInfoParams) MarshalEasyJSON(w *jwriter.Writer) {
  805. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo8(w, v)
  806. }
  807. // UnmarshalJSON supports json.Unmarshaler interface
  808. func (v *GetInfoParams) UnmarshalJSON(data []byte) error {
  809. r := jlexer.Lexer{Data: data}
  810. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo8(&r, v)
  811. return r.Error()
  812. }
  813. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  814. func (v *GetInfoParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  815. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo8(l, v)
  816. }
  817. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo9(in *jlexer.Lexer, out *GetFeatureStateReturns) {
  818. isTopLevel := in.IsStart()
  819. if in.IsNull() {
  820. if isTopLevel {
  821. in.Consumed()
  822. }
  823. in.Skip()
  824. return
  825. }
  826. in.Delim('{')
  827. for !in.IsDelim('}') {
  828. key := in.UnsafeFieldName(false)
  829. in.WantColon()
  830. if in.IsNull() {
  831. in.Skip()
  832. in.WantComma()
  833. continue
  834. }
  835. switch key {
  836. case "featureEnabled":
  837. out.FeatureEnabled = bool(in.Bool())
  838. default:
  839. in.SkipRecursive()
  840. }
  841. in.WantComma()
  842. }
  843. in.Delim('}')
  844. if isTopLevel {
  845. in.Consumed()
  846. }
  847. }
  848. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo9(out *jwriter.Writer, in GetFeatureStateReturns) {
  849. out.RawByte('{')
  850. first := true
  851. _ = first
  852. if in.FeatureEnabled {
  853. const prefix string = ",\"featureEnabled\":"
  854. first = false
  855. out.RawString(prefix[1:])
  856. out.Bool(bool(in.FeatureEnabled))
  857. }
  858. out.RawByte('}')
  859. }
  860. // MarshalJSON supports json.Marshaler interface
  861. func (v GetFeatureStateReturns) MarshalJSON() ([]byte, error) {
  862. w := jwriter.Writer{}
  863. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo9(&w, v)
  864. return w.Buffer.BuildBytes(), w.Error
  865. }
  866. // MarshalEasyJSON supports easyjson.Marshaler interface
  867. func (v GetFeatureStateReturns) MarshalEasyJSON(w *jwriter.Writer) {
  868. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo9(w, v)
  869. }
  870. // UnmarshalJSON supports json.Unmarshaler interface
  871. func (v *GetFeatureStateReturns) UnmarshalJSON(data []byte) error {
  872. r := jlexer.Lexer{Data: data}
  873. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo9(&r, v)
  874. return r.Error()
  875. }
  876. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  877. func (v *GetFeatureStateReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  878. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo9(l, v)
  879. }
  880. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo10(in *jlexer.Lexer, out *GetFeatureStateParams) {
  881. isTopLevel := in.IsStart()
  882. if in.IsNull() {
  883. if isTopLevel {
  884. in.Consumed()
  885. }
  886. in.Skip()
  887. return
  888. }
  889. in.Delim('{')
  890. for !in.IsDelim('}') {
  891. key := in.UnsafeFieldName(false)
  892. in.WantColon()
  893. if in.IsNull() {
  894. in.Skip()
  895. in.WantComma()
  896. continue
  897. }
  898. switch key {
  899. case "featureState":
  900. out.FeatureState = string(in.String())
  901. default:
  902. in.SkipRecursive()
  903. }
  904. in.WantComma()
  905. }
  906. in.Delim('}')
  907. if isTopLevel {
  908. in.Consumed()
  909. }
  910. }
  911. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo10(out *jwriter.Writer, in GetFeatureStateParams) {
  912. out.RawByte('{')
  913. first := true
  914. _ = first
  915. {
  916. const prefix string = ",\"featureState\":"
  917. out.RawString(prefix[1:])
  918. out.String(string(in.FeatureState))
  919. }
  920. out.RawByte('}')
  921. }
  922. // MarshalJSON supports json.Marshaler interface
  923. func (v GetFeatureStateParams) MarshalJSON() ([]byte, error) {
  924. w := jwriter.Writer{}
  925. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo10(&w, v)
  926. return w.Buffer.BuildBytes(), w.Error
  927. }
  928. // MarshalEasyJSON supports easyjson.Marshaler interface
  929. func (v GetFeatureStateParams) MarshalEasyJSON(w *jwriter.Writer) {
  930. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo10(w, v)
  931. }
  932. // UnmarshalJSON supports json.Unmarshaler interface
  933. func (v *GetFeatureStateParams) UnmarshalJSON(data []byte) error {
  934. r := jlexer.Lexer{Data: data}
  935. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo10(&r, v)
  936. return r.Error()
  937. }
  938. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  939. func (v *GetFeatureStateParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  940. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo10(l, v)
  941. }
  942. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo11(in *jlexer.Lexer, out *GPUInfo) {
  943. isTopLevel := in.IsStart()
  944. if in.IsNull() {
  945. if isTopLevel {
  946. in.Consumed()
  947. }
  948. in.Skip()
  949. return
  950. }
  951. in.Delim('{')
  952. for !in.IsDelim('}') {
  953. key := in.UnsafeFieldName(false)
  954. in.WantColon()
  955. if in.IsNull() {
  956. in.Skip()
  957. in.WantComma()
  958. continue
  959. }
  960. switch key {
  961. case "devices":
  962. if in.IsNull() {
  963. in.Skip()
  964. out.Devices = nil
  965. } else {
  966. in.Delim('[')
  967. if out.Devices == nil {
  968. if !in.IsDelim(']') {
  969. out.Devices = make([]*GPUDevice, 0, 8)
  970. } else {
  971. out.Devices = []*GPUDevice{}
  972. }
  973. } else {
  974. out.Devices = (out.Devices)[:0]
  975. }
  976. for !in.IsDelim(']') {
  977. var v7 *GPUDevice
  978. if in.IsNull() {
  979. in.Skip()
  980. v7 = nil
  981. } else {
  982. if v7 == nil {
  983. v7 = new(GPUDevice)
  984. }
  985. (*v7).UnmarshalEasyJSON(in)
  986. }
  987. out.Devices = append(out.Devices, v7)
  988. in.WantComma()
  989. }
  990. in.Delim(']')
  991. }
  992. case "auxAttributes":
  993. (out.AuxAttributes).UnmarshalEasyJSON(in)
  994. case "featureStatus":
  995. (out.FeatureStatus).UnmarshalEasyJSON(in)
  996. case "driverBugWorkarounds":
  997. if in.IsNull() {
  998. in.Skip()
  999. out.DriverBugWorkarounds = nil
  1000. } else {
  1001. in.Delim('[')
  1002. if out.DriverBugWorkarounds == nil {
  1003. if !in.IsDelim(']') {
  1004. out.DriverBugWorkarounds = make([]string, 0, 4)
  1005. } else {
  1006. out.DriverBugWorkarounds = []string{}
  1007. }
  1008. } else {
  1009. out.DriverBugWorkarounds = (out.DriverBugWorkarounds)[:0]
  1010. }
  1011. for !in.IsDelim(']') {
  1012. var v8 string
  1013. v8 = string(in.String())
  1014. out.DriverBugWorkarounds = append(out.DriverBugWorkarounds, v8)
  1015. in.WantComma()
  1016. }
  1017. in.Delim(']')
  1018. }
  1019. case "videoDecoding":
  1020. if in.IsNull() {
  1021. in.Skip()
  1022. out.VideoDecoding = nil
  1023. } else {
  1024. in.Delim('[')
  1025. if out.VideoDecoding == nil {
  1026. if !in.IsDelim(']') {
  1027. out.VideoDecoding = make([]*VideoDecodeAcceleratorCapability, 0, 8)
  1028. } else {
  1029. out.VideoDecoding = []*VideoDecodeAcceleratorCapability{}
  1030. }
  1031. } else {
  1032. out.VideoDecoding = (out.VideoDecoding)[:0]
  1033. }
  1034. for !in.IsDelim(']') {
  1035. var v9 *VideoDecodeAcceleratorCapability
  1036. if in.IsNull() {
  1037. in.Skip()
  1038. v9 = nil
  1039. } else {
  1040. if v9 == nil {
  1041. v9 = new(VideoDecodeAcceleratorCapability)
  1042. }
  1043. (*v9).UnmarshalEasyJSON(in)
  1044. }
  1045. out.VideoDecoding = append(out.VideoDecoding, v9)
  1046. in.WantComma()
  1047. }
  1048. in.Delim(']')
  1049. }
  1050. case "videoEncoding":
  1051. if in.IsNull() {
  1052. in.Skip()
  1053. out.VideoEncoding = nil
  1054. } else {
  1055. in.Delim('[')
  1056. if out.VideoEncoding == nil {
  1057. if !in.IsDelim(']') {
  1058. out.VideoEncoding = make([]*VideoEncodeAcceleratorCapability, 0, 8)
  1059. } else {
  1060. out.VideoEncoding = []*VideoEncodeAcceleratorCapability{}
  1061. }
  1062. } else {
  1063. out.VideoEncoding = (out.VideoEncoding)[:0]
  1064. }
  1065. for !in.IsDelim(']') {
  1066. var v10 *VideoEncodeAcceleratorCapability
  1067. if in.IsNull() {
  1068. in.Skip()
  1069. v10 = nil
  1070. } else {
  1071. if v10 == nil {
  1072. v10 = new(VideoEncodeAcceleratorCapability)
  1073. }
  1074. (*v10).UnmarshalEasyJSON(in)
  1075. }
  1076. out.VideoEncoding = append(out.VideoEncoding, v10)
  1077. in.WantComma()
  1078. }
  1079. in.Delim(']')
  1080. }
  1081. case "imageDecoding":
  1082. if in.IsNull() {
  1083. in.Skip()
  1084. out.ImageDecoding = nil
  1085. } else {
  1086. in.Delim('[')
  1087. if out.ImageDecoding == nil {
  1088. if !in.IsDelim(']') {
  1089. out.ImageDecoding = make([]*ImageDecodeAcceleratorCapability, 0, 8)
  1090. } else {
  1091. out.ImageDecoding = []*ImageDecodeAcceleratorCapability{}
  1092. }
  1093. } else {
  1094. out.ImageDecoding = (out.ImageDecoding)[:0]
  1095. }
  1096. for !in.IsDelim(']') {
  1097. var v11 *ImageDecodeAcceleratorCapability
  1098. if in.IsNull() {
  1099. in.Skip()
  1100. v11 = nil
  1101. } else {
  1102. if v11 == nil {
  1103. v11 = new(ImageDecodeAcceleratorCapability)
  1104. }
  1105. (*v11).UnmarshalEasyJSON(in)
  1106. }
  1107. out.ImageDecoding = append(out.ImageDecoding, v11)
  1108. in.WantComma()
  1109. }
  1110. in.Delim(']')
  1111. }
  1112. default:
  1113. in.SkipRecursive()
  1114. }
  1115. in.WantComma()
  1116. }
  1117. in.Delim('}')
  1118. if isTopLevel {
  1119. in.Consumed()
  1120. }
  1121. }
  1122. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo11(out *jwriter.Writer, in GPUInfo) {
  1123. out.RawByte('{')
  1124. first := true
  1125. _ = first
  1126. {
  1127. const prefix string = ",\"devices\":"
  1128. out.RawString(prefix[1:])
  1129. if in.Devices == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1130. out.RawString("null")
  1131. } else {
  1132. out.RawByte('[')
  1133. for v12, v13 := range in.Devices {
  1134. if v12 > 0 {
  1135. out.RawByte(',')
  1136. }
  1137. if v13 == nil {
  1138. out.RawString("null")
  1139. } else {
  1140. (*v13).MarshalEasyJSON(out)
  1141. }
  1142. }
  1143. out.RawByte(']')
  1144. }
  1145. }
  1146. if (in.AuxAttributes).IsDefined() {
  1147. const prefix string = ",\"auxAttributes\":"
  1148. out.RawString(prefix)
  1149. (in.AuxAttributes).MarshalEasyJSON(out)
  1150. }
  1151. if (in.FeatureStatus).IsDefined() {
  1152. const prefix string = ",\"featureStatus\":"
  1153. out.RawString(prefix)
  1154. (in.FeatureStatus).MarshalEasyJSON(out)
  1155. }
  1156. {
  1157. const prefix string = ",\"driverBugWorkarounds\":"
  1158. out.RawString(prefix)
  1159. if in.DriverBugWorkarounds == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1160. out.RawString("null")
  1161. } else {
  1162. out.RawByte('[')
  1163. for v14, v15 := range in.DriverBugWorkarounds {
  1164. if v14 > 0 {
  1165. out.RawByte(',')
  1166. }
  1167. out.String(string(v15))
  1168. }
  1169. out.RawByte(']')
  1170. }
  1171. }
  1172. {
  1173. const prefix string = ",\"videoDecoding\":"
  1174. out.RawString(prefix)
  1175. if in.VideoDecoding == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1176. out.RawString("null")
  1177. } else {
  1178. out.RawByte('[')
  1179. for v16, v17 := range in.VideoDecoding {
  1180. if v16 > 0 {
  1181. out.RawByte(',')
  1182. }
  1183. if v17 == nil {
  1184. out.RawString("null")
  1185. } else {
  1186. (*v17).MarshalEasyJSON(out)
  1187. }
  1188. }
  1189. out.RawByte(']')
  1190. }
  1191. }
  1192. {
  1193. const prefix string = ",\"videoEncoding\":"
  1194. out.RawString(prefix)
  1195. if in.VideoEncoding == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1196. out.RawString("null")
  1197. } else {
  1198. out.RawByte('[')
  1199. for v18, v19 := range in.VideoEncoding {
  1200. if v18 > 0 {
  1201. out.RawByte(',')
  1202. }
  1203. if v19 == nil {
  1204. out.RawString("null")
  1205. } else {
  1206. (*v19).MarshalEasyJSON(out)
  1207. }
  1208. }
  1209. out.RawByte(']')
  1210. }
  1211. }
  1212. {
  1213. const prefix string = ",\"imageDecoding\":"
  1214. out.RawString(prefix)
  1215. if in.ImageDecoding == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  1216. out.RawString("null")
  1217. } else {
  1218. out.RawByte('[')
  1219. for v20, v21 := range in.ImageDecoding {
  1220. if v20 > 0 {
  1221. out.RawByte(',')
  1222. }
  1223. if v21 == nil {
  1224. out.RawString("null")
  1225. } else {
  1226. (*v21).MarshalEasyJSON(out)
  1227. }
  1228. }
  1229. out.RawByte(']')
  1230. }
  1231. }
  1232. out.RawByte('}')
  1233. }
  1234. // MarshalJSON supports json.Marshaler interface
  1235. func (v GPUInfo) MarshalJSON() ([]byte, error) {
  1236. w := jwriter.Writer{}
  1237. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo11(&w, v)
  1238. return w.Buffer.BuildBytes(), w.Error
  1239. }
  1240. // MarshalEasyJSON supports easyjson.Marshaler interface
  1241. func (v GPUInfo) MarshalEasyJSON(w *jwriter.Writer) {
  1242. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo11(w, v)
  1243. }
  1244. // UnmarshalJSON supports json.Unmarshaler interface
  1245. func (v *GPUInfo) UnmarshalJSON(data []byte) error {
  1246. r := jlexer.Lexer{Data: data}
  1247. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo11(&r, v)
  1248. return r.Error()
  1249. }
  1250. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1251. func (v *GPUInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1252. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo11(l, v)
  1253. }
  1254. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo12(in *jlexer.Lexer, out *GPUDevice) {
  1255. isTopLevel := in.IsStart()
  1256. if in.IsNull() {
  1257. if isTopLevel {
  1258. in.Consumed()
  1259. }
  1260. in.Skip()
  1261. return
  1262. }
  1263. in.Delim('{')
  1264. for !in.IsDelim('}') {
  1265. key := in.UnsafeFieldName(false)
  1266. in.WantColon()
  1267. if in.IsNull() {
  1268. in.Skip()
  1269. in.WantComma()
  1270. continue
  1271. }
  1272. switch key {
  1273. case "vendorId":
  1274. out.VendorID = float64(in.Float64())
  1275. case "deviceId":
  1276. out.DeviceID = float64(in.Float64())
  1277. case "subSysId":
  1278. out.SubSysID = float64(in.Float64())
  1279. case "revision":
  1280. out.Revision = float64(in.Float64())
  1281. case "vendorString":
  1282. out.VendorString = string(in.String())
  1283. case "deviceString":
  1284. out.DeviceString = string(in.String())
  1285. case "driverVendor":
  1286. out.DriverVendor = string(in.String())
  1287. case "driverVersion":
  1288. out.DriverVersion = string(in.String())
  1289. default:
  1290. in.SkipRecursive()
  1291. }
  1292. in.WantComma()
  1293. }
  1294. in.Delim('}')
  1295. if isTopLevel {
  1296. in.Consumed()
  1297. }
  1298. }
  1299. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo12(out *jwriter.Writer, in GPUDevice) {
  1300. out.RawByte('{')
  1301. first := true
  1302. _ = first
  1303. {
  1304. const prefix string = ",\"vendorId\":"
  1305. out.RawString(prefix[1:])
  1306. out.Float64(float64(in.VendorID))
  1307. }
  1308. {
  1309. const prefix string = ",\"deviceId\":"
  1310. out.RawString(prefix)
  1311. out.Float64(float64(in.DeviceID))
  1312. }
  1313. if in.SubSysID != 0 {
  1314. const prefix string = ",\"subSysId\":"
  1315. out.RawString(prefix)
  1316. out.Float64(float64(in.SubSysID))
  1317. }
  1318. if in.Revision != 0 {
  1319. const prefix string = ",\"revision\":"
  1320. out.RawString(prefix)
  1321. out.Float64(float64(in.Revision))
  1322. }
  1323. {
  1324. const prefix string = ",\"vendorString\":"
  1325. out.RawString(prefix)
  1326. out.String(string(in.VendorString))
  1327. }
  1328. {
  1329. const prefix string = ",\"deviceString\":"
  1330. out.RawString(prefix)
  1331. out.String(string(in.DeviceString))
  1332. }
  1333. {
  1334. const prefix string = ",\"driverVendor\":"
  1335. out.RawString(prefix)
  1336. out.String(string(in.DriverVendor))
  1337. }
  1338. {
  1339. const prefix string = ",\"driverVersion\":"
  1340. out.RawString(prefix)
  1341. out.String(string(in.DriverVersion))
  1342. }
  1343. out.RawByte('}')
  1344. }
  1345. // MarshalJSON supports json.Marshaler interface
  1346. func (v GPUDevice) MarshalJSON() ([]byte, error) {
  1347. w := jwriter.Writer{}
  1348. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo12(&w, v)
  1349. return w.Buffer.BuildBytes(), w.Error
  1350. }
  1351. // MarshalEasyJSON supports easyjson.Marshaler interface
  1352. func (v GPUDevice) MarshalEasyJSON(w *jwriter.Writer) {
  1353. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSysteminfo12(w, v)
  1354. }
  1355. // UnmarshalJSON supports json.Unmarshaler interface
  1356. func (v *GPUDevice) UnmarshalJSON(data []byte) error {
  1357. r := jlexer.Lexer{Data: data}
  1358. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo12(&r, v)
  1359. return r.Error()
  1360. }
  1361. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1362. func (v *GPUDevice) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1363. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSysteminfo12(l, v)
  1364. }