easyjson.go 29 KB

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