easyjson.go 27 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package media
  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 easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia(in *jlexer.Lexer, out *PlayerProperty) {
  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 "name":
  36. out.Name = string(in.String())
  37. case "value":
  38. out.Value = string(in.String())
  39. default:
  40. in.SkipRecursive()
  41. }
  42. in.WantComma()
  43. }
  44. in.Delim('}')
  45. if isTopLevel {
  46. in.Consumed()
  47. }
  48. }
  49. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia(out *jwriter.Writer, in PlayerProperty) {
  50. out.RawByte('{')
  51. first := true
  52. _ = first
  53. {
  54. const prefix string = ",\"name\":"
  55. out.RawString(prefix[1:])
  56. out.String(string(in.Name))
  57. }
  58. {
  59. const prefix string = ",\"value\":"
  60. out.RawString(prefix)
  61. out.String(string(in.Value))
  62. }
  63. out.RawByte('}')
  64. }
  65. // MarshalJSON supports json.Marshaler interface
  66. func (v PlayerProperty) MarshalJSON() ([]byte, error) {
  67. w := jwriter.Writer{}
  68. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia(&w, v)
  69. return w.Buffer.BuildBytes(), w.Error
  70. }
  71. // MarshalEasyJSON supports easyjson.Marshaler interface
  72. func (v PlayerProperty) MarshalEasyJSON(w *jwriter.Writer) {
  73. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia(w, v)
  74. }
  75. // UnmarshalJSON supports json.Unmarshaler interface
  76. func (v *PlayerProperty) UnmarshalJSON(data []byte) error {
  77. r := jlexer.Lexer{Data: data}
  78. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia(&r, v)
  79. return r.Error()
  80. }
  81. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  82. func (v *PlayerProperty) UnmarshalEasyJSON(l *jlexer.Lexer) {
  83. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia(l, v)
  84. }
  85. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia1(in *jlexer.Lexer, out *PlayerMessage) {
  86. isTopLevel := in.IsStart()
  87. if in.IsNull() {
  88. if isTopLevel {
  89. in.Consumed()
  90. }
  91. in.Skip()
  92. return
  93. }
  94. in.Delim('{')
  95. for !in.IsDelim('}') {
  96. key := in.UnsafeFieldName(false)
  97. in.WantColon()
  98. if in.IsNull() {
  99. in.Skip()
  100. in.WantComma()
  101. continue
  102. }
  103. switch key {
  104. case "level":
  105. (out.Level).UnmarshalEasyJSON(in)
  106. case "message":
  107. out.Message = string(in.String())
  108. default:
  109. in.SkipRecursive()
  110. }
  111. in.WantComma()
  112. }
  113. in.Delim('}')
  114. if isTopLevel {
  115. in.Consumed()
  116. }
  117. }
  118. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia1(out *jwriter.Writer, in PlayerMessage) {
  119. out.RawByte('{')
  120. first := true
  121. _ = first
  122. {
  123. const prefix string = ",\"level\":"
  124. out.RawString(prefix[1:])
  125. (in.Level).MarshalEasyJSON(out)
  126. }
  127. {
  128. const prefix string = ",\"message\":"
  129. out.RawString(prefix)
  130. out.String(string(in.Message))
  131. }
  132. out.RawByte('}')
  133. }
  134. // MarshalJSON supports json.Marshaler interface
  135. func (v PlayerMessage) MarshalJSON() ([]byte, error) {
  136. w := jwriter.Writer{}
  137. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia1(&w, v)
  138. return w.Buffer.BuildBytes(), w.Error
  139. }
  140. // MarshalEasyJSON supports easyjson.Marshaler interface
  141. func (v PlayerMessage) MarshalEasyJSON(w *jwriter.Writer) {
  142. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia1(w, v)
  143. }
  144. // UnmarshalJSON supports json.Unmarshaler interface
  145. func (v *PlayerMessage) UnmarshalJSON(data []byte) error {
  146. r := jlexer.Lexer{Data: data}
  147. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia1(&r, v)
  148. return r.Error()
  149. }
  150. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  151. func (v *PlayerMessage) UnmarshalEasyJSON(l *jlexer.Lexer) {
  152. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia1(l, v)
  153. }
  154. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia2(in *jlexer.Lexer, out *PlayerEvent) {
  155. isTopLevel := in.IsStart()
  156. if in.IsNull() {
  157. if isTopLevel {
  158. in.Consumed()
  159. }
  160. in.Skip()
  161. return
  162. }
  163. in.Delim('{')
  164. for !in.IsDelim('}') {
  165. key := in.UnsafeFieldName(false)
  166. in.WantColon()
  167. if in.IsNull() {
  168. in.Skip()
  169. in.WantComma()
  170. continue
  171. }
  172. switch key {
  173. case "timestamp":
  174. out.Timestamp = Timestamp(in.Float64())
  175. case "value":
  176. out.Value = string(in.String())
  177. default:
  178. in.SkipRecursive()
  179. }
  180. in.WantComma()
  181. }
  182. in.Delim('}')
  183. if isTopLevel {
  184. in.Consumed()
  185. }
  186. }
  187. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia2(out *jwriter.Writer, in PlayerEvent) {
  188. out.RawByte('{')
  189. first := true
  190. _ = first
  191. {
  192. const prefix string = ",\"timestamp\":"
  193. out.RawString(prefix[1:])
  194. out.Float64(float64(in.Timestamp))
  195. }
  196. {
  197. const prefix string = ",\"value\":"
  198. out.RawString(prefix)
  199. out.String(string(in.Value))
  200. }
  201. out.RawByte('}')
  202. }
  203. // MarshalJSON supports json.Marshaler interface
  204. func (v PlayerEvent) MarshalJSON() ([]byte, error) {
  205. w := jwriter.Writer{}
  206. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia2(&w, v)
  207. return w.Buffer.BuildBytes(), w.Error
  208. }
  209. // MarshalEasyJSON supports easyjson.Marshaler interface
  210. func (v PlayerEvent) MarshalEasyJSON(w *jwriter.Writer) {
  211. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia2(w, v)
  212. }
  213. // UnmarshalJSON supports json.Unmarshaler interface
  214. func (v *PlayerEvent) UnmarshalJSON(data []byte) error {
  215. r := jlexer.Lexer{Data: data}
  216. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia2(&r, v)
  217. return r.Error()
  218. }
  219. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  220. func (v *PlayerEvent) UnmarshalEasyJSON(l *jlexer.Lexer) {
  221. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia2(l, v)
  222. }
  223. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(in *jlexer.Lexer, out *PlayerErrorSourceLocation) {
  224. isTopLevel := in.IsStart()
  225. if in.IsNull() {
  226. if isTopLevel {
  227. in.Consumed()
  228. }
  229. in.Skip()
  230. return
  231. }
  232. in.Delim('{')
  233. for !in.IsDelim('}') {
  234. key := in.UnsafeFieldName(false)
  235. in.WantColon()
  236. if in.IsNull() {
  237. in.Skip()
  238. in.WantComma()
  239. continue
  240. }
  241. switch key {
  242. case "file":
  243. out.File = string(in.String())
  244. case "line":
  245. out.Line = int64(in.Int64())
  246. default:
  247. in.SkipRecursive()
  248. }
  249. in.WantComma()
  250. }
  251. in.Delim('}')
  252. if isTopLevel {
  253. in.Consumed()
  254. }
  255. }
  256. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(out *jwriter.Writer, in PlayerErrorSourceLocation) {
  257. out.RawByte('{')
  258. first := true
  259. _ = first
  260. {
  261. const prefix string = ",\"file\":"
  262. out.RawString(prefix[1:])
  263. out.String(string(in.File))
  264. }
  265. {
  266. const prefix string = ",\"line\":"
  267. out.RawString(prefix)
  268. out.Int64(int64(in.Line))
  269. }
  270. out.RawByte('}')
  271. }
  272. // MarshalJSON supports json.Marshaler interface
  273. func (v PlayerErrorSourceLocation) MarshalJSON() ([]byte, error) {
  274. w := jwriter.Writer{}
  275. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(&w, v)
  276. return w.Buffer.BuildBytes(), w.Error
  277. }
  278. // MarshalEasyJSON supports easyjson.Marshaler interface
  279. func (v PlayerErrorSourceLocation) MarshalEasyJSON(w *jwriter.Writer) {
  280. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia3(w, v)
  281. }
  282. // UnmarshalJSON supports json.Unmarshaler interface
  283. func (v *PlayerErrorSourceLocation) UnmarshalJSON(data []byte) error {
  284. r := jlexer.Lexer{Data: data}
  285. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(&r, v)
  286. return r.Error()
  287. }
  288. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  289. func (v *PlayerErrorSourceLocation) UnmarshalEasyJSON(l *jlexer.Lexer) {
  290. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia3(l, v)
  291. }
  292. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(in *jlexer.Lexer, out *PlayerError) {
  293. isTopLevel := in.IsStart()
  294. if in.IsNull() {
  295. if isTopLevel {
  296. in.Consumed()
  297. }
  298. in.Skip()
  299. return
  300. }
  301. in.Delim('{')
  302. for !in.IsDelim('}') {
  303. key := in.UnsafeFieldName(false)
  304. in.WantColon()
  305. if in.IsNull() {
  306. in.Skip()
  307. in.WantComma()
  308. continue
  309. }
  310. switch key {
  311. case "errorType":
  312. out.ErrorType = string(in.String())
  313. case "code":
  314. out.Code = int64(in.Int64())
  315. case "stack":
  316. if in.IsNull() {
  317. in.Skip()
  318. out.Stack = nil
  319. } else {
  320. in.Delim('[')
  321. if out.Stack == nil {
  322. if !in.IsDelim(']') {
  323. out.Stack = make([]*PlayerErrorSourceLocation, 0, 8)
  324. } else {
  325. out.Stack = []*PlayerErrorSourceLocation{}
  326. }
  327. } else {
  328. out.Stack = (out.Stack)[:0]
  329. }
  330. for !in.IsDelim(']') {
  331. var v1 *PlayerErrorSourceLocation
  332. if in.IsNull() {
  333. in.Skip()
  334. v1 = nil
  335. } else {
  336. if v1 == nil {
  337. v1 = new(PlayerErrorSourceLocation)
  338. }
  339. (*v1).UnmarshalEasyJSON(in)
  340. }
  341. out.Stack = append(out.Stack, v1)
  342. in.WantComma()
  343. }
  344. in.Delim(']')
  345. }
  346. case "cause":
  347. if in.IsNull() {
  348. in.Skip()
  349. out.Cause = nil
  350. } else {
  351. in.Delim('[')
  352. if out.Cause == nil {
  353. if !in.IsDelim(']') {
  354. out.Cause = make([]*PlayerError, 0, 8)
  355. } else {
  356. out.Cause = []*PlayerError{}
  357. }
  358. } else {
  359. out.Cause = (out.Cause)[:0]
  360. }
  361. for !in.IsDelim(']') {
  362. var v2 *PlayerError
  363. if in.IsNull() {
  364. in.Skip()
  365. v2 = nil
  366. } else {
  367. if v2 == nil {
  368. v2 = new(PlayerError)
  369. }
  370. (*v2).UnmarshalEasyJSON(in)
  371. }
  372. out.Cause = append(out.Cause, v2)
  373. in.WantComma()
  374. }
  375. in.Delim(']')
  376. }
  377. case "data":
  378. (out.Data).UnmarshalEasyJSON(in)
  379. default:
  380. in.SkipRecursive()
  381. }
  382. in.WantComma()
  383. }
  384. in.Delim('}')
  385. if isTopLevel {
  386. in.Consumed()
  387. }
  388. }
  389. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(out *jwriter.Writer, in PlayerError) {
  390. out.RawByte('{')
  391. first := true
  392. _ = first
  393. {
  394. const prefix string = ",\"errorType\":"
  395. out.RawString(prefix[1:])
  396. out.String(string(in.ErrorType))
  397. }
  398. {
  399. const prefix string = ",\"code\":"
  400. out.RawString(prefix)
  401. out.Int64(int64(in.Code))
  402. }
  403. {
  404. const prefix string = ",\"stack\":"
  405. out.RawString(prefix)
  406. if in.Stack == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  407. out.RawString("null")
  408. } else {
  409. out.RawByte('[')
  410. for v3, v4 := range in.Stack {
  411. if v3 > 0 {
  412. out.RawByte(',')
  413. }
  414. if v4 == nil {
  415. out.RawString("null")
  416. } else {
  417. (*v4).MarshalEasyJSON(out)
  418. }
  419. }
  420. out.RawByte(']')
  421. }
  422. }
  423. {
  424. const prefix string = ",\"cause\":"
  425. out.RawString(prefix)
  426. if in.Cause == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  427. out.RawString("null")
  428. } else {
  429. out.RawByte('[')
  430. for v5, v6 := range in.Cause {
  431. if v5 > 0 {
  432. out.RawByte(',')
  433. }
  434. if v6 == nil {
  435. out.RawString("null")
  436. } else {
  437. (*v6).MarshalEasyJSON(out)
  438. }
  439. }
  440. out.RawByte(']')
  441. }
  442. }
  443. {
  444. const prefix string = ",\"data\":"
  445. out.RawString(prefix)
  446. (in.Data).MarshalEasyJSON(out)
  447. }
  448. out.RawByte('}')
  449. }
  450. // MarshalJSON supports json.Marshaler interface
  451. func (v PlayerError) MarshalJSON() ([]byte, error) {
  452. w := jwriter.Writer{}
  453. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(&w, v)
  454. return w.Buffer.BuildBytes(), w.Error
  455. }
  456. // MarshalEasyJSON supports easyjson.Marshaler interface
  457. func (v PlayerError) MarshalEasyJSON(w *jwriter.Writer) {
  458. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia4(w, v)
  459. }
  460. // UnmarshalJSON supports json.Unmarshaler interface
  461. func (v *PlayerError) UnmarshalJSON(data []byte) error {
  462. r := jlexer.Lexer{Data: data}
  463. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(&r, v)
  464. return r.Error()
  465. }
  466. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  467. func (v *PlayerError) UnmarshalEasyJSON(l *jlexer.Lexer) {
  468. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia4(l, v)
  469. }
  470. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(in *jlexer.Lexer, out *EventPlayersCreated) {
  471. isTopLevel := in.IsStart()
  472. if in.IsNull() {
  473. if isTopLevel {
  474. in.Consumed()
  475. }
  476. in.Skip()
  477. return
  478. }
  479. in.Delim('{')
  480. for !in.IsDelim('}') {
  481. key := in.UnsafeFieldName(false)
  482. in.WantColon()
  483. if in.IsNull() {
  484. in.Skip()
  485. in.WantComma()
  486. continue
  487. }
  488. switch key {
  489. case "players":
  490. if in.IsNull() {
  491. in.Skip()
  492. out.Players = nil
  493. } else {
  494. in.Delim('[')
  495. if out.Players == nil {
  496. if !in.IsDelim(']') {
  497. out.Players = make([]PlayerID, 0, 4)
  498. } else {
  499. out.Players = []PlayerID{}
  500. }
  501. } else {
  502. out.Players = (out.Players)[:0]
  503. }
  504. for !in.IsDelim(']') {
  505. var v7 PlayerID
  506. v7 = PlayerID(in.String())
  507. out.Players = append(out.Players, v7)
  508. in.WantComma()
  509. }
  510. in.Delim(']')
  511. }
  512. default:
  513. in.SkipRecursive()
  514. }
  515. in.WantComma()
  516. }
  517. in.Delim('}')
  518. if isTopLevel {
  519. in.Consumed()
  520. }
  521. }
  522. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(out *jwriter.Writer, in EventPlayersCreated) {
  523. out.RawByte('{')
  524. first := true
  525. _ = first
  526. {
  527. const prefix string = ",\"players\":"
  528. out.RawString(prefix[1:])
  529. if in.Players == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  530. out.RawString("null")
  531. } else {
  532. out.RawByte('[')
  533. for v8, v9 := range in.Players {
  534. if v8 > 0 {
  535. out.RawByte(',')
  536. }
  537. out.String(string(v9))
  538. }
  539. out.RawByte(']')
  540. }
  541. }
  542. out.RawByte('}')
  543. }
  544. // MarshalJSON supports json.Marshaler interface
  545. func (v EventPlayersCreated) MarshalJSON() ([]byte, error) {
  546. w := jwriter.Writer{}
  547. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(&w, v)
  548. return w.Buffer.BuildBytes(), w.Error
  549. }
  550. // MarshalEasyJSON supports easyjson.Marshaler interface
  551. func (v EventPlayersCreated) MarshalEasyJSON(w *jwriter.Writer) {
  552. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia5(w, v)
  553. }
  554. // UnmarshalJSON supports json.Unmarshaler interface
  555. func (v *EventPlayersCreated) UnmarshalJSON(data []byte) error {
  556. r := jlexer.Lexer{Data: data}
  557. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(&r, v)
  558. return r.Error()
  559. }
  560. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  561. func (v *EventPlayersCreated) UnmarshalEasyJSON(l *jlexer.Lexer) {
  562. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia5(l, v)
  563. }
  564. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(in *jlexer.Lexer, out *EventPlayerPropertiesChanged) {
  565. isTopLevel := in.IsStart()
  566. if in.IsNull() {
  567. if isTopLevel {
  568. in.Consumed()
  569. }
  570. in.Skip()
  571. return
  572. }
  573. in.Delim('{')
  574. for !in.IsDelim('}') {
  575. key := in.UnsafeFieldName(false)
  576. in.WantColon()
  577. if in.IsNull() {
  578. in.Skip()
  579. in.WantComma()
  580. continue
  581. }
  582. switch key {
  583. case "playerId":
  584. out.PlayerID = PlayerID(in.String())
  585. case "properties":
  586. if in.IsNull() {
  587. in.Skip()
  588. out.Properties = nil
  589. } else {
  590. in.Delim('[')
  591. if out.Properties == nil {
  592. if !in.IsDelim(']') {
  593. out.Properties = make([]*PlayerProperty, 0, 8)
  594. } else {
  595. out.Properties = []*PlayerProperty{}
  596. }
  597. } else {
  598. out.Properties = (out.Properties)[:0]
  599. }
  600. for !in.IsDelim(']') {
  601. var v10 *PlayerProperty
  602. if in.IsNull() {
  603. in.Skip()
  604. v10 = nil
  605. } else {
  606. if v10 == nil {
  607. v10 = new(PlayerProperty)
  608. }
  609. (*v10).UnmarshalEasyJSON(in)
  610. }
  611. out.Properties = append(out.Properties, v10)
  612. in.WantComma()
  613. }
  614. in.Delim(']')
  615. }
  616. default:
  617. in.SkipRecursive()
  618. }
  619. in.WantComma()
  620. }
  621. in.Delim('}')
  622. if isTopLevel {
  623. in.Consumed()
  624. }
  625. }
  626. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(out *jwriter.Writer, in EventPlayerPropertiesChanged) {
  627. out.RawByte('{')
  628. first := true
  629. _ = first
  630. {
  631. const prefix string = ",\"playerId\":"
  632. out.RawString(prefix[1:])
  633. out.String(string(in.PlayerID))
  634. }
  635. {
  636. const prefix string = ",\"properties\":"
  637. out.RawString(prefix)
  638. if in.Properties == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  639. out.RawString("null")
  640. } else {
  641. out.RawByte('[')
  642. for v11, v12 := range in.Properties {
  643. if v11 > 0 {
  644. out.RawByte(',')
  645. }
  646. if v12 == nil {
  647. out.RawString("null")
  648. } else {
  649. (*v12).MarshalEasyJSON(out)
  650. }
  651. }
  652. out.RawByte(']')
  653. }
  654. }
  655. out.RawByte('}')
  656. }
  657. // MarshalJSON supports json.Marshaler interface
  658. func (v EventPlayerPropertiesChanged) MarshalJSON() ([]byte, error) {
  659. w := jwriter.Writer{}
  660. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(&w, v)
  661. return w.Buffer.BuildBytes(), w.Error
  662. }
  663. // MarshalEasyJSON supports easyjson.Marshaler interface
  664. func (v EventPlayerPropertiesChanged) MarshalEasyJSON(w *jwriter.Writer) {
  665. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia6(w, v)
  666. }
  667. // UnmarshalJSON supports json.Unmarshaler interface
  668. func (v *EventPlayerPropertiesChanged) UnmarshalJSON(data []byte) error {
  669. r := jlexer.Lexer{Data: data}
  670. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(&r, v)
  671. return r.Error()
  672. }
  673. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  674. func (v *EventPlayerPropertiesChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
  675. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia6(l, v)
  676. }
  677. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(in *jlexer.Lexer, out *EventPlayerMessagesLogged) {
  678. isTopLevel := in.IsStart()
  679. if in.IsNull() {
  680. if isTopLevel {
  681. in.Consumed()
  682. }
  683. in.Skip()
  684. return
  685. }
  686. in.Delim('{')
  687. for !in.IsDelim('}') {
  688. key := in.UnsafeFieldName(false)
  689. in.WantColon()
  690. if in.IsNull() {
  691. in.Skip()
  692. in.WantComma()
  693. continue
  694. }
  695. switch key {
  696. case "playerId":
  697. out.PlayerID = PlayerID(in.String())
  698. case "messages":
  699. if in.IsNull() {
  700. in.Skip()
  701. out.Messages = nil
  702. } else {
  703. in.Delim('[')
  704. if out.Messages == nil {
  705. if !in.IsDelim(']') {
  706. out.Messages = make([]*PlayerMessage, 0, 8)
  707. } else {
  708. out.Messages = []*PlayerMessage{}
  709. }
  710. } else {
  711. out.Messages = (out.Messages)[:0]
  712. }
  713. for !in.IsDelim(']') {
  714. var v13 *PlayerMessage
  715. if in.IsNull() {
  716. in.Skip()
  717. v13 = nil
  718. } else {
  719. if v13 == nil {
  720. v13 = new(PlayerMessage)
  721. }
  722. (*v13).UnmarshalEasyJSON(in)
  723. }
  724. out.Messages = append(out.Messages, v13)
  725. in.WantComma()
  726. }
  727. in.Delim(']')
  728. }
  729. default:
  730. in.SkipRecursive()
  731. }
  732. in.WantComma()
  733. }
  734. in.Delim('}')
  735. if isTopLevel {
  736. in.Consumed()
  737. }
  738. }
  739. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(out *jwriter.Writer, in EventPlayerMessagesLogged) {
  740. out.RawByte('{')
  741. first := true
  742. _ = first
  743. {
  744. const prefix string = ",\"playerId\":"
  745. out.RawString(prefix[1:])
  746. out.String(string(in.PlayerID))
  747. }
  748. {
  749. const prefix string = ",\"messages\":"
  750. out.RawString(prefix)
  751. if in.Messages == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  752. out.RawString("null")
  753. } else {
  754. out.RawByte('[')
  755. for v14, v15 := range in.Messages {
  756. if v14 > 0 {
  757. out.RawByte(',')
  758. }
  759. if v15 == nil {
  760. out.RawString("null")
  761. } else {
  762. (*v15).MarshalEasyJSON(out)
  763. }
  764. }
  765. out.RawByte(']')
  766. }
  767. }
  768. out.RawByte('}')
  769. }
  770. // MarshalJSON supports json.Marshaler interface
  771. func (v EventPlayerMessagesLogged) MarshalJSON() ([]byte, error) {
  772. w := jwriter.Writer{}
  773. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(&w, v)
  774. return w.Buffer.BuildBytes(), w.Error
  775. }
  776. // MarshalEasyJSON supports easyjson.Marshaler interface
  777. func (v EventPlayerMessagesLogged) MarshalEasyJSON(w *jwriter.Writer) {
  778. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia7(w, v)
  779. }
  780. // UnmarshalJSON supports json.Unmarshaler interface
  781. func (v *EventPlayerMessagesLogged) UnmarshalJSON(data []byte) error {
  782. r := jlexer.Lexer{Data: data}
  783. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(&r, v)
  784. return r.Error()
  785. }
  786. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  787. func (v *EventPlayerMessagesLogged) UnmarshalEasyJSON(l *jlexer.Lexer) {
  788. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia7(l, v)
  789. }
  790. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(in *jlexer.Lexer, out *EventPlayerEventsAdded) {
  791. isTopLevel := in.IsStart()
  792. if in.IsNull() {
  793. if isTopLevel {
  794. in.Consumed()
  795. }
  796. in.Skip()
  797. return
  798. }
  799. in.Delim('{')
  800. for !in.IsDelim('}') {
  801. key := in.UnsafeFieldName(false)
  802. in.WantColon()
  803. if in.IsNull() {
  804. in.Skip()
  805. in.WantComma()
  806. continue
  807. }
  808. switch key {
  809. case "playerId":
  810. out.PlayerID = PlayerID(in.String())
  811. case "events":
  812. if in.IsNull() {
  813. in.Skip()
  814. out.Events = nil
  815. } else {
  816. in.Delim('[')
  817. if out.Events == nil {
  818. if !in.IsDelim(']') {
  819. out.Events = make([]*PlayerEvent, 0, 8)
  820. } else {
  821. out.Events = []*PlayerEvent{}
  822. }
  823. } else {
  824. out.Events = (out.Events)[:0]
  825. }
  826. for !in.IsDelim(']') {
  827. var v16 *PlayerEvent
  828. if in.IsNull() {
  829. in.Skip()
  830. v16 = nil
  831. } else {
  832. if v16 == nil {
  833. v16 = new(PlayerEvent)
  834. }
  835. (*v16).UnmarshalEasyJSON(in)
  836. }
  837. out.Events = append(out.Events, v16)
  838. in.WantComma()
  839. }
  840. in.Delim(']')
  841. }
  842. default:
  843. in.SkipRecursive()
  844. }
  845. in.WantComma()
  846. }
  847. in.Delim('}')
  848. if isTopLevel {
  849. in.Consumed()
  850. }
  851. }
  852. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(out *jwriter.Writer, in EventPlayerEventsAdded) {
  853. out.RawByte('{')
  854. first := true
  855. _ = first
  856. {
  857. const prefix string = ",\"playerId\":"
  858. out.RawString(prefix[1:])
  859. out.String(string(in.PlayerID))
  860. }
  861. {
  862. const prefix string = ",\"events\":"
  863. out.RawString(prefix)
  864. if in.Events == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  865. out.RawString("null")
  866. } else {
  867. out.RawByte('[')
  868. for v17, v18 := range in.Events {
  869. if v17 > 0 {
  870. out.RawByte(',')
  871. }
  872. if v18 == nil {
  873. out.RawString("null")
  874. } else {
  875. (*v18).MarshalEasyJSON(out)
  876. }
  877. }
  878. out.RawByte(']')
  879. }
  880. }
  881. out.RawByte('}')
  882. }
  883. // MarshalJSON supports json.Marshaler interface
  884. func (v EventPlayerEventsAdded) MarshalJSON() ([]byte, error) {
  885. w := jwriter.Writer{}
  886. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(&w, v)
  887. return w.Buffer.BuildBytes(), w.Error
  888. }
  889. // MarshalEasyJSON supports easyjson.Marshaler interface
  890. func (v EventPlayerEventsAdded) MarshalEasyJSON(w *jwriter.Writer) {
  891. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia8(w, v)
  892. }
  893. // UnmarshalJSON supports json.Unmarshaler interface
  894. func (v *EventPlayerEventsAdded) UnmarshalJSON(data []byte) error {
  895. r := jlexer.Lexer{Data: data}
  896. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(&r, v)
  897. return r.Error()
  898. }
  899. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  900. func (v *EventPlayerEventsAdded) UnmarshalEasyJSON(l *jlexer.Lexer) {
  901. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia8(l, v)
  902. }
  903. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(in *jlexer.Lexer, out *EventPlayerErrorsRaised) {
  904. isTopLevel := in.IsStart()
  905. if in.IsNull() {
  906. if isTopLevel {
  907. in.Consumed()
  908. }
  909. in.Skip()
  910. return
  911. }
  912. in.Delim('{')
  913. for !in.IsDelim('}') {
  914. key := in.UnsafeFieldName(false)
  915. in.WantColon()
  916. if in.IsNull() {
  917. in.Skip()
  918. in.WantComma()
  919. continue
  920. }
  921. switch key {
  922. case "playerId":
  923. out.PlayerID = PlayerID(in.String())
  924. case "errors":
  925. if in.IsNull() {
  926. in.Skip()
  927. out.Errors = nil
  928. } else {
  929. in.Delim('[')
  930. if out.Errors == nil {
  931. if !in.IsDelim(']') {
  932. out.Errors = make([]*PlayerError, 0, 8)
  933. } else {
  934. out.Errors = []*PlayerError{}
  935. }
  936. } else {
  937. out.Errors = (out.Errors)[:0]
  938. }
  939. for !in.IsDelim(']') {
  940. var v19 *PlayerError
  941. if in.IsNull() {
  942. in.Skip()
  943. v19 = nil
  944. } else {
  945. if v19 == nil {
  946. v19 = new(PlayerError)
  947. }
  948. (*v19).UnmarshalEasyJSON(in)
  949. }
  950. out.Errors = append(out.Errors, v19)
  951. in.WantComma()
  952. }
  953. in.Delim(']')
  954. }
  955. default:
  956. in.SkipRecursive()
  957. }
  958. in.WantComma()
  959. }
  960. in.Delim('}')
  961. if isTopLevel {
  962. in.Consumed()
  963. }
  964. }
  965. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(out *jwriter.Writer, in EventPlayerErrorsRaised) {
  966. out.RawByte('{')
  967. first := true
  968. _ = first
  969. {
  970. const prefix string = ",\"playerId\":"
  971. out.RawString(prefix[1:])
  972. out.String(string(in.PlayerID))
  973. }
  974. {
  975. const prefix string = ",\"errors\":"
  976. out.RawString(prefix)
  977. if in.Errors == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  978. out.RawString("null")
  979. } else {
  980. out.RawByte('[')
  981. for v20, v21 := range in.Errors {
  982. if v20 > 0 {
  983. out.RawByte(',')
  984. }
  985. if v21 == nil {
  986. out.RawString("null")
  987. } else {
  988. (*v21).MarshalEasyJSON(out)
  989. }
  990. }
  991. out.RawByte(']')
  992. }
  993. }
  994. out.RawByte('}')
  995. }
  996. // MarshalJSON supports json.Marshaler interface
  997. func (v EventPlayerErrorsRaised) MarshalJSON() ([]byte, error) {
  998. w := jwriter.Writer{}
  999. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(&w, v)
  1000. return w.Buffer.BuildBytes(), w.Error
  1001. }
  1002. // MarshalEasyJSON supports easyjson.Marshaler interface
  1003. func (v EventPlayerErrorsRaised) MarshalEasyJSON(w *jwriter.Writer) {
  1004. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia9(w, v)
  1005. }
  1006. // UnmarshalJSON supports json.Unmarshaler interface
  1007. func (v *EventPlayerErrorsRaised) UnmarshalJSON(data []byte) error {
  1008. r := jlexer.Lexer{Data: data}
  1009. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(&r, v)
  1010. return r.Error()
  1011. }
  1012. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1013. func (v *EventPlayerErrorsRaised) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1014. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia9(l, v)
  1015. }
  1016. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(in *jlexer.Lexer, out *EnableParams) {
  1017. isTopLevel := in.IsStart()
  1018. if in.IsNull() {
  1019. if isTopLevel {
  1020. in.Consumed()
  1021. }
  1022. in.Skip()
  1023. return
  1024. }
  1025. in.Delim('{')
  1026. for !in.IsDelim('}') {
  1027. key := in.UnsafeFieldName(false)
  1028. in.WantColon()
  1029. if in.IsNull() {
  1030. in.Skip()
  1031. in.WantComma()
  1032. continue
  1033. }
  1034. switch key {
  1035. default:
  1036. in.SkipRecursive()
  1037. }
  1038. in.WantComma()
  1039. }
  1040. in.Delim('}')
  1041. if isTopLevel {
  1042. in.Consumed()
  1043. }
  1044. }
  1045. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(out *jwriter.Writer, in EnableParams) {
  1046. out.RawByte('{')
  1047. first := true
  1048. _ = first
  1049. out.RawByte('}')
  1050. }
  1051. // MarshalJSON supports json.Marshaler interface
  1052. func (v EnableParams) MarshalJSON() ([]byte, error) {
  1053. w := jwriter.Writer{}
  1054. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(&w, v)
  1055. return w.Buffer.BuildBytes(), w.Error
  1056. }
  1057. // MarshalEasyJSON supports easyjson.Marshaler interface
  1058. func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
  1059. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia10(w, v)
  1060. }
  1061. // UnmarshalJSON supports json.Unmarshaler interface
  1062. func (v *EnableParams) UnmarshalJSON(data []byte) error {
  1063. r := jlexer.Lexer{Data: data}
  1064. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(&r, v)
  1065. return r.Error()
  1066. }
  1067. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1068. func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1069. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia10(l, v)
  1070. }
  1071. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia11(in *jlexer.Lexer, out *DisableParams) {
  1072. isTopLevel := in.IsStart()
  1073. if in.IsNull() {
  1074. if isTopLevel {
  1075. in.Consumed()
  1076. }
  1077. in.Skip()
  1078. return
  1079. }
  1080. in.Delim('{')
  1081. for !in.IsDelim('}') {
  1082. key := in.UnsafeFieldName(false)
  1083. in.WantColon()
  1084. if in.IsNull() {
  1085. in.Skip()
  1086. in.WantComma()
  1087. continue
  1088. }
  1089. switch key {
  1090. default:
  1091. in.SkipRecursive()
  1092. }
  1093. in.WantComma()
  1094. }
  1095. in.Delim('}')
  1096. if isTopLevel {
  1097. in.Consumed()
  1098. }
  1099. }
  1100. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia11(out *jwriter.Writer, in DisableParams) {
  1101. out.RawByte('{')
  1102. first := true
  1103. _ = first
  1104. out.RawByte('}')
  1105. }
  1106. // MarshalJSON supports json.Marshaler interface
  1107. func (v DisableParams) MarshalJSON() ([]byte, error) {
  1108. w := jwriter.Writer{}
  1109. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia11(&w, v)
  1110. return w.Buffer.BuildBytes(), w.Error
  1111. }
  1112. // MarshalEasyJSON supports easyjson.Marshaler interface
  1113. func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
  1114. easyjsonC5a4559bEncodeGithubComChromedpCdprotoMedia11(w, v)
  1115. }
  1116. // UnmarshalJSON supports json.Unmarshaler interface
  1117. func (v *DisableParams) UnmarshalJSON(data []byte) error {
  1118. r := jlexer.Lexer{Data: data}
  1119. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia11(&r, v)
  1120. return r.Error()
  1121. }
  1122. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1123. func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1124. easyjsonC5a4559bDecodeGithubComChromedpCdprotoMedia11(l, v)
  1125. }