easyjson.go 39 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package serviceworker
  3. import (
  4. json "encoding/json"
  5. target "github.com/chromedp/cdproto/target"
  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 easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker(in *jlexer.Lexer, out *Version) {
  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 "versionId":
  37. out.VersionID = string(in.String())
  38. case "registrationId":
  39. out.RegistrationID = RegistrationID(in.String())
  40. case "scriptURL":
  41. out.ScriptURL = string(in.String())
  42. case "runningStatus":
  43. (out.RunningStatus).UnmarshalEasyJSON(in)
  44. case "status":
  45. (out.Status).UnmarshalEasyJSON(in)
  46. case "scriptLastModified":
  47. out.ScriptLastModified = float64(in.Float64())
  48. case "scriptResponseTime":
  49. out.ScriptResponseTime = float64(in.Float64())
  50. case "controlledClients":
  51. if in.IsNull() {
  52. in.Skip()
  53. out.ControlledClients = nil
  54. } else {
  55. in.Delim('[')
  56. if out.ControlledClients == nil {
  57. if !in.IsDelim(']') {
  58. out.ControlledClients = make([]target.ID, 0, 4)
  59. } else {
  60. out.ControlledClients = []target.ID{}
  61. }
  62. } else {
  63. out.ControlledClients = (out.ControlledClients)[:0]
  64. }
  65. for !in.IsDelim(']') {
  66. var v1 target.ID
  67. v1 = target.ID(in.String())
  68. out.ControlledClients = append(out.ControlledClients, v1)
  69. in.WantComma()
  70. }
  71. in.Delim(']')
  72. }
  73. case "targetId":
  74. out.TargetID = target.ID(in.String())
  75. case "routerRules":
  76. out.RouterRules = string(in.String())
  77. default:
  78. in.SkipRecursive()
  79. }
  80. in.WantComma()
  81. }
  82. in.Delim('}')
  83. if isTopLevel {
  84. in.Consumed()
  85. }
  86. }
  87. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker(out *jwriter.Writer, in Version) {
  88. out.RawByte('{')
  89. first := true
  90. _ = first
  91. {
  92. const prefix string = ",\"versionId\":"
  93. out.RawString(prefix[1:])
  94. out.String(string(in.VersionID))
  95. }
  96. {
  97. const prefix string = ",\"registrationId\":"
  98. out.RawString(prefix)
  99. out.String(string(in.RegistrationID))
  100. }
  101. {
  102. const prefix string = ",\"scriptURL\":"
  103. out.RawString(prefix)
  104. out.String(string(in.ScriptURL))
  105. }
  106. {
  107. const prefix string = ",\"runningStatus\":"
  108. out.RawString(prefix)
  109. (in.RunningStatus).MarshalEasyJSON(out)
  110. }
  111. {
  112. const prefix string = ",\"status\":"
  113. out.RawString(prefix)
  114. (in.Status).MarshalEasyJSON(out)
  115. }
  116. if in.ScriptLastModified != 0 {
  117. const prefix string = ",\"scriptLastModified\":"
  118. out.RawString(prefix)
  119. out.Float64(float64(in.ScriptLastModified))
  120. }
  121. if in.ScriptResponseTime != 0 {
  122. const prefix string = ",\"scriptResponseTime\":"
  123. out.RawString(prefix)
  124. out.Float64(float64(in.ScriptResponseTime))
  125. }
  126. if len(in.ControlledClients) != 0 {
  127. const prefix string = ",\"controlledClients\":"
  128. out.RawString(prefix)
  129. {
  130. out.RawByte('[')
  131. for v2, v3 := range in.ControlledClients {
  132. if v2 > 0 {
  133. out.RawByte(',')
  134. }
  135. out.String(string(v3))
  136. }
  137. out.RawByte(']')
  138. }
  139. }
  140. if in.TargetID != "" {
  141. const prefix string = ",\"targetId\":"
  142. out.RawString(prefix)
  143. out.String(string(in.TargetID))
  144. }
  145. if in.RouterRules != "" {
  146. const prefix string = ",\"routerRules\":"
  147. out.RawString(prefix)
  148. out.String(string(in.RouterRules))
  149. }
  150. out.RawByte('}')
  151. }
  152. // MarshalJSON supports json.Marshaler interface
  153. func (v Version) MarshalJSON() ([]byte, error) {
  154. w := jwriter.Writer{}
  155. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker(&w, v)
  156. return w.Buffer.BuildBytes(), w.Error
  157. }
  158. // MarshalEasyJSON supports easyjson.Marshaler interface
  159. func (v Version) MarshalEasyJSON(w *jwriter.Writer) {
  160. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker(w, v)
  161. }
  162. // UnmarshalJSON supports json.Unmarshaler interface
  163. func (v *Version) UnmarshalJSON(data []byte) error {
  164. r := jlexer.Lexer{Data: data}
  165. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker(&r, v)
  166. return r.Error()
  167. }
  168. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  169. func (v *Version) UnmarshalEasyJSON(l *jlexer.Lexer) {
  170. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker(l, v)
  171. }
  172. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker1(in *jlexer.Lexer, out *UpdateRegistrationParams) {
  173. isTopLevel := in.IsStart()
  174. if in.IsNull() {
  175. if isTopLevel {
  176. in.Consumed()
  177. }
  178. in.Skip()
  179. return
  180. }
  181. in.Delim('{')
  182. for !in.IsDelim('}') {
  183. key := in.UnsafeFieldName(false)
  184. in.WantColon()
  185. if in.IsNull() {
  186. in.Skip()
  187. in.WantComma()
  188. continue
  189. }
  190. switch key {
  191. case "scopeURL":
  192. out.ScopeURL = string(in.String())
  193. default:
  194. in.SkipRecursive()
  195. }
  196. in.WantComma()
  197. }
  198. in.Delim('}')
  199. if isTopLevel {
  200. in.Consumed()
  201. }
  202. }
  203. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker1(out *jwriter.Writer, in UpdateRegistrationParams) {
  204. out.RawByte('{')
  205. first := true
  206. _ = first
  207. {
  208. const prefix string = ",\"scopeURL\":"
  209. out.RawString(prefix[1:])
  210. out.String(string(in.ScopeURL))
  211. }
  212. out.RawByte('}')
  213. }
  214. // MarshalJSON supports json.Marshaler interface
  215. func (v UpdateRegistrationParams) MarshalJSON() ([]byte, error) {
  216. w := jwriter.Writer{}
  217. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker1(&w, v)
  218. return w.Buffer.BuildBytes(), w.Error
  219. }
  220. // MarshalEasyJSON supports easyjson.Marshaler interface
  221. func (v UpdateRegistrationParams) MarshalEasyJSON(w *jwriter.Writer) {
  222. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker1(w, v)
  223. }
  224. // UnmarshalJSON supports json.Unmarshaler interface
  225. func (v *UpdateRegistrationParams) UnmarshalJSON(data []byte) error {
  226. r := jlexer.Lexer{Data: data}
  227. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker1(&r, v)
  228. return r.Error()
  229. }
  230. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  231. func (v *UpdateRegistrationParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  232. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker1(l, v)
  233. }
  234. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker2(in *jlexer.Lexer, out *UnregisterParams) {
  235. isTopLevel := in.IsStart()
  236. if in.IsNull() {
  237. if isTopLevel {
  238. in.Consumed()
  239. }
  240. in.Skip()
  241. return
  242. }
  243. in.Delim('{')
  244. for !in.IsDelim('}') {
  245. key := in.UnsafeFieldName(false)
  246. in.WantColon()
  247. if in.IsNull() {
  248. in.Skip()
  249. in.WantComma()
  250. continue
  251. }
  252. switch key {
  253. case "scopeURL":
  254. out.ScopeURL = string(in.String())
  255. default:
  256. in.SkipRecursive()
  257. }
  258. in.WantComma()
  259. }
  260. in.Delim('}')
  261. if isTopLevel {
  262. in.Consumed()
  263. }
  264. }
  265. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker2(out *jwriter.Writer, in UnregisterParams) {
  266. out.RawByte('{')
  267. first := true
  268. _ = first
  269. {
  270. const prefix string = ",\"scopeURL\":"
  271. out.RawString(prefix[1:])
  272. out.String(string(in.ScopeURL))
  273. }
  274. out.RawByte('}')
  275. }
  276. // MarshalJSON supports json.Marshaler interface
  277. func (v UnregisterParams) MarshalJSON() ([]byte, error) {
  278. w := jwriter.Writer{}
  279. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker2(&w, v)
  280. return w.Buffer.BuildBytes(), w.Error
  281. }
  282. // MarshalEasyJSON supports easyjson.Marshaler interface
  283. func (v UnregisterParams) MarshalEasyJSON(w *jwriter.Writer) {
  284. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker2(w, v)
  285. }
  286. // UnmarshalJSON supports json.Unmarshaler interface
  287. func (v *UnregisterParams) UnmarshalJSON(data []byte) error {
  288. r := jlexer.Lexer{Data: data}
  289. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker2(&r, v)
  290. return r.Error()
  291. }
  292. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  293. func (v *UnregisterParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  294. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker2(l, v)
  295. }
  296. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker3(in *jlexer.Lexer, out *StopWorkerParams) {
  297. isTopLevel := in.IsStart()
  298. if in.IsNull() {
  299. if isTopLevel {
  300. in.Consumed()
  301. }
  302. in.Skip()
  303. return
  304. }
  305. in.Delim('{')
  306. for !in.IsDelim('}') {
  307. key := in.UnsafeFieldName(false)
  308. in.WantColon()
  309. if in.IsNull() {
  310. in.Skip()
  311. in.WantComma()
  312. continue
  313. }
  314. switch key {
  315. case "versionId":
  316. out.VersionID = string(in.String())
  317. default:
  318. in.SkipRecursive()
  319. }
  320. in.WantComma()
  321. }
  322. in.Delim('}')
  323. if isTopLevel {
  324. in.Consumed()
  325. }
  326. }
  327. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker3(out *jwriter.Writer, in StopWorkerParams) {
  328. out.RawByte('{')
  329. first := true
  330. _ = first
  331. {
  332. const prefix string = ",\"versionId\":"
  333. out.RawString(prefix[1:])
  334. out.String(string(in.VersionID))
  335. }
  336. out.RawByte('}')
  337. }
  338. // MarshalJSON supports json.Marshaler interface
  339. func (v StopWorkerParams) MarshalJSON() ([]byte, error) {
  340. w := jwriter.Writer{}
  341. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker3(&w, v)
  342. return w.Buffer.BuildBytes(), w.Error
  343. }
  344. // MarshalEasyJSON supports easyjson.Marshaler interface
  345. func (v StopWorkerParams) MarshalEasyJSON(w *jwriter.Writer) {
  346. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker3(w, v)
  347. }
  348. // UnmarshalJSON supports json.Unmarshaler interface
  349. func (v *StopWorkerParams) UnmarshalJSON(data []byte) error {
  350. r := jlexer.Lexer{Data: data}
  351. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker3(&r, v)
  352. return r.Error()
  353. }
  354. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  355. func (v *StopWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  356. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker3(l, v)
  357. }
  358. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker4(in *jlexer.Lexer, out *StopAllWorkersParams) {
  359. isTopLevel := in.IsStart()
  360. if in.IsNull() {
  361. if isTopLevel {
  362. in.Consumed()
  363. }
  364. in.Skip()
  365. return
  366. }
  367. in.Delim('{')
  368. for !in.IsDelim('}') {
  369. key := in.UnsafeFieldName(false)
  370. in.WantColon()
  371. if in.IsNull() {
  372. in.Skip()
  373. in.WantComma()
  374. continue
  375. }
  376. switch key {
  377. default:
  378. in.SkipRecursive()
  379. }
  380. in.WantComma()
  381. }
  382. in.Delim('}')
  383. if isTopLevel {
  384. in.Consumed()
  385. }
  386. }
  387. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker4(out *jwriter.Writer, in StopAllWorkersParams) {
  388. out.RawByte('{')
  389. first := true
  390. _ = first
  391. out.RawByte('}')
  392. }
  393. // MarshalJSON supports json.Marshaler interface
  394. func (v StopAllWorkersParams) MarshalJSON() ([]byte, error) {
  395. w := jwriter.Writer{}
  396. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker4(&w, v)
  397. return w.Buffer.BuildBytes(), w.Error
  398. }
  399. // MarshalEasyJSON supports easyjson.Marshaler interface
  400. func (v StopAllWorkersParams) MarshalEasyJSON(w *jwriter.Writer) {
  401. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker4(w, v)
  402. }
  403. // UnmarshalJSON supports json.Unmarshaler interface
  404. func (v *StopAllWorkersParams) UnmarshalJSON(data []byte) error {
  405. r := jlexer.Lexer{Data: data}
  406. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker4(&r, v)
  407. return r.Error()
  408. }
  409. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  410. func (v *StopAllWorkersParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  411. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker4(l, v)
  412. }
  413. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker5(in *jlexer.Lexer, out *StartWorkerParams) {
  414. isTopLevel := in.IsStart()
  415. if in.IsNull() {
  416. if isTopLevel {
  417. in.Consumed()
  418. }
  419. in.Skip()
  420. return
  421. }
  422. in.Delim('{')
  423. for !in.IsDelim('}') {
  424. key := in.UnsafeFieldName(false)
  425. in.WantColon()
  426. if in.IsNull() {
  427. in.Skip()
  428. in.WantComma()
  429. continue
  430. }
  431. switch key {
  432. case "scopeURL":
  433. out.ScopeURL = string(in.String())
  434. default:
  435. in.SkipRecursive()
  436. }
  437. in.WantComma()
  438. }
  439. in.Delim('}')
  440. if isTopLevel {
  441. in.Consumed()
  442. }
  443. }
  444. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker5(out *jwriter.Writer, in StartWorkerParams) {
  445. out.RawByte('{')
  446. first := true
  447. _ = first
  448. {
  449. const prefix string = ",\"scopeURL\":"
  450. out.RawString(prefix[1:])
  451. out.String(string(in.ScopeURL))
  452. }
  453. out.RawByte('}')
  454. }
  455. // MarshalJSON supports json.Marshaler interface
  456. func (v StartWorkerParams) MarshalJSON() ([]byte, error) {
  457. w := jwriter.Writer{}
  458. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker5(&w, v)
  459. return w.Buffer.BuildBytes(), w.Error
  460. }
  461. // MarshalEasyJSON supports easyjson.Marshaler interface
  462. func (v StartWorkerParams) MarshalEasyJSON(w *jwriter.Writer) {
  463. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker5(w, v)
  464. }
  465. // UnmarshalJSON supports json.Unmarshaler interface
  466. func (v *StartWorkerParams) UnmarshalJSON(data []byte) error {
  467. r := jlexer.Lexer{Data: data}
  468. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker5(&r, v)
  469. return r.Error()
  470. }
  471. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  472. func (v *StartWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  473. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker5(l, v)
  474. }
  475. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker6(in *jlexer.Lexer, out *SkipWaitingParams) {
  476. isTopLevel := in.IsStart()
  477. if in.IsNull() {
  478. if isTopLevel {
  479. in.Consumed()
  480. }
  481. in.Skip()
  482. return
  483. }
  484. in.Delim('{')
  485. for !in.IsDelim('}') {
  486. key := in.UnsafeFieldName(false)
  487. in.WantColon()
  488. if in.IsNull() {
  489. in.Skip()
  490. in.WantComma()
  491. continue
  492. }
  493. switch key {
  494. case "scopeURL":
  495. out.ScopeURL = string(in.String())
  496. default:
  497. in.SkipRecursive()
  498. }
  499. in.WantComma()
  500. }
  501. in.Delim('}')
  502. if isTopLevel {
  503. in.Consumed()
  504. }
  505. }
  506. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker6(out *jwriter.Writer, in SkipWaitingParams) {
  507. out.RawByte('{')
  508. first := true
  509. _ = first
  510. {
  511. const prefix string = ",\"scopeURL\":"
  512. out.RawString(prefix[1:])
  513. out.String(string(in.ScopeURL))
  514. }
  515. out.RawByte('}')
  516. }
  517. // MarshalJSON supports json.Marshaler interface
  518. func (v SkipWaitingParams) MarshalJSON() ([]byte, error) {
  519. w := jwriter.Writer{}
  520. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker6(&w, v)
  521. return w.Buffer.BuildBytes(), w.Error
  522. }
  523. // MarshalEasyJSON supports easyjson.Marshaler interface
  524. func (v SkipWaitingParams) MarshalEasyJSON(w *jwriter.Writer) {
  525. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker6(w, v)
  526. }
  527. // UnmarshalJSON supports json.Unmarshaler interface
  528. func (v *SkipWaitingParams) UnmarshalJSON(data []byte) error {
  529. r := jlexer.Lexer{Data: data}
  530. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker6(&r, v)
  531. return r.Error()
  532. }
  533. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  534. func (v *SkipWaitingParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  535. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker6(l, v)
  536. }
  537. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker7(in *jlexer.Lexer, out *SetForceUpdateOnPageLoadParams) {
  538. isTopLevel := in.IsStart()
  539. if in.IsNull() {
  540. if isTopLevel {
  541. in.Consumed()
  542. }
  543. in.Skip()
  544. return
  545. }
  546. in.Delim('{')
  547. for !in.IsDelim('}') {
  548. key := in.UnsafeFieldName(false)
  549. in.WantColon()
  550. if in.IsNull() {
  551. in.Skip()
  552. in.WantComma()
  553. continue
  554. }
  555. switch key {
  556. case "forceUpdateOnPageLoad":
  557. out.ForceUpdateOnPageLoad = bool(in.Bool())
  558. default:
  559. in.SkipRecursive()
  560. }
  561. in.WantComma()
  562. }
  563. in.Delim('}')
  564. if isTopLevel {
  565. in.Consumed()
  566. }
  567. }
  568. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker7(out *jwriter.Writer, in SetForceUpdateOnPageLoadParams) {
  569. out.RawByte('{')
  570. first := true
  571. _ = first
  572. {
  573. const prefix string = ",\"forceUpdateOnPageLoad\":"
  574. out.RawString(prefix[1:])
  575. out.Bool(bool(in.ForceUpdateOnPageLoad))
  576. }
  577. out.RawByte('}')
  578. }
  579. // MarshalJSON supports json.Marshaler interface
  580. func (v SetForceUpdateOnPageLoadParams) MarshalJSON() ([]byte, error) {
  581. w := jwriter.Writer{}
  582. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker7(&w, v)
  583. return w.Buffer.BuildBytes(), w.Error
  584. }
  585. // MarshalEasyJSON supports easyjson.Marshaler interface
  586. func (v SetForceUpdateOnPageLoadParams) MarshalEasyJSON(w *jwriter.Writer) {
  587. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker7(w, v)
  588. }
  589. // UnmarshalJSON supports json.Unmarshaler interface
  590. func (v *SetForceUpdateOnPageLoadParams) UnmarshalJSON(data []byte) error {
  591. r := jlexer.Lexer{Data: data}
  592. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker7(&r, v)
  593. return r.Error()
  594. }
  595. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  596. func (v *SetForceUpdateOnPageLoadParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  597. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker7(l, v)
  598. }
  599. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker8(in *jlexer.Lexer, out *Registration) {
  600. isTopLevel := in.IsStart()
  601. if in.IsNull() {
  602. if isTopLevel {
  603. in.Consumed()
  604. }
  605. in.Skip()
  606. return
  607. }
  608. in.Delim('{')
  609. for !in.IsDelim('}') {
  610. key := in.UnsafeFieldName(false)
  611. in.WantColon()
  612. if in.IsNull() {
  613. in.Skip()
  614. in.WantComma()
  615. continue
  616. }
  617. switch key {
  618. case "registrationId":
  619. out.RegistrationID = RegistrationID(in.String())
  620. case "scopeURL":
  621. out.ScopeURL = string(in.String())
  622. case "isDeleted":
  623. out.IsDeleted = bool(in.Bool())
  624. default:
  625. in.SkipRecursive()
  626. }
  627. in.WantComma()
  628. }
  629. in.Delim('}')
  630. if isTopLevel {
  631. in.Consumed()
  632. }
  633. }
  634. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker8(out *jwriter.Writer, in Registration) {
  635. out.RawByte('{')
  636. first := true
  637. _ = first
  638. {
  639. const prefix string = ",\"registrationId\":"
  640. out.RawString(prefix[1:])
  641. out.String(string(in.RegistrationID))
  642. }
  643. {
  644. const prefix string = ",\"scopeURL\":"
  645. out.RawString(prefix)
  646. out.String(string(in.ScopeURL))
  647. }
  648. {
  649. const prefix string = ",\"isDeleted\":"
  650. out.RawString(prefix)
  651. out.Bool(bool(in.IsDeleted))
  652. }
  653. out.RawByte('}')
  654. }
  655. // MarshalJSON supports json.Marshaler interface
  656. func (v Registration) MarshalJSON() ([]byte, error) {
  657. w := jwriter.Writer{}
  658. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker8(&w, v)
  659. return w.Buffer.BuildBytes(), w.Error
  660. }
  661. // MarshalEasyJSON supports easyjson.Marshaler interface
  662. func (v Registration) MarshalEasyJSON(w *jwriter.Writer) {
  663. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker8(w, v)
  664. }
  665. // UnmarshalJSON supports json.Unmarshaler interface
  666. func (v *Registration) UnmarshalJSON(data []byte) error {
  667. r := jlexer.Lexer{Data: data}
  668. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker8(&r, v)
  669. return r.Error()
  670. }
  671. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  672. func (v *Registration) UnmarshalEasyJSON(l *jlexer.Lexer) {
  673. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker8(l, v)
  674. }
  675. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker9(in *jlexer.Lexer, out *InspectWorkerParams) {
  676. isTopLevel := in.IsStart()
  677. if in.IsNull() {
  678. if isTopLevel {
  679. in.Consumed()
  680. }
  681. in.Skip()
  682. return
  683. }
  684. in.Delim('{')
  685. for !in.IsDelim('}') {
  686. key := in.UnsafeFieldName(false)
  687. in.WantColon()
  688. if in.IsNull() {
  689. in.Skip()
  690. in.WantComma()
  691. continue
  692. }
  693. switch key {
  694. case "versionId":
  695. out.VersionID = string(in.String())
  696. default:
  697. in.SkipRecursive()
  698. }
  699. in.WantComma()
  700. }
  701. in.Delim('}')
  702. if isTopLevel {
  703. in.Consumed()
  704. }
  705. }
  706. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker9(out *jwriter.Writer, in InspectWorkerParams) {
  707. out.RawByte('{')
  708. first := true
  709. _ = first
  710. {
  711. const prefix string = ",\"versionId\":"
  712. out.RawString(prefix[1:])
  713. out.String(string(in.VersionID))
  714. }
  715. out.RawByte('}')
  716. }
  717. // MarshalJSON supports json.Marshaler interface
  718. func (v InspectWorkerParams) MarshalJSON() ([]byte, error) {
  719. w := jwriter.Writer{}
  720. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker9(&w, v)
  721. return w.Buffer.BuildBytes(), w.Error
  722. }
  723. // MarshalEasyJSON supports easyjson.Marshaler interface
  724. func (v InspectWorkerParams) MarshalEasyJSON(w *jwriter.Writer) {
  725. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker9(w, v)
  726. }
  727. // UnmarshalJSON supports json.Unmarshaler interface
  728. func (v *InspectWorkerParams) UnmarshalJSON(data []byte) error {
  729. r := jlexer.Lexer{Data: data}
  730. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker9(&r, v)
  731. return r.Error()
  732. }
  733. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  734. func (v *InspectWorkerParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  735. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker9(l, v)
  736. }
  737. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker10(in *jlexer.Lexer, out *EventWorkerVersionUpdated) {
  738. isTopLevel := in.IsStart()
  739. if in.IsNull() {
  740. if isTopLevel {
  741. in.Consumed()
  742. }
  743. in.Skip()
  744. return
  745. }
  746. in.Delim('{')
  747. for !in.IsDelim('}') {
  748. key := in.UnsafeFieldName(false)
  749. in.WantColon()
  750. if in.IsNull() {
  751. in.Skip()
  752. in.WantComma()
  753. continue
  754. }
  755. switch key {
  756. case "versions":
  757. if in.IsNull() {
  758. in.Skip()
  759. out.Versions = nil
  760. } else {
  761. in.Delim('[')
  762. if out.Versions == nil {
  763. if !in.IsDelim(']') {
  764. out.Versions = make([]*Version, 0, 8)
  765. } else {
  766. out.Versions = []*Version{}
  767. }
  768. } else {
  769. out.Versions = (out.Versions)[:0]
  770. }
  771. for !in.IsDelim(']') {
  772. var v4 *Version
  773. if in.IsNull() {
  774. in.Skip()
  775. v4 = nil
  776. } else {
  777. if v4 == nil {
  778. v4 = new(Version)
  779. }
  780. (*v4).UnmarshalEasyJSON(in)
  781. }
  782. out.Versions = append(out.Versions, v4)
  783. in.WantComma()
  784. }
  785. in.Delim(']')
  786. }
  787. default:
  788. in.SkipRecursive()
  789. }
  790. in.WantComma()
  791. }
  792. in.Delim('}')
  793. if isTopLevel {
  794. in.Consumed()
  795. }
  796. }
  797. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker10(out *jwriter.Writer, in EventWorkerVersionUpdated) {
  798. out.RawByte('{')
  799. first := true
  800. _ = first
  801. {
  802. const prefix string = ",\"versions\":"
  803. out.RawString(prefix[1:])
  804. if in.Versions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  805. out.RawString("null")
  806. } else {
  807. out.RawByte('[')
  808. for v5, v6 := range in.Versions {
  809. if v5 > 0 {
  810. out.RawByte(',')
  811. }
  812. if v6 == nil {
  813. out.RawString("null")
  814. } else {
  815. (*v6).MarshalEasyJSON(out)
  816. }
  817. }
  818. out.RawByte(']')
  819. }
  820. }
  821. out.RawByte('}')
  822. }
  823. // MarshalJSON supports json.Marshaler interface
  824. func (v EventWorkerVersionUpdated) MarshalJSON() ([]byte, error) {
  825. w := jwriter.Writer{}
  826. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker10(&w, v)
  827. return w.Buffer.BuildBytes(), w.Error
  828. }
  829. // MarshalEasyJSON supports easyjson.Marshaler interface
  830. func (v EventWorkerVersionUpdated) MarshalEasyJSON(w *jwriter.Writer) {
  831. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker10(w, v)
  832. }
  833. // UnmarshalJSON supports json.Unmarshaler interface
  834. func (v *EventWorkerVersionUpdated) UnmarshalJSON(data []byte) error {
  835. r := jlexer.Lexer{Data: data}
  836. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker10(&r, v)
  837. return r.Error()
  838. }
  839. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  840. func (v *EventWorkerVersionUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
  841. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker10(l, v)
  842. }
  843. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker11(in *jlexer.Lexer, out *EventWorkerRegistrationUpdated) {
  844. isTopLevel := in.IsStart()
  845. if in.IsNull() {
  846. if isTopLevel {
  847. in.Consumed()
  848. }
  849. in.Skip()
  850. return
  851. }
  852. in.Delim('{')
  853. for !in.IsDelim('}') {
  854. key := in.UnsafeFieldName(false)
  855. in.WantColon()
  856. if in.IsNull() {
  857. in.Skip()
  858. in.WantComma()
  859. continue
  860. }
  861. switch key {
  862. case "registrations":
  863. if in.IsNull() {
  864. in.Skip()
  865. out.Registrations = nil
  866. } else {
  867. in.Delim('[')
  868. if out.Registrations == nil {
  869. if !in.IsDelim(']') {
  870. out.Registrations = make([]*Registration, 0, 8)
  871. } else {
  872. out.Registrations = []*Registration{}
  873. }
  874. } else {
  875. out.Registrations = (out.Registrations)[:0]
  876. }
  877. for !in.IsDelim(']') {
  878. var v7 *Registration
  879. if in.IsNull() {
  880. in.Skip()
  881. v7 = nil
  882. } else {
  883. if v7 == nil {
  884. v7 = new(Registration)
  885. }
  886. (*v7).UnmarshalEasyJSON(in)
  887. }
  888. out.Registrations = append(out.Registrations, v7)
  889. in.WantComma()
  890. }
  891. in.Delim(']')
  892. }
  893. default:
  894. in.SkipRecursive()
  895. }
  896. in.WantComma()
  897. }
  898. in.Delim('}')
  899. if isTopLevel {
  900. in.Consumed()
  901. }
  902. }
  903. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker11(out *jwriter.Writer, in EventWorkerRegistrationUpdated) {
  904. out.RawByte('{')
  905. first := true
  906. _ = first
  907. {
  908. const prefix string = ",\"registrations\":"
  909. out.RawString(prefix[1:])
  910. if in.Registrations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  911. out.RawString("null")
  912. } else {
  913. out.RawByte('[')
  914. for v8, v9 := range in.Registrations {
  915. if v8 > 0 {
  916. out.RawByte(',')
  917. }
  918. if v9 == nil {
  919. out.RawString("null")
  920. } else {
  921. (*v9).MarshalEasyJSON(out)
  922. }
  923. }
  924. out.RawByte(']')
  925. }
  926. }
  927. out.RawByte('}')
  928. }
  929. // MarshalJSON supports json.Marshaler interface
  930. func (v EventWorkerRegistrationUpdated) MarshalJSON() ([]byte, error) {
  931. w := jwriter.Writer{}
  932. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker11(&w, v)
  933. return w.Buffer.BuildBytes(), w.Error
  934. }
  935. // MarshalEasyJSON supports easyjson.Marshaler interface
  936. func (v EventWorkerRegistrationUpdated) MarshalEasyJSON(w *jwriter.Writer) {
  937. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker11(w, v)
  938. }
  939. // UnmarshalJSON supports json.Unmarshaler interface
  940. func (v *EventWorkerRegistrationUpdated) UnmarshalJSON(data []byte) error {
  941. r := jlexer.Lexer{Data: data}
  942. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker11(&r, v)
  943. return r.Error()
  944. }
  945. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  946. func (v *EventWorkerRegistrationUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
  947. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker11(l, v)
  948. }
  949. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker12(in *jlexer.Lexer, out *EventWorkerErrorReported) {
  950. isTopLevel := in.IsStart()
  951. if in.IsNull() {
  952. if isTopLevel {
  953. in.Consumed()
  954. }
  955. in.Skip()
  956. return
  957. }
  958. in.Delim('{')
  959. for !in.IsDelim('}') {
  960. key := in.UnsafeFieldName(false)
  961. in.WantColon()
  962. if in.IsNull() {
  963. in.Skip()
  964. in.WantComma()
  965. continue
  966. }
  967. switch key {
  968. case "errorMessage":
  969. if in.IsNull() {
  970. in.Skip()
  971. out.ErrorMessage = nil
  972. } else {
  973. if out.ErrorMessage == nil {
  974. out.ErrorMessage = new(ErrorMessage)
  975. }
  976. (*out.ErrorMessage).UnmarshalEasyJSON(in)
  977. }
  978. default:
  979. in.SkipRecursive()
  980. }
  981. in.WantComma()
  982. }
  983. in.Delim('}')
  984. if isTopLevel {
  985. in.Consumed()
  986. }
  987. }
  988. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker12(out *jwriter.Writer, in EventWorkerErrorReported) {
  989. out.RawByte('{')
  990. first := true
  991. _ = first
  992. {
  993. const prefix string = ",\"errorMessage\":"
  994. out.RawString(prefix[1:])
  995. if in.ErrorMessage == nil {
  996. out.RawString("null")
  997. } else {
  998. (*in.ErrorMessage).MarshalEasyJSON(out)
  999. }
  1000. }
  1001. out.RawByte('}')
  1002. }
  1003. // MarshalJSON supports json.Marshaler interface
  1004. func (v EventWorkerErrorReported) MarshalJSON() ([]byte, error) {
  1005. w := jwriter.Writer{}
  1006. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker12(&w, v)
  1007. return w.Buffer.BuildBytes(), w.Error
  1008. }
  1009. // MarshalEasyJSON supports easyjson.Marshaler interface
  1010. func (v EventWorkerErrorReported) MarshalEasyJSON(w *jwriter.Writer) {
  1011. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker12(w, v)
  1012. }
  1013. // UnmarshalJSON supports json.Unmarshaler interface
  1014. func (v *EventWorkerErrorReported) UnmarshalJSON(data []byte) error {
  1015. r := jlexer.Lexer{Data: data}
  1016. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker12(&r, v)
  1017. return r.Error()
  1018. }
  1019. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1020. func (v *EventWorkerErrorReported) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1021. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker12(l, v)
  1022. }
  1023. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker13(in *jlexer.Lexer, out *ErrorMessage) {
  1024. isTopLevel := in.IsStart()
  1025. if in.IsNull() {
  1026. if isTopLevel {
  1027. in.Consumed()
  1028. }
  1029. in.Skip()
  1030. return
  1031. }
  1032. in.Delim('{')
  1033. for !in.IsDelim('}') {
  1034. key := in.UnsafeFieldName(false)
  1035. in.WantColon()
  1036. if in.IsNull() {
  1037. in.Skip()
  1038. in.WantComma()
  1039. continue
  1040. }
  1041. switch key {
  1042. case "errorMessage":
  1043. out.ErrorMessage = string(in.String())
  1044. case "registrationId":
  1045. out.RegistrationID = RegistrationID(in.String())
  1046. case "versionId":
  1047. out.VersionID = string(in.String())
  1048. case "sourceURL":
  1049. out.SourceURL = string(in.String())
  1050. case "lineNumber":
  1051. out.LineNumber = int64(in.Int64())
  1052. case "columnNumber":
  1053. out.ColumnNumber = int64(in.Int64())
  1054. default:
  1055. in.SkipRecursive()
  1056. }
  1057. in.WantComma()
  1058. }
  1059. in.Delim('}')
  1060. if isTopLevel {
  1061. in.Consumed()
  1062. }
  1063. }
  1064. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker13(out *jwriter.Writer, in ErrorMessage) {
  1065. out.RawByte('{')
  1066. first := true
  1067. _ = first
  1068. {
  1069. const prefix string = ",\"errorMessage\":"
  1070. out.RawString(prefix[1:])
  1071. out.String(string(in.ErrorMessage))
  1072. }
  1073. {
  1074. const prefix string = ",\"registrationId\":"
  1075. out.RawString(prefix)
  1076. out.String(string(in.RegistrationID))
  1077. }
  1078. {
  1079. const prefix string = ",\"versionId\":"
  1080. out.RawString(prefix)
  1081. out.String(string(in.VersionID))
  1082. }
  1083. {
  1084. const prefix string = ",\"sourceURL\":"
  1085. out.RawString(prefix)
  1086. out.String(string(in.SourceURL))
  1087. }
  1088. {
  1089. const prefix string = ",\"lineNumber\":"
  1090. out.RawString(prefix)
  1091. out.Int64(int64(in.LineNumber))
  1092. }
  1093. {
  1094. const prefix string = ",\"columnNumber\":"
  1095. out.RawString(prefix)
  1096. out.Int64(int64(in.ColumnNumber))
  1097. }
  1098. out.RawByte('}')
  1099. }
  1100. // MarshalJSON supports json.Marshaler interface
  1101. func (v ErrorMessage) MarshalJSON() ([]byte, error) {
  1102. w := jwriter.Writer{}
  1103. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker13(&w, v)
  1104. return w.Buffer.BuildBytes(), w.Error
  1105. }
  1106. // MarshalEasyJSON supports easyjson.Marshaler interface
  1107. func (v ErrorMessage) MarshalEasyJSON(w *jwriter.Writer) {
  1108. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker13(w, v)
  1109. }
  1110. // UnmarshalJSON supports json.Unmarshaler interface
  1111. func (v *ErrorMessage) UnmarshalJSON(data []byte) error {
  1112. r := jlexer.Lexer{Data: data}
  1113. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker13(&r, v)
  1114. return r.Error()
  1115. }
  1116. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1117. func (v *ErrorMessage) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1118. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker13(l, v)
  1119. }
  1120. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker14(in *jlexer.Lexer, out *EnableParams) {
  1121. isTopLevel := in.IsStart()
  1122. if in.IsNull() {
  1123. if isTopLevel {
  1124. in.Consumed()
  1125. }
  1126. in.Skip()
  1127. return
  1128. }
  1129. in.Delim('{')
  1130. for !in.IsDelim('}') {
  1131. key := in.UnsafeFieldName(false)
  1132. in.WantColon()
  1133. if in.IsNull() {
  1134. in.Skip()
  1135. in.WantComma()
  1136. continue
  1137. }
  1138. switch key {
  1139. default:
  1140. in.SkipRecursive()
  1141. }
  1142. in.WantComma()
  1143. }
  1144. in.Delim('}')
  1145. if isTopLevel {
  1146. in.Consumed()
  1147. }
  1148. }
  1149. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker14(out *jwriter.Writer, in EnableParams) {
  1150. out.RawByte('{')
  1151. first := true
  1152. _ = first
  1153. out.RawByte('}')
  1154. }
  1155. // MarshalJSON supports json.Marshaler interface
  1156. func (v EnableParams) MarshalJSON() ([]byte, error) {
  1157. w := jwriter.Writer{}
  1158. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker14(&w, v)
  1159. return w.Buffer.BuildBytes(), w.Error
  1160. }
  1161. // MarshalEasyJSON supports easyjson.Marshaler interface
  1162. func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
  1163. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker14(w, v)
  1164. }
  1165. // UnmarshalJSON supports json.Unmarshaler interface
  1166. func (v *EnableParams) UnmarshalJSON(data []byte) error {
  1167. r := jlexer.Lexer{Data: data}
  1168. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker14(&r, v)
  1169. return r.Error()
  1170. }
  1171. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1172. func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1173. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker14(l, v)
  1174. }
  1175. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker15(in *jlexer.Lexer, out *DispatchSyncEventParams) {
  1176. isTopLevel := in.IsStart()
  1177. if in.IsNull() {
  1178. if isTopLevel {
  1179. in.Consumed()
  1180. }
  1181. in.Skip()
  1182. return
  1183. }
  1184. in.Delim('{')
  1185. for !in.IsDelim('}') {
  1186. key := in.UnsafeFieldName(false)
  1187. in.WantColon()
  1188. if in.IsNull() {
  1189. in.Skip()
  1190. in.WantComma()
  1191. continue
  1192. }
  1193. switch key {
  1194. case "origin":
  1195. out.Origin = string(in.String())
  1196. case "registrationId":
  1197. out.RegistrationID = RegistrationID(in.String())
  1198. case "tag":
  1199. out.Tag = string(in.String())
  1200. case "lastChance":
  1201. out.LastChance = bool(in.Bool())
  1202. default:
  1203. in.SkipRecursive()
  1204. }
  1205. in.WantComma()
  1206. }
  1207. in.Delim('}')
  1208. if isTopLevel {
  1209. in.Consumed()
  1210. }
  1211. }
  1212. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker15(out *jwriter.Writer, in DispatchSyncEventParams) {
  1213. out.RawByte('{')
  1214. first := true
  1215. _ = first
  1216. {
  1217. const prefix string = ",\"origin\":"
  1218. out.RawString(prefix[1:])
  1219. out.String(string(in.Origin))
  1220. }
  1221. {
  1222. const prefix string = ",\"registrationId\":"
  1223. out.RawString(prefix)
  1224. out.String(string(in.RegistrationID))
  1225. }
  1226. {
  1227. const prefix string = ",\"tag\":"
  1228. out.RawString(prefix)
  1229. out.String(string(in.Tag))
  1230. }
  1231. {
  1232. const prefix string = ",\"lastChance\":"
  1233. out.RawString(prefix)
  1234. out.Bool(bool(in.LastChance))
  1235. }
  1236. out.RawByte('}')
  1237. }
  1238. // MarshalJSON supports json.Marshaler interface
  1239. func (v DispatchSyncEventParams) MarshalJSON() ([]byte, error) {
  1240. w := jwriter.Writer{}
  1241. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker15(&w, v)
  1242. return w.Buffer.BuildBytes(), w.Error
  1243. }
  1244. // MarshalEasyJSON supports easyjson.Marshaler interface
  1245. func (v DispatchSyncEventParams) MarshalEasyJSON(w *jwriter.Writer) {
  1246. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker15(w, v)
  1247. }
  1248. // UnmarshalJSON supports json.Unmarshaler interface
  1249. func (v *DispatchSyncEventParams) UnmarshalJSON(data []byte) error {
  1250. r := jlexer.Lexer{Data: data}
  1251. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker15(&r, v)
  1252. return r.Error()
  1253. }
  1254. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1255. func (v *DispatchSyncEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1256. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker15(l, v)
  1257. }
  1258. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker16(in *jlexer.Lexer, out *DispatchPeriodicSyncEventParams) {
  1259. isTopLevel := in.IsStart()
  1260. if in.IsNull() {
  1261. if isTopLevel {
  1262. in.Consumed()
  1263. }
  1264. in.Skip()
  1265. return
  1266. }
  1267. in.Delim('{')
  1268. for !in.IsDelim('}') {
  1269. key := in.UnsafeFieldName(false)
  1270. in.WantColon()
  1271. if in.IsNull() {
  1272. in.Skip()
  1273. in.WantComma()
  1274. continue
  1275. }
  1276. switch key {
  1277. case "origin":
  1278. out.Origin = string(in.String())
  1279. case "registrationId":
  1280. out.RegistrationID = RegistrationID(in.String())
  1281. case "tag":
  1282. out.Tag = string(in.String())
  1283. default:
  1284. in.SkipRecursive()
  1285. }
  1286. in.WantComma()
  1287. }
  1288. in.Delim('}')
  1289. if isTopLevel {
  1290. in.Consumed()
  1291. }
  1292. }
  1293. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker16(out *jwriter.Writer, in DispatchPeriodicSyncEventParams) {
  1294. out.RawByte('{')
  1295. first := true
  1296. _ = first
  1297. {
  1298. const prefix string = ",\"origin\":"
  1299. out.RawString(prefix[1:])
  1300. out.String(string(in.Origin))
  1301. }
  1302. {
  1303. const prefix string = ",\"registrationId\":"
  1304. out.RawString(prefix)
  1305. out.String(string(in.RegistrationID))
  1306. }
  1307. {
  1308. const prefix string = ",\"tag\":"
  1309. out.RawString(prefix)
  1310. out.String(string(in.Tag))
  1311. }
  1312. out.RawByte('}')
  1313. }
  1314. // MarshalJSON supports json.Marshaler interface
  1315. func (v DispatchPeriodicSyncEventParams) MarshalJSON() ([]byte, error) {
  1316. w := jwriter.Writer{}
  1317. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker16(&w, v)
  1318. return w.Buffer.BuildBytes(), w.Error
  1319. }
  1320. // MarshalEasyJSON supports easyjson.Marshaler interface
  1321. func (v DispatchPeriodicSyncEventParams) MarshalEasyJSON(w *jwriter.Writer) {
  1322. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker16(w, v)
  1323. }
  1324. // UnmarshalJSON supports json.Unmarshaler interface
  1325. func (v *DispatchPeriodicSyncEventParams) UnmarshalJSON(data []byte) error {
  1326. r := jlexer.Lexer{Data: data}
  1327. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker16(&r, v)
  1328. return r.Error()
  1329. }
  1330. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1331. func (v *DispatchPeriodicSyncEventParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1332. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker16(l, v)
  1333. }
  1334. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker17(in *jlexer.Lexer, out *DisableParams) {
  1335. isTopLevel := in.IsStart()
  1336. if in.IsNull() {
  1337. if isTopLevel {
  1338. in.Consumed()
  1339. }
  1340. in.Skip()
  1341. return
  1342. }
  1343. in.Delim('{')
  1344. for !in.IsDelim('}') {
  1345. key := in.UnsafeFieldName(false)
  1346. in.WantColon()
  1347. if in.IsNull() {
  1348. in.Skip()
  1349. in.WantComma()
  1350. continue
  1351. }
  1352. switch key {
  1353. default:
  1354. in.SkipRecursive()
  1355. }
  1356. in.WantComma()
  1357. }
  1358. in.Delim('}')
  1359. if isTopLevel {
  1360. in.Consumed()
  1361. }
  1362. }
  1363. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker17(out *jwriter.Writer, in DisableParams) {
  1364. out.RawByte('{')
  1365. first := true
  1366. _ = first
  1367. out.RawByte('}')
  1368. }
  1369. // MarshalJSON supports json.Marshaler interface
  1370. func (v DisableParams) MarshalJSON() ([]byte, error) {
  1371. w := jwriter.Writer{}
  1372. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker17(&w, v)
  1373. return w.Buffer.BuildBytes(), w.Error
  1374. }
  1375. // MarshalEasyJSON supports easyjson.Marshaler interface
  1376. func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
  1377. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker17(w, v)
  1378. }
  1379. // UnmarshalJSON supports json.Unmarshaler interface
  1380. func (v *DisableParams) UnmarshalJSON(data []byte) error {
  1381. r := jlexer.Lexer{Data: data}
  1382. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker17(&r, v)
  1383. return r.Error()
  1384. }
  1385. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1386. func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1387. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker17(l, v)
  1388. }
  1389. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker18(in *jlexer.Lexer, out *DeliverPushMessageParams) {
  1390. isTopLevel := in.IsStart()
  1391. if in.IsNull() {
  1392. if isTopLevel {
  1393. in.Consumed()
  1394. }
  1395. in.Skip()
  1396. return
  1397. }
  1398. in.Delim('{')
  1399. for !in.IsDelim('}') {
  1400. key := in.UnsafeFieldName(false)
  1401. in.WantColon()
  1402. if in.IsNull() {
  1403. in.Skip()
  1404. in.WantComma()
  1405. continue
  1406. }
  1407. switch key {
  1408. case "origin":
  1409. out.Origin = string(in.String())
  1410. case "registrationId":
  1411. out.RegistrationID = RegistrationID(in.String())
  1412. case "data":
  1413. out.Data = string(in.String())
  1414. default:
  1415. in.SkipRecursive()
  1416. }
  1417. in.WantComma()
  1418. }
  1419. in.Delim('}')
  1420. if isTopLevel {
  1421. in.Consumed()
  1422. }
  1423. }
  1424. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker18(out *jwriter.Writer, in DeliverPushMessageParams) {
  1425. out.RawByte('{')
  1426. first := true
  1427. _ = first
  1428. {
  1429. const prefix string = ",\"origin\":"
  1430. out.RawString(prefix[1:])
  1431. out.String(string(in.Origin))
  1432. }
  1433. {
  1434. const prefix string = ",\"registrationId\":"
  1435. out.RawString(prefix)
  1436. out.String(string(in.RegistrationID))
  1437. }
  1438. {
  1439. const prefix string = ",\"data\":"
  1440. out.RawString(prefix)
  1441. out.String(string(in.Data))
  1442. }
  1443. out.RawByte('}')
  1444. }
  1445. // MarshalJSON supports json.Marshaler interface
  1446. func (v DeliverPushMessageParams) MarshalJSON() ([]byte, error) {
  1447. w := jwriter.Writer{}
  1448. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker18(&w, v)
  1449. return w.Buffer.BuildBytes(), w.Error
  1450. }
  1451. // MarshalEasyJSON supports easyjson.Marshaler interface
  1452. func (v DeliverPushMessageParams) MarshalEasyJSON(w *jwriter.Writer) {
  1453. easyjsonC5a4559bEncodeGithubComChromedpCdprotoServiceworker18(w, v)
  1454. }
  1455. // UnmarshalJSON supports json.Unmarshaler interface
  1456. func (v *DeliverPushMessageParams) UnmarshalJSON(data []byte) error {
  1457. r := jlexer.Lexer{Data: data}
  1458. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker18(&r, v)
  1459. return r.Error()
  1460. }
  1461. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1462. func (v *DeliverPushMessageParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1463. easyjsonC5a4559bDecodeGithubComChromedpCdprotoServiceworker18(l, v)
  1464. }