easyjson.go 69 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package target
  3. import (
  4. json "encoding/json"
  5. cdp "github.com/chromedp/cdproto/cdp"
  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 easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget(in *jlexer.Lexer, out *SetRemoteLocationsParams) {
  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 "locations":
  37. if in.IsNull() {
  38. in.Skip()
  39. out.Locations = nil
  40. } else {
  41. in.Delim('[')
  42. if out.Locations == nil {
  43. if !in.IsDelim(']') {
  44. out.Locations = make([]*RemoteLocation, 0, 8)
  45. } else {
  46. out.Locations = []*RemoteLocation{}
  47. }
  48. } else {
  49. out.Locations = (out.Locations)[:0]
  50. }
  51. for !in.IsDelim(']') {
  52. var v1 *RemoteLocation
  53. if in.IsNull() {
  54. in.Skip()
  55. v1 = nil
  56. } else {
  57. if v1 == nil {
  58. v1 = new(RemoteLocation)
  59. }
  60. (*v1).UnmarshalEasyJSON(in)
  61. }
  62. out.Locations = append(out.Locations, v1)
  63. in.WantComma()
  64. }
  65. in.Delim(']')
  66. }
  67. default:
  68. in.SkipRecursive()
  69. }
  70. in.WantComma()
  71. }
  72. in.Delim('}')
  73. if isTopLevel {
  74. in.Consumed()
  75. }
  76. }
  77. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget(out *jwriter.Writer, in SetRemoteLocationsParams) {
  78. out.RawByte('{')
  79. first := true
  80. _ = first
  81. {
  82. const prefix string = ",\"locations\":"
  83. out.RawString(prefix[1:])
  84. if in.Locations == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  85. out.RawString("null")
  86. } else {
  87. out.RawByte('[')
  88. for v2, v3 := range in.Locations {
  89. if v2 > 0 {
  90. out.RawByte(',')
  91. }
  92. if v3 == nil {
  93. out.RawString("null")
  94. } else {
  95. (*v3).MarshalEasyJSON(out)
  96. }
  97. }
  98. out.RawByte(']')
  99. }
  100. }
  101. out.RawByte('}')
  102. }
  103. // MarshalJSON supports json.Marshaler interface
  104. func (v SetRemoteLocationsParams) MarshalJSON() ([]byte, error) {
  105. w := jwriter.Writer{}
  106. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget(&w, v)
  107. return w.Buffer.BuildBytes(), w.Error
  108. }
  109. // MarshalEasyJSON supports easyjson.Marshaler interface
  110. func (v SetRemoteLocationsParams) MarshalEasyJSON(w *jwriter.Writer) {
  111. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget(w, v)
  112. }
  113. // UnmarshalJSON supports json.Unmarshaler interface
  114. func (v *SetRemoteLocationsParams) UnmarshalJSON(data []byte) error {
  115. r := jlexer.Lexer{Data: data}
  116. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget(&r, v)
  117. return r.Error()
  118. }
  119. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  120. func (v *SetRemoteLocationsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  121. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget(l, v)
  122. }
  123. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget1(in *jlexer.Lexer, out *SetDiscoverTargetsParams) {
  124. isTopLevel := in.IsStart()
  125. if in.IsNull() {
  126. if isTopLevel {
  127. in.Consumed()
  128. }
  129. in.Skip()
  130. return
  131. }
  132. in.Delim('{')
  133. for !in.IsDelim('}') {
  134. key := in.UnsafeFieldName(false)
  135. in.WantColon()
  136. if in.IsNull() {
  137. in.Skip()
  138. in.WantComma()
  139. continue
  140. }
  141. switch key {
  142. case "discover":
  143. out.Discover = bool(in.Bool())
  144. case "filter":
  145. if in.IsNull() {
  146. in.Skip()
  147. out.Filter = nil
  148. } else {
  149. in.Delim('[')
  150. if out.Filter == nil {
  151. if !in.IsDelim(']') {
  152. out.Filter = make(Filter, 0, 2)
  153. } else {
  154. out.Filter = Filter{}
  155. }
  156. } else {
  157. out.Filter = (out.Filter)[:0]
  158. }
  159. for !in.IsDelim(']') {
  160. var v4 struct {
  161. Exclude bool `json:"exclude,omitempty"`
  162. Type string `json:"type,omitempty"`
  163. }
  164. easyjsonC5a4559bDecode(in, &v4)
  165. out.Filter = append(out.Filter, v4)
  166. in.WantComma()
  167. }
  168. in.Delim(']')
  169. }
  170. default:
  171. in.SkipRecursive()
  172. }
  173. in.WantComma()
  174. }
  175. in.Delim('}')
  176. if isTopLevel {
  177. in.Consumed()
  178. }
  179. }
  180. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget1(out *jwriter.Writer, in SetDiscoverTargetsParams) {
  181. out.RawByte('{')
  182. first := true
  183. _ = first
  184. {
  185. const prefix string = ",\"discover\":"
  186. out.RawString(prefix[1:])
  187. out.Bool(bool(in.Discover))
  188. }
  189. if len(in.Filter) != 0 {
  190. const prefix string = ",\"filter\":"
  191. out.RawString(prefix)
  192. {
  193. out.RawByte('[')
  194. for v5, v6 := range in.Filter {
  195. if v5 > 0 {
  196. out.RawByte(',')
  197. }
  198. easyjsonC5a4559bEncode(out, v6)
  199. }
  200. out.RawByte(']')
  201. }
  202. }
  203. out.RawByte('}')
  204. }
  205. // MarshalJSON supports json.Marshaler interface
  206. func (v SetDiscoverTargetsParams) MarshalJSON() ([]byte, error) {
  207. w := jwriter.Writer{}
  208. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget1(&w, v)
  209. return w.Buffer.BuildBytes(), w.Error
  210. }
  211. // MarshalEasyJSON supports easyjson.Marshaler interface
  212. func (v SetDiscoverTargetsParams) MarshalEasyJSON(w *jwriter.Writer) {
  213. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget1(w, v)
  214. }
  215. // UnmarshalJSON supports json.Unmarshaler interface
  216. func (v *SetDiscoverTargetsParams) UnmarshalJSON(data []byte) error {
  217. r := jlexer.Lexer{Data: data}
  218. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget1(&r, v)
  219. return r.Error()
  220. }
  221. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  222. func (v *SetDiscoverTargetsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  223. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget1(l, v)
  224. }
  225. func easyjsonC5a4559bDecode(in *jlexer.Lexer, out *struct {
  226. Exclude bool `json:"exclude,omitempty"`
  227. Type string `json:"type,omitempty"`
  228. }) {
  229. isTopLevel := in.IsStart()
  230. if in.IsNull() {
  231. if isTopLevel {
  232. in.Consumed()
  233. }
  234. in.Skip()
  235. return
  236. }
  237. in.Delim('{')
  238. for !in.IsDelim('}') {
  239. key := in.UnsafeFieldName(false)
  240. in.WantColon()
  241. if in.IsNull() {
  242. in.Skip()
  243. in.WantComma()
  244. continue
  245. }
  246. switch key {
  247. case "exclude":
  248. out.Exclude = bool(in.Bool())
  249. case "type":
  250. out.Type = string(in.String())
  251. default:
  252. in.SkipRecursive()
  253. }
  254. in.WantComma()
  255. }
  256. in.Delim('}')
  257. if isTopLevel {
  258. in.Consumed()
  259. }
  260. }
  261. func easyjsonC5a4559bEncode(out *jwriter.Writer, in struct {
  262. Exclude bool `json:"exclude,omitempty"`
  263. Type string `json:"type,omitempty"`
  264. }) {
  265. out.RawByte('{')
  266. first := true
  267. _ = first
  268. if in.Exclude {
  269. const prefix string = ",\"exclude\":"
  270. first = false
  271. out.RawString(prefix[1:])
  272. out.Bool(bool(in.Exclude))
  273. }
  274. if in.Type != "" {
  275. const prefix string = ",\"type\":"
  276. if first {
  277. first = false
  278. out.RawString(prefix[1:])
  279. } else {
  280. out.RawString(prefix)
  281. }
  282. out.String(string(in.Type))
  283. }
  284. out.RawByte('}')
  285. }
  286. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget2(in *jlexer.Lexer, out *SetAutoAttachParams) {
  287. isTopLevel := in.IsStart()
  288. if in.IsNull() {
  289. if isTopLevel {
  290. in.Consumed()
  291. }
  292. in.Skip()
  293. return
  294. }
  295. in.Delim('{')
  296. for !in.IsDelim('}') {
  297. key := in.UnsafeFieldName(false)
  298. in.WantColon()
  299. if in.IsNull() {
  300. in.Skip()
  301. in.WantComma()
  302. continue
  303. }
  304. switch key {
  305. case "autoAttach":
  306. out.AutoAttach = bool(in.Bool())
  307. case "waitForDebuggerOnStart":
  308. out.WaitForDebuggerOnStart = bool(in.Bool())
  309. case "flatten":
  310. out.Flatten = bool(in.Bool())
  311. case "filter":
  312. if in.IsNull() {
  313. in.Skip()
  314. out.Filter = nil
  315. } else {
  316. in.Delim('[')
  317. if out.Filter == nil {
  318. if !in.IsDelim(']') {
  319. out.Filter = make(Filter, 0, 2)
  320. } else {
  321. out.Filter = Filter{}
  322. }
  323. } else {
  324. out.Filter = (out.Filter)[:0]
  325. }
  326. for !in.IsDelim(']') {
  327. var v7 struct {
  328. Exclude bool `json:"exclude,omitempty"`
  329. Type string `json:"type,omitempty"`
  330. }
  331. easyjsonC5a4559bDecode(in, &v7)
  332. out.Filter = append(out.Filter, v7)
  333. in.WantComma()
  334. }
  335. in.Delim(']')
  336. }
  337. default:
  338. in.SkipRecursive()
  339. }
  340. in.WantComma()
  341. }
  342. in.Delim('}')
  343. if isTopLevel {
  344. in.Consumed()
  345. }
  346. }
  347. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget2(out *jwriter.Writer, in SetAutoAttachParams) {
  348. out.RawByte('{')
  349. first := true
  350. _ = first
  351. {
  352. const prefix string = ",\"autoAttach\":"
  353. out.RawString(prefix[1:])
  354. out.Bool(bool(in.AutoAttach))
  355. }
  356. {
  357. const prefix string = ",\"waitForDebuggerOnStart\":"
  358. out.RawString(prefix)
  359. out.Bool(bool(in.WaitForDebuggerOnStart))
  360. }
  361. if in.Flatten {
  362. const prefix string = ",\"flatten\":"
  363. out.RawString(prefix)
  364. out.Bool(bool(in.Flatten))
  365. }
  366. if len(in.Filter) != 0 {
  367. const prefix string = ",\"filter\":"
  368. out.RawString(prefix)
  369. {
  370. out.RawByte('[')
  371. for v8, v9 := range in.Filter {
  372. if v8 > 0 {
  373. out.RawByte(',')
  374. }
  375. easyjsonC5a4559bEncode(out, v9)
  376. }
  377. out.RawByte(']')
  378. }
  379. }
  380. out.RawByte('}')
  381. }
  382. // MarshalJSON supports json.Marshaler interface
  383. func (v SetAutoAttachParams) MarshalJSON() ([]byte, error) {
  384. w := jwriter.Writer{}
  385. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget2(&w, v)
  386. return w.Buffer.BuildBytes(), w.Error
  387. }
  388. // MarshalEasyJSON supports easyjson.Marshaler interface
  389. func (v SetAutoAttachParams) MarshalEasyJSON(w *jwriter.Writer) {
  390. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget2(w, v)
  391. }
  392. // UnmarshalJSON supports json.Unmarshaler interface
  393. func (v *SetAutoAttachParams) UnmarshalJSON(data []byte) error {
  394. r := jlexer.Lexer{Data: data}
  395. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget2(&r, v)
  396. return r.Error()
  397. }
  398. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  399. func (v *SetAutoAttachParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  400. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget2(l, v)
  401. }
  402. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget3(in *jlexer.Lexer, out *RemoteLocation) {
  403. isTopLevel := in.IsStart()
  404. if in.IsNull() {
  405. if isTopLevel {
  406. in.Consumed()
  407. }
  408. in.Skip()
  409. return
  410. }
  411. in.Delim('{')
  412. for !in.IsDelim('}') {
  413. key := in.UnsafeFieldName(false)
  414. in.WantColon()
  415. if in.IsNull() {
  416. in.Skip()
  417. in.WantComma()
  418. continue
  419. }
  420. switch key {
  421. case "host":
  422. out.Host = string(in.String())
  423. case "port":
  424. out.Port = int64(in.Int64())
  425. default:
  426. in.SkipRecursive()
  427. }
  428. in.WantComma()
  429. }
  430. in.Delim('}')
  431. if isTopLevel {
  432. in.Consumed()
  433. }
  434. }
  435. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget3(out *jwriter.Writer, in RemoteLocation) {
  436. out.RawByte('{')
  437. first := true
  438. _ = first
  439. {
  440. const prefix string = ",\"host\":"
  441. out.RawString(prefix[1:])
  442. out.String(string(in.Host))
  443. }
  444. {
  445. const prefix string = ",\"port\":"
  446. out.RawString(prefix)
  447. out.Int64(int64(in.Port))
  448. }
  449. out.RawByte('}')
  450. }
  451. // MarshalJSON supports json.Marshaler interface
  452. func (v RemoteLocation) MarshalJSON() ([]byte, error) {
  453. w := jwriter.Writer{}
  454. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget3(&w, v)
  455. return w.Buffer.BuildBytes(), w.Error
  456. }
  457. // MarshalEasyJSON supports easyjson.Marshaler interface
  458. func (v RemoteLocation) MarshalEasyJSON(w *jwriter.Writer) {
  459. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget3(w, v)
  460. }
  461. // UnmarshalJSON supports json.Unmarshaler interface
  462. func (v *RemoteLocation) UnmarshalJSON(data []byte) error {
  463. r := jlexer.Lexer{Data: data}
  464. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget3(&r, v)
  465. return r.Error()
  466. }
  467. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  468. func (v *RemoteLocation) UnmarshalEasyJSON(l *jlexer.Lexer) {
  469. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget3(l, v)
  470. }
  471. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget4(in *jlexer.Lexer, out *Info) {
  472. isTopLevel := in.IsStart()
  473. if in.IsNull() {
  474. if isTopLevel {
  475. in.Consumed()
  476. }
  477. in.Skip()
  478. return
  479. }
  480. in.Delim('{')
  481. for !in.IsDelim('}') {
  482. key := in.UnsafeFieldName(false)
  483. in.WantColon()
  484. if in.IsNull() {
  485. in.Skip()
  486. in.WantComma()
  487. continue
  488. }
  489. switch key {
  490. case "targetId":
  491. out.TargetID = ID(in.String())
  492. case "type":
  493. out.Type = string(in.String())
  494. case "title":
  495. out.Title = string(in.String())
  496. case "url":
  497. out.URL = string(in.String())
  498. case "attached":
  499. out.Attached = bool(in.Bool())
  500. case "openerId":
  501. out.OpenerID = ID(in.String())
  502. case "canAccessOpener":
  503. out.CanAccessOpener = bool(in.Bool())
  504. case "openerFrameId":
  505. (out.OpenerFrameID).UnmarshalEasyJSON(in)
  506. case "browserContextId":
  507. out.BrowserContextID = cdp.BrowserContextID(in.String())
  508. case "subtype":
  509. out.Subtype = string(in.String())
  510. default:
  511. in.SkipRecursive()
  512. }
  513. in.WantComma()
  514. }
  515. in.Delim('}')
  516. if isTopLevel {
  517. in.Consumed()
  518. }
  519. }
  520. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget4(out *jwriter.Writer, in Info) {
  521. out.RawByte('{')
  522. first := true
  523. _ = first
  524. {
  525. const prefix string = ",\"targetId\":"
  526. out.RawString(prefix[1:])
  527. out.String(string(in.TargetID))
  528. }
  529. {
  530. const prefix string = ",\"type\":"
  531. out.RawString(prefix)
  532. out.String(string(in.Type))
  533. }
  534. {
  535. const prefix string = ",\"title\":"
  536. out.RawString(prefix)
  537. out.String(string(in.Title))
  538. }
  539. {
  540. const prefix string = ",\"url\":"
  541. out.RawString(prefix)
  542. out.String(string(in.URL))
  543. }
  544. {
  545. const prefix string = ",\"attached\":"
  546. out.RawString(prefix)
  547. out.Bool(bool(in.Attached))
  548. }
  549. if in.OpenerID != "" {
  550. const prefix string = ",\"openerId\":"
  551. out.RawString(prefix)
  552. out.String(string(in.OpenerID))
  553. }
  554. {
  555. const prefix string = ",\"canAccessOpener\":"
  556. out.RawString(prefix)
  557. out.Bool(bool(in.CanAccessOpener))
  558. }
  559. if in.OpenerFrameID != "" {
  560. const prefix string = ",\"openerFrameId\":"
  561. out.RawString(prefix)
  562. out.String(string(in.OpenerFrameID))
  563. }
  564. if in.BrowserContextID != "" {
  565. const prefix string = ",\"browserContextId\":"
  566. out.RawString(prefix)
  567. out.String(string(in.BrowserContextID))
  568. }
  569. if in.Subtype != "" {
  570. const prefix string = ",\"subtype\":"
  571. out.RawString(prefix)
  572. out.String(string(in.Subtype))
  573. }
  574. out.RawByte('}')
  575. }
  576. // MarshalJSON supports json.Marshaler interface
  577. func (v Info) MarshalJSON() ([]byte, error) {
  578. w := jwriter.Writer{}
  579. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget4(&w, v)
  580. return w.Buffer.BuildBytes(), w.Error
  581. }
  582. // MarshalEasyJSON supports easyjson.Marshaler interface
  583. func (v Info) MarshalEasyJSON(w *jwriter.Writer) {
  584. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget4(w, v)
  585. }
  586. // UnmarshalJSON supports json.Unmarshaler interface
  587. func (v *Info) UnmarshalJSON(data []byte) error {
  588. r := jlexer.Lexer{Data: data}
  589. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget4(&r, v)
  590. return r.Error()
  591. }
  592. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  593. func (v *Info) UnmarshalEasyJSON(l *jlexer.Lexer) {
  594. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget4(l, v)
  595. }
  596. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget5(in *jlexer.Lexer, out *GetTargetsReturns) {
  597. isTopLevel := in.IsStart()
  598. if in.IsNull() {
  599. if isTopLevel {
  600. in.Consumed()
  601. }
  602. in.Skip()
  603. return
  604. }
  605. in.Delim('{')
  606. for !in.IsDelim('}') {
  607. key := in.UnsafeFieldName(false)
  608. in.WantColon()
  609. if in.IsNull() {
  610. in.Skip()
  611. in.WantComma()
  612. continue
  613. }
  614. switch key {
  615. case "targetInfos":
  616. if in.IsNull() {
  617. in.Skip()
  618. out.TargetInfos = nil
  619. } else {
  620. in.Delim('[')
  621. if out.TargetInfos == nil {
  622. if !in.IsDelim(']') {
  623. out.TargetInfos = make([]*Info, 0, 8)
  624. } else {
  625. out.TargetInfos = []*Info{}
  626. }
  627. } else {
  628. out.TargetInfos = (out.TargetInfos)[:0]
  629. }
  630. for !in.IsDelim(']') {
  631. var v10 *Info
  632. if in.IsNull() {
  633. in.Skip()
  634. v10 = nil
  635. } else {
  636. if v10 == nil {
  637. v10 = new(Info)
  638. }
  639. (*v10).UnmarshalEasyJSON(in)
  640. }
  641. out.TargetInfos = append(out.TargetInfos, v10)
  642. in.WantComma()
  643. }
  644. in.Delim(']')
  645. }
  646. default:
  647. in.SkipRecursive()
  648. }
  649. in.WantComma()
  650. }
  651. in.Delim('}')
  652. if isTopLevel {
  653. in.Consumed()
  654. }
  655. }
  656. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget5(out *jwriter.Writer, in GetTargetsReturns) {
  657. out.RawByte('{')
  658. first := true
  659. _ = first
  660. if len(in.TargetInfos) != 0 {
  661. const prefix string = ",\"targetInfos\":"
  662. first = false
  663. out.RawString(prefix[1:])
  664. {
  665. out.RawByte('[')
  666. for v11, v12 := range in.TargetInfos {
  667. if v11 > 0 {
  668. out.RawByte(',')
  669. }
  670. if v12 == nil {
  671. out.RawString("null")
  672. } else {
  673. (*v12).MarshalEasyJSON(out)
  674. }
  675. }
  676. out.RawByte(']')
  677. }
  678. }
  679. out.RawByte('}')
  680. }
  681. // MarshalJSON supports json.Marshaler interface
  682. func (v GetTargetsReturns) MarshalJSON() ([]byte, error) {
  683. w := jwriter.Writer{}
  684. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget5(&w, v)
  685. return w.Buffer.BuildBytes(), w.Error
  686. }
  687. // MarshalEasyJSON supports easyjson.Marshaler interface
  688. func (v GetTargetsReturns) MarshalEasyJSON(w *jwriter.Writer) {
  689. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget5(w, v)
  690. }
  691. // UnmarshalJSON supports json.Unmarshaler interface
  692. func (v *GetTargetsReturns) UnmarshalJSON(data []byte) error {
  693. r := jlexer.Lexer{Data: data}
  694. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget5(&r, v)
  695. return r.Error()
  696. }
  697. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  698. func (v *GetTargetsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  699. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget5(l, v)
  700. }
  701. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget6(in *jlexer.Lexer, out *GetTargetsParams) {
  702. isTopLevel := in.IsStart()
  703. if in.IsNull() {
  704. if isTopLevel {
  705. in.Consumed()
  706. }
  707. in.Skip()
  708. return
  709. }
  710. in.Delim('{')
  711. for !in.IsDelim('}') {
  712. key := in.UnsafeFieldName(false)
  713. in.WantColon()
  714. if in.IsNull() {
  715. in.Skip()
  716. in.WantComma()
  717. continue
  718. }
  719. switch key {
  720. case "filter":
  721. if in.IsNull() {
  722. in.Skip()
  723. out.Filter = nil
  724. } else {
  725. in.Delim('[')
  726. if out.Filter == nil {
  727. if !in.IsDelim(']') {
  728. out.Filter = make(Filter, 0, 2)
  729. } else {
  730. out.Filter = Filter{}
  731. }
  732. } else {
  733. out.Filter = (out.Filter)[:0]
  734. }
  735. for !in.IsDelim(']') {
  736. var v13 struct {
  737. Exclude bool `json:"exclude,omitempty"`
  738. Type string `json:"type,omitempty"`
  739. }
  740. easyjsonC5a4559bDecode(in, &v13)
  741. out.Filter = append(out.Filter, v13)
  742. in.WantComma()
  743. }
  744. in.Delim(']')
  745. }
  746. default:
  747. in.SkipRecursive()
  748. }
  749. in.WantComma()
  750. }
  751. in.Delim('}')
  752. if isTopLevel {
  753. in.Consumed()
  754. }
  755. }
  756. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget6(out *jwriter.Writer, in GetTargetsParams) {
  757. out.RawByte('{')
  758. first := true
  759. _ = first
  760. if len(in.Filter) != 0 {
  761. const prefix string = ",\"filter\":"
  762. first = false
  763. out.RawString(prefix[1:])
  764. {
  765. out.RawByte('[')
  766. for v14, v15 := range in.Filter {
  767. if v14 > 0 {
  768. out.RawByte(',')
  769. }
  770. easyjsonC5a4559bEncode(out, v15)
  771. }
  772. out.RawByte(']')
  773. }
  774. }
  775. out.RawByte('}')
  776. }
  777. // MarshalJSON supports json.Marshaler interface
  778. func (v GetTargetsParams) MarshalJSON() ([]byte, error) {
  779. w := jwriter.Writer{}
  780. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget6(&w, v)
  781. return w.Buffer.BuildBytes(), w.Error
  782. }
  783. // MarshalEasyJSON supports easyjson.Marshaler interface
  784. func (v GetTargetsParams) MarshalEasyJSON(w *jwriter.Writer) {
  785. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget6(w, v)
  786. }
  787. // UnmarshalJSON supports json.Unmarshaler interface
  788. func (v *GetTargetsParams) UnmarshalJSON(data []byte) error {
  789. r := jlexer.Lexer{Data: data}
  790. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget6(&r, v)
  791. return r.Error()
  792. }
  793. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  794. func (v *GetTargetsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  795. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget6(l, v)
  796. }
  797. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget7(in *jlexer.Lexer, out *GetTargetInfoReturns) {
  798. isTopLevel := in.IsStart()
  799. if in.IsNull() {
  800. if isTopLevel {
  801. in.Consumed()
  802. }
  803. in.Skip()
  804. return
  805. }
  806. in.Delim('{')
  807. for !in.IsDelim('}') {
  808. key := in.UnsafeFieldName(false)
  809. in.WantColon()
  810. if in.IsNull() {
  811. in.Skip()
  812. in.WantComma()
  813. continue
  814. }
  815. switch key {
  816. case "targetInfo":
  817. if in.IsNull() {
  818. in.Skip()
  819. out.TargetInfo = nil
  820. } else {
  821. if out.TargetInfo == nil {
  822. out.TargetInfo = new(Info)
  823. }
  824. (*out.TargetInfo).UnmarshalEasyJSON(in)
  825. }
  826. default:
  827. in.SkipRecursive()
  828. }
  829. in.WantComma()
  830. }
  831. in.Delim('}')
  832. if isTopLevel {
  833. in.Consumed()
  834. }
  835. }
  836. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget7(out *jwriter.Writer, in GetTargetInfoReturns) {
  837. out.RawByte('{')
  838. first := true
  839. _ = first
  840. if in.TargetInfo != nil {
  841. const prefix string = ",\"targetInfo\":"
  842. first = false
  843. out.RawString(prefix[1:])
  844. (*in.TargetInfo).MarshalEasyJSON(out)
  845. }
  846. out.RawByte('}')
  847. }
  848. // MarshalJSON supports json.Marshaler interface
  849. func (v GetTargetInfoReturns) MarshalJSON() ([]byte, error) {
  850. w := jwriter.Writer{}
  851. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget7(&w, v)
  852. return w.Buffer.BuildBytes(), w.Error
  853. }
  854. // MarshalEasyJSON supports easyjson.Marshaler interface
  855. func (v GetTargetInfoReturns) MarshalEasyJSON(w *jwriter.Writer) {
  856. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget7(w, v)
  857. }
  858. // UnmarshalJSON supports json.Unmarshaler interface
  859. func (v *GetTargetInfoReturns) UnmarshalJSON(data []byte) error {
  860. r := jlexer.Lexer{Data: data}
  861. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget7(&r, v)
  862. return r.Error()
  863. }
  864. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  865. func (v *GetTargetInfoReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  866. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget7(l, v)
  867. }
  868. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget8(in *jlexer.Lexer, out *GetTargetInfoParams) {
  869. isTopLevel := in.IsStart()
  870. if in.IsNull() {
  871. if isTopLevel {
  872. in.Consumed()
  873. }
  874. in.Skip()
  875. return
  876. }
  877. in.Delim('{')
  878. for !in.IsDelim('}') {
  879. key := in.UnsafeFieldName(false)
  880. in.WantColon()
  881. if in.IsNull() {
  882. in.Skip()
  883. in.WantComma()
  884. continue
  885. }
  886. switch key {
  887. case "targetId":
  888. out.TargetID = ID(in.String())
  889. default:
  890. in.SkipRecursive()
  891. }
  892. in.WantComma()
  893. }
  894. in.Delim('}')
  895. if isTopLevel {
  896. in.Consumed()
  897. }
  898. }
  899. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget8(out *jwriter.Writer, in GetTargetInfoParams) {
  900. out.RawByte('{')
  901. first := true
  902. _ = first
  903. if in.TargetID != "" {
  904. const prefix string = ",\"targetId\":"
  905. first = false
  906. out.RawString(prefix[1:])
  907. out.String(string(in.TargetID))
  908. }
  909. out.RawByte('}')
  910. }
  911. // MarshalJSON supports json.Marshaler interface
  912. func (v GetTargetInfoParams) MarshalJSON() ([]byte, error) {
  913. w := jwriter.Writer{}
  914. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget8(&w, v)
  915. return w.Buffer.BuildBytes(), w.Error
  916. }
  917. // MarshalEasyJSON supports easyjson.Marshaler interface
  918. func (v GetTargetInfoParams) MarshalEasyJSON(w *jwriter.Writer) {
  919. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget8(w, v)
  920. }
  921. // UnmarshalJSON supports json.Unmarshaler interface
  922. func (v *GetTargetInfoParams) UnmarshalJSON(data []byte) error {
  923. r := jlexer.Lexer{Data: data}
  924. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget8(&r, v)
  925. return r.Error()
  926. }
  927. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  928. func (v *GetTargetInfoParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  929. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget8(l, v)
  930. }
  931. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget9(in *jlexer.Lexer, out *GetBrowserContextsReturns) {
  932. isTopLevel := in.IsStart()
  933. if in.IsNull() {
  934. if isTopLevel {
  935. in.Consumed()
  936. }
  937. in.Skip()
  938. return
  939. }
  940. in.Delim('{')
  941. for !in.IsDelim('}') {
  942. key := in.UnsafeFieldName(false)
  943. in.WantColon()
  944. if in.IsNull() {
  945. in.Skip()
  946. in.WantComma()
  947. continue
  948. }
  949. switch key {
  950. case "browserContextIds":
  951. if in.IsNull() {
  952. in.Skip()
  953. out.BrowserContextIDs = nil
  954. } else {
  955. in.Delim('[')
  956. if out.BrowserContextIDs == nil {
  957. if !in.IsDelim(']') {
  958. out.BrowserContextIDs = make([]cdp.BrowserContextID, 0, 4)
  959. } else {
  960. out.BrowserContextIDs = []cdp.BrowserContextID{}
  961. }
  962. } else {
  963. out.BrowserContextIDs = (out.BrowserContextIDs)[:0]
  964. }
  965. for !in.IsDelim(']') {
  966. var v16 cdp.BrowserContextID
  967. v16 = cdp.BrowserContextID(in.String())
  968. out.BrowserContextIDs = append(out.BrowserContextIDs, v16)
  969. in.WantComma()
  970. }
  971. in.Delim(']')
  972. }
  973. default:
  974. in.SkipRecursive()
  975. }
  976. in.WantComma()
  977. }
  978. in.Delim('}')
  979. if isTopLevel {
  980. in.Consumed()
  981. }
  982. }
  983. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget9(out *jwriter.Writer, in GetBrowserContextsReturns) {
  984. out.RawByte('{')
  985. first := true
  986. _ = first
  987. if len(in.BrowserContextIDs) != 0 {
  988. const prefix string = ",\"browserContextIds\":"
  989. first = false
  990. out.RawString(prefix[1:])
  991. {
  992. out.RawByte('[')
  993. for v17, v18 := range in.BrowserContextIDs {
  994. if v17 > 0 {
  995. out.RawByte(',')
  996. }
  997. out.String(string(v18))
  998. }
  999. out.RawByte(']')
  1000. }
  1001. }
  1002. out.RawByte('}')
  1003. }
  1004. // MarshalJSON supports json.Marshaler interface
  1005. func (v GetBrowserContextsReturns) MarshalJSON() ([]byte, error) {
  1006. w := jwriter.Writer{}
  1007. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget9(&w, v)
  1008. return w.Buffer.BuildBytes(), w.Error
  1009. }
  1010. // MarshalEasyJSON supports easyjson.Marshaler interface
  1011. func (v GetBrowserContextsReturns) MarshalEasyJSON(w *jwriter.Writer) {
  1012. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget9(w, v)
  1013. }
  1014. // UnmarshalJSON supports json.Unmarshaler interface
  1015. func (v *GetBrowserContextsReturns) UnmarshalJSON(data []byte) error {
  1016. r := jlexer.Lexer{Data: data}
  1017. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget9(&r, v)
  1018. return r.Error()
  1019. }
  1020. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1021. func (v *GetBrowserContextsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1022. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget9(l, v)
  1023. }
  1024. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget10(in *jlexer.Lexer, out *GetBrowserContextsParams) {
  1025. isTopLevel := in.IsStart()
  1026. if in.IsNull() {
  1027. if isTopLevel {
  1028. in.Consumed()
  1029. }
  1030. in.Skip()
  1031. return
  1032. }
  1033. in.Delim('{')
  1034. for !in.IsDelim('}') {
  1035. key := in.UnsafeFieldName(false)
  1036. in.WantColon()
  1037. if in.IsNull() {
  1038. in.Skip()
  1039. in.WantComma()
  1040. continue
  1041. }
  1042. switch key {
  1043. default:
  1044. in.SkipRecursive()
  1045. }
  1046. in.WantComma()
  1047. }
  1048. in.Delim('}')
  1049. if isTopLevel {
  1050. in.Consumed()
  1051. }
  1052. }
  1053. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget10(out *jwriter.Writer, in GetBrowserContextsParams) {
  1054. out.RawByte('{')
  1055. first := true
  1056. _ = first
  1057. out.RawByte('}')
  1058. }
  1059. // MarshalJSON supports json.Marshaler interface
  1060. func (v GetBrowserContextsParams) MarshalJSON() ([]byte, error) {
  1061. w := jwriter.Writer{}
  1062. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget10(&w, v)
  1063. return w.Buffer.BuildBytes(), w.Error
  1064. }
  1065. // MarshalEasyJSON supports easyjson.Marshaler interface
  1066. func (v GetBrowserContextsParams) MarshalEasyJSON(w *jwriter.Writer) {
  1067. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget10(w, v)
  1068. }
  1069. // UnmarshalJSON supports json.Unmarshaler interface
  1070. func (v *GetBrowserContextsParams) UnmarshalJSON(data []byte) error {
  1071. r := jlexer.Lexer{Data: data}
  1072. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget10(&r, v)
  1073. return r.Error()
  1074. }
  1075. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1076. func (v *GetBrowserContextsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1077. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget10(l, v)
  1078. }
  1079. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget11(in *jlexer.Lexer, out *FilterEntry) {
  1080. isTopLevel := in.IsStart()
  1081. if in.IsNull() {
  1082. if isTopLevel {
  1083. in.Consumed()
  1084. }
  1085. in.Skip()
  1086. return
  1087. }
  1088. in.Delim('{')
  1089. for !in.IsDelim('}') {
  1090. key := in.UnsafeFieldName(false)
  1091. in.WantColon()
  1092. if in.IsNull() {
  1093. in.Skip()
  1094. in.WantComma()
  1095. continue
  1096. }
  1097. switch key {
  1098. case "exclude":
  1099. out.Exclude = bool(in.Bool())
  1100. case "type":
  1101. out.Type = string(in.String())
  1102. default:
  1103. in.SkipRecursive()
  1104. }
  1105. in.WantComma()
  1106. }
  1107. in.Delim('}')
  1108. if isTopLevel {
  1109. in.Consumed()
  1110. }
  1111. }
  1112. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget11(out *jwriter.Writer, in FilterEntry) {
  1113. out.RawByte('{')
  1114. first := true
  1115. _ = first
  1116. if in.Exclude {
  1117. const prefix string = ",\"exclude\":"
  1118. first = false
  1119. out.RawString(prefix[1:])
  1120. out.Bool(bool(in.Exclude))
  1121. }
  1122. if in.Type != "" {
  1123. const prefix string = ",\"type\":"
  1124. if first {
  1125. first = false
  1126. out.RawString(prefix[1:])
  1127. } else {
  1128. out.RawString(prefix)
  1129. }
  1130. out.String(string(in.Type))
  1131. }
  1132. out.RawByte('}')
  1133. }
  1134. // MarshalJSON supports json.Marshaler interface
  1135. func (v FilterEntry) MarshalJSON() ([]byte, error) {
  1136. w := jwriter.Writer{}
  1137. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget11(&w, v)
  1138. return w.Buffer.BuildBytes(), w.Error
  1139. }
  1140. // MarshalEasyJSON supports easyjson.Marshaler interface
  1141. func (v FilterEntry) MarshalEasyJSON(w *jwriter.Writer) {
  1142. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget11(w, v)
  1143. }
  1144. // UnmarshalJSON supports json.Unmarshaler interface
  1145. func (v *FilterEntry) UnmarshalJSON(data []byte) error {
  1146. r := jlexer.Lexer{Data: data}
  1147. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget11(&r, v)
  1148. return r.Error()
  1149. }
  1150. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1151. func (v *FilterEntry) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1152. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget11(l, v)
  1153. }
  1154. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget12(in *jlexer.Lexer, out *ExposeDevToolsProtocolParams) {
  1155. isTopLevel := in.IsStart()
  1156. if in.IsNull() {
  1157. if isTopLevel {
  1158. in.Consumed()
  1159. }
  1160. in.Skip()
  1161. return
  1162. }
  1163. in.Delim('{')
  1164. for !in.IsDelim('}') {
  1165. key := in.UnsafeFieldName(false)
  1166. in.WantColon()
  1167. if in.IsNull() {
  1168. in.Skip()
  1169. in.WantComma()
  1170. continue
  1171. }
  1172. switch key {
  1173. case "targetId":
  1174. out.TargetID = ID(in.String())
  1175. case "bindingName":
  1176. out.BindingName = string(in.String())
  1177. default:
  1178. in.SkipRecursive()
  1179. }
  1180. in.WantComma()
  1181. }
  1182. in.Delim('}')
  1183. if isTopLevel {
  1184. in.Consumed()
  1185. }
  1186. }
  1187. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget12(out *jwriter.Writer, in ExposeDevToolsProtocolParams) {
  1188. out.RawByte('{')
  1189. first := true
  1190. _ = first
  1191. {
  1192. const prefix string = ",\"targetId\":"
  1193. out.RawString(prefix[1:])
  1194. out.String(string(in.TargetID))
  1195. }
  1196. if in.BindingName != "" {
  1197. const prefix string = ",\"bindingName\":"
  1198. out.RawString(prefix)
  1199. out.String(string(in.BindingName))
  1200. }
  1201. out.RawByte('}')
  1202. }
  1203. // MarshalJSON supports json.Marshaler interface
  1204. func (v ExposeDevToolsProtocolParams) MarshalJSON() ([]byte, error) {
  1205. w := jwriter.Writer{}
  1206. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget12(&w, v)
  1207. return w.Buffer.BuildBytes(), w.Error
  1208. }
  1209. // MarshalEasyJSON supports easyjson.Marshaler interface
  1210. func (v ExposeDevToolsProtocolParams) MarshalEasyJSON(w *jwriter.Writer) {
  1211. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget12(w, v)
  1212. }
  1213. // UnmarshalJSON supports json.Unmarshaler interface
  1214. func (v *ExposeDevToolsProtocolParams) UnmarshalJSON(data []byte) error {
  1215. r := jlexer.Lexer{Data: data}
  1216. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget12(&r, v)
  1217. return r.Error()
  1218. }
  1219. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1220. func (v *ExposeDevToolsProtocolParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1221. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget12(l, v)
  1222. }
  1223. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget13(in *jlexer.Lexer, out *EventTargetInfoChanged) {
  1224. isTopLevel := in.IsStart()
  1225. if in.IsNull() {
  1226. if isTopLevel {
  1227. in.Consumed()
  1228. }
  1229. in.Skip()
  1230. return
  1231. }
  1232. in.Delim('{')
  1233. for !in.IsDelim('}') {
  1234. key := in.UnsafeFieldName(false)
  1235. in.WantColon()
  1236. if in.IsNull() {
  1237. in.Skip()
  1238. in.WantComma()
  1239. continue
  1240. }
  1241. switch key {
  1242. case "targetInfo":
  1243. if in.IsNull() {
  1244. in.Skip()
  1245. out.TargetInfo = nil
  1246. } else {
  1247. if out.TargetInfo == nil {
  1248. out.TargetInfo = new(Info)
  1249. }
  1250. (*out.TargetInfo).UnmarshalEasyJSON(in)
  1251. }
  1252. default:
  1253. in.SkipRecursive()
  1254. }
  1255. in.WantComma()
  1256. }
  1257. in.Delim('}')
  1258. if isTopLevel {
  1259. in.Consumed()
  1260. }
  1261. }
  1262. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget13(out *jwriter.Writer, in EventTargetInfoChanged) {
  1263. out.RawByte('{')
  1264. first := true
  1265. _ = first
  1266. {
  1267. const prefix string = ",\"targetInfo\":"
  1268. out.RawString(prefix[1:])
  1269. if in.TargetInfo == nil {
  1270. out.RawString("null")
  1271. } else {
  1272. (*in.TargetInfo).MarshalEasyJSON(out)
  1273. }
  1274. }
  1275. out.RawByte('}')
  1276. }
  1277. // MarshalJSON supports json.Marshaler interface
  1278. func (v EventTargetInfoChanged) MarshalJSON() ([]byte, error) {
  1279. w := jwriter.Writer{}
  1280. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget13(&w, v)
  1281. return w.Buffer.BuildBytes(), w.Error
  1282. }
  1283. // MarshalEasyJSON supports easyjson.Marshaler interface
  1284. func (v EventTargetInfoChanged) MarshalEasyJSON(w *jwriter.Writer) {
  1285. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget13(w, v)
  1286. }
  1287. // UnmarshalJSON supports json.Unmarshaler interface
  1288. func (v *EventTargetInfoChanged) UnmarshalJSON(data []byte) error {
  1289. r := jlexer.Lexer{Data: data}
  1290. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget13(&r, v)
  1291. return r.Error()
  1292. }
  1293. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1294. func (v *EventTargetInfoChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1295. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget13(l, v)
  1296. }
  1297. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget14(in *jlexer.Lexer, out *EventTargetDestroyed) {
  1298. isTopLevel := in.IsStart()
  1299. if in.IsNull() {
  1300. if isTopLevel {
  1301. in.Consumed()
  1302. }
  1303. in.Skip()
  1304. return
  1305. }
  1306. in.Delim('{')
  1307. for !in.IsDelim('}') {
  1308. key := in.UnsafeFieldName(false)
  1309. in.WantColon()
  1310. if in.IsNull() {
  1311. in.Skip()
  1312. in.WantComma()
  1313. continue
  1314. }
  1315. switch key {
  1316. case "targetId":
  1317. out.TargetID = ID(in.String())
  1318. default:
  1319. in.SkipRecursive()
  1320. }
  1321. in.WantComma()
  1322. }
  1323. in.Delim('}')
  1324. if isTopLevel {
  1325. in.Consumed()
  1326. }
  1327. }
  1328. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget14(out *jwriter.Writer, in EventTargetDestroyed) {
  1329. out.RawByte('{')
  1330. first := true
  1331. _ = first
  1332. {
  1333. const prefix string = ",\"targetId\":"
  1334. out.RawString(prefix[1:])
  1335. out.String(string(in.TargetID))
  1336. }
  1337. out.RawByte('}')
  1338. }
  1339. // MarshalJSON supports json.Marshaler interface
  1340. func (v EventTargetDestroyed) MarshalJSON() ([]byte, error) {
  1341. w := jwriter.Writer{}
  1342. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget14(&w, v)
  1343. return w.Buffer.BuildBytes(), w.Error
  1344. }
  1345. // MarshalEasyJSON supports easyjson.Marshaler interface
  1346. func (v EventTargetDestroyed) MarshalEasyJSON(w *jwriter.Writer) {
  1347. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget14(w, v)
  1348. }
  1349. // UnmarshalJSON supports json.Unmarshaler interface
  1350. func (v *EventTargetDestroyed) UnmarshalJSON(data []byte) error {
  1351. r := jlexer.Lexer{Data: data}
  1352. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget14(&r, v)
  1353. return r.Error()
  1354. }
  1355. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1356. func (v *EventTargetDestroyed) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1357. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget14(l, v)
  1358. }
  1359. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget15(in *jlexer.Lexer, out *EventTargetCreated) {
  1360. isTopLevel := in.IsStart()
  1361. if in.IsNull() {
  1362. if isTopLevel {
  1363. in.Consumed()
  1364. }
  1365. in.Skip()
  1366. return
  1367. }
  1368. in.Delim('{')
  1369. for !in.IsDelim('}') {
  1370. key := in.UnsafeFieldName(false)
  1371. in.WantColon()
  1372. if in.IsNull() {
  1373. in.Skip()
  1374. in.WantComma()
  1375. continue
  1376. }
  1377. switch key {
  1378. case "targetInfo":
  1379. if in.IsNull() {
  1380. in.Skip()
  1381. out.TargetInfo = nil
  1382. } else {
  1383. if out.TargetInfo == nil {
  1384. out.TargetInfo = new(Info)
  1385. }
  1386. (*out.TargetInfo).UnmarshalEasyJSON(in)
  1387. }
  1388. default:
  1389. in.SkipRecursive()
  1390. }
  1391. in.WantComma()
  1392. }
  1393. in.Delim('}')
  1394. if isTopLevel {
  1395. in.Consumed()
  1396. }
  1397. }
  1398. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget15(out *jwriter.Writer, in EventTargetCreated) {
  1399. out.RawByte('{')
  1400. first := true
  1401. _ = first
  1402. {
  1403. const prefix string = ",\"targetInfo\":"
  1404. out.RawString(prefix[1:])
  1405. if in.TargetInfo == nil {
  1406. out.RawString("null")
  1407. } else {
  1408. (*in.TargetInfo).MarshalEasyJSON(out)
  1409. }
  1410. }
  1411. out.RawByte('}')
  1412. }
  1413. // MarshalJSON supports json.Marshaler interface
  1414. func (v EventTargetCreated) MarshalJSON() ([]byte, error) {
  1415. w := jwriter.Writer{}
  1416. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget15(&w, v)
  1417. return w.Buffer.BuildBytes(), w.Error
  1418. }
  1419. // MarshalEasyJSON supports easyjson.Marshaler interface
  1420. func (v EventTargetCreated) MarshalEasyJSON(w *jwriter.Writer) {
  1421. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget15(w, v)
  1422. }
  1423. // UnmarshalJSON supports json.Unmarshaler interface
  1424. func (v *EventTargetCreated) UnmarshalJSON(data []byte) error {
  1425. r := jlexer.Lexer{Data: data}
  1426. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget15(&r, v)
  1427. return r.Error()
  1428. }
  1429. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1430. func (v *EventTargetCreated) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1431. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget15(l, v)
  1432. }
  1433. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget16(in *jlexer.Lexer, out *EventTargetCrashed) {
  1434. isTopLevel := in.IsStart()
  1435. if in.IsNull() {
  1436. if isTopLevel {
  1437. in.Consumed()
  1438. }
  1439. in.Skip()
  1440. return
  1441. }
  1442. in.Delim('{')
  1443. for !in.IsDelim('}') {
  1444. key := in.UnsafeFieldName(false)
  1445. in.WantColon()
  1446. if in.IsNull() {
  1447. in.Skip()
  1448. in.WantComma()
  1449. continue
  1450. }
  1451. switch key {
  1452. case "targetId":
  1453. out.TargetID = ID(in.String())
  1454. case "status":
  1455. out.Status = string(in.String())
  1456. case "errorCode":
  1457. out.ErrorCode = int64(in.Int64())
  1458. default:
  1459. in.SkipRecursive()
  1460. }
  1461. in.WantComma()
  1462. }
  1463. in.Delim('}')
  1464. if isTopLevel {
  1465. in.Consumed()
  1466. }
  1467. }
  1468. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget16(out *jwriter.Writer, in EventTargetCrashed) {
  1469. out.RawByte('{')
  1470. first := true
  1471. _ = first
  1472. {
  1473. const prefix string = ",\"targetId\":"
  1474. out.RawString(prefix[1:])
  1475. out.String(string(in.TargetID))
  1476. }
  1477. {
  1478. const prefix string = ",\"status\":"
  1479. out.RawString(prefix)
  1480. out.String(string(in.Status))
  1481. }
  1482. {
  1483. const prefix string = ",\"errorCode\":"
  1484. out.RawString(prefix)
  1485. out.Int64(int64(in.ErrorCode))
  1486. }
  1487. out.RawByte('}')
  1488. }
  1489. // MarshalJSON supports json.Marshaler interface
  1490. func (v EventTargetCrashed) MarshalJSON() ([]byte, error) {
  1491. w := jwriter.Writer{}
  1492. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget16(&w, v)
  1493. return w.Buffer.BuildBytes(), w.Error
  1494. }
  1495. // MarshalEasyJSON supports easyjson.Marshaler interface
  1496. func (v EventTargetCrashed) MarshalEasyJSON(w *jwriter.Writer) {
  1497. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget16(w, v)
  1498. }
  1499. // UnmarshalJSON supports json.Unmarshaler interface
  1500. func (v *EventTargetCrashed) UnmarshalJSON(data []byte) error {
  1501. r := jlexer.Lexer{Data: data}
  1502. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget16(&r, v)
  1503. return r.Error()
  1504. }
  1505. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1506. func (v *EventTargetCrashed) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1507. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget16(l, v)
  1508. }
  1509. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget17(in *jlexer.Lexer, out *EventReceivedMessageFromTarget) {
  1510. isTopLevel := in.IsStart()
  1511. if in.IsNull() {
  1512. if isTopLevel {
  1513. in.Consumed()
  1514. }
  1515. in.Skip()
  1516. return
  1517. }
  1518. in.Delim('{')
  1519. for !in.IsDelim('}') {
  1520. key := in.UnsafeFieldName(false)
  1521. in.WantColon()
  1522. if in.IsNull() {
  1523. in.Skip()
  1524. in.WantComma()
  1525. continue
  1526. }
  1527. switch key {
  1528. case "sessionId":
  1529. out.SessionID = SessionID(in.String())
  1530. case "message":
  1531. out.Message = string(in.String())
  1532. default:
  1533. in.SkipRecursive()
  1534. }
  1535. in.WantComma()
  1536. }
  1537. in.Delim('}')
  1538. if isTopLevel {
  1539. in.Consumed()
  1540. }
  1541. }
  1542. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget17(out *jwriter.Writer, in EventReceivedMessageFromTarget) {
  1543. out.RawByte('{')
  1544. first := true
  1545. _ = first
  1546. {
  1547. const prefix string = ",\"sessionId\":"
  1548. out.RawString(prefix[1:])
  1549. out.String(string(in.SessionID))
  1550. }
  1551. {
  1552. const prefix string = ",\"message\":"
  1553. out.RawString(prefix)
  1554. out.String(string(in.Message))
  1555. }
  1556. out.RawByte('}')
  1557. }
  1558. // MarshalJSON supports json.Marshaler interface
  1559. func (v EventReceivedMessageFromTarget) MarshalJSON() ([]byte, error) {
  1560. w := jwriter.Writer{}
  1561. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget17(&w, v)
  1562. return w.Buffer.BuildBytes(), w.Error
  1563. }
  1564. // MarshalEasyJSON supports easyjson.Marshaler interface
  1565. func (v EventReceivedMessageFromTarget) MarshalEasyJSON(w *jwriter.Writer) {
  1566. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget17(w, v)
  1567. }
  1568. // UnmarshalJSON supports json.Unmarshaler interface
  1569. func (v *EventReceivedMessageFromTarget) UnmarshalJSON(data []byte) error {
  1570. r := jlexer.Lexer{Data: data}
  1571. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget17(&r, v)
  1572. return r.Error()
  1573. }
  1574. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1575. func (v *EventReceivedMessageFromTarget) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1576. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget17(l, v)
  1577. }
  1578. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget18(in *jlexer.Lexer, out *EventDetachedFromTarget) {
  1579. isTopLevel := in.IsStart()
  1580. if in.IsNull() {
  1581. if isTopLevel {
  1582. in.Consumed()
  1583. }
  1584. in.Skip()
  1585. return
  1586. }
  1587. in.Delim('{')
  1588. for !in.IsDelim('}') {
  1589. key := in.UnsafeFieldName(false)
  1590. in.WantColon()
  1591. if in.IsNull() {
  1592. in.Skip()
  1593. in.WantComma()
  1594. continue
  1595. }
  1596. switch key {
  1597. case "sessionId":
  1598. out.SessionID = SessionID(in.String())
  1599. default:
  1600. in.SkipRecursive()
  1601. }
  1602. in.WantComma()
  1603. }
  1604. in.Delim('}')
  1605. if isTopLevel {
  1606. in.Consumed()
  1607. }
  1608. }
  1609. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget18(out *jwriter.Writer, in EventDetachedFromTarget) {
  1610. out.RawByte('{')
  1611. first := true
  1612. _ = first
  1613. {
  1614. const prefix string = ",\"sessionId\":"
  1615. out.RawString(prefix[1:])
  1616. out.String(string(in.SessionID))
  1617. }
  1618. out.RawByte('}')
  1619. }
  1620. // MarshalJSON supports json.Marshaler interface
  1621. func (v EventDetachedFromTarget) MarshalJSON() ([]byte, error) {
  1622. w := jwriter.Writer{}
  1623. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget18(&w, v)
  1624. return w.Buffer.BuildBytes(), w.Error
  1625. }
  1626. // MarshalEasyJSON supports easyjson.Marshaler interface
  1627. func (v EventDetachedFromTarget) MarshalEasyJSON(w *jwriter.Writer) {
  1628. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget18(w, v)
  1629. }
  1630. // UnmarshalJSON supports json.Unmarshaler interface
  1631. func (v *EventDetachedFromTarget) UnmarshalJSON(data []byte) error {
  1632. r := jlexer.Lexer{Data: data}
  1633. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget18(&r, v)
  1634. return r.Error()
  1635. }
  1636. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1637. func (v *EventDetachedFromTarget) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1638. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget18(l, v)
  1639. }
  1640. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget19(in *jlexer.Lexer, out *EventAttachedToTarget) {
  1641. isTopLevel := in.IsStart()
  1642. if in.IsNull() {
  1643. if isTopLevel {
  1644. in.Consumed()
  1645. }
  1646. in.Skip()
  1647. return
  1648. }
  1649. in.Delim('{')
  1650. for !in.IsDelim('}') {
  1651. key := in.UnsafeFieldName(false)
  1652. in.WantColon()
  1653. if in.IsNull() {
  1654. in.Skip()
  1655. in.WantComma()
  1656. continue
  1657. }
  1658. switch key {
  1659. case "sessionId":
  1660. out.SessionID = SessionID(in.String())
  1661. case "targetInfo":
  1662. if in.IsNull() {
  1663. in.Skip()
  1664. out.TargetInfo = nil
  1665. } else {
  1666. if out.TargetInfo == nil {
  1667. out.TargetInfo = new(Info)
  1668. }
  1669. (*out.TargetInfo).UnmarshalEasyJSON(in)
  1670. }
  1671. case "waitingForDebugger":
  1672. out.WaitingForDebugger = bool(in.Bool())
  1673. default:
  1674. in.SkipRecursive()
  1675. }
  1676. in.WantComma()
  1677. }
  1678. in.Delim('}')
  1679. if isTopLevel {
  1680. in.Consumed()
  1681. }
  1682. }
  1683. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget19(out *jwriter.Writer, in EventAttachedToTarget) {
  1684. out.RawByte('{')
  1685. first := true
  1686. _ = first
  1687. {
  1688. const prefix string = ",\"sessionId\":"
  1689. out.RawString(prefix[1:])
  1690. out.String(string(in.SessionID))
  1691. }
  1692. {
  1693. const prefix string = ",\"targetInfo\":"
  1694. out.RawString(prefix)
  1695. if in.TargetInfo == nil {
  1696. out.RawString("null")
  1697. } else {
  1698. (*in.TargetInfo).MarshalEasyJSON(out)
  1699. }
  1700. }
  1701. {
  1702. const prefix string = ",\"waitingForDebugger\":"
  1703. out.RawString(prefix)
  1704. out.Bool(bool(in.WaitingForDebugger))
  1705. }
  1706. out.RawByte('}')
  1707. }
  1708. // MarshalJSON supports json.Marshaler interface
  1709. func (v EventAttachedToTarget) MarshalJSON() ([]byte, error) {
  1710. w := jwriter.Writer{}
  1711. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget19(&w, v)
  1712. return w.Buffer.BuildBytes(), w.Error
  1713. }
  1714. // MarshalEasyJSON supports easyjson.Marshaler interface
  1715. func (v EventAttachedToTarget) MarshalEasyJSON(w *jwriter.Writer) {
  1716. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget19(w, v)
  1717. }
  1718. // UnmarshalJSON supports json.Unmarshaler interface
  1719. func (v *EventAttachedToTarget) UnmarshalJSON(data []byte) error {
  1720. r := jlexer.Lexer{Data: data}
  1721. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget19(&r, v)
  1722. return r.Error()
  1723. }
  1724. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1725. func (v *EventAttachedToTarget) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1726. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget19(l, v)
  1727. }
  1728. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget20(in *jlexer.Lexer, out *DisposeBrowserContextParams) {
  1729. isTopLevel := in.IsStart()
  1730. if in.IsNull() {
  1731. if isTopLevel {
  1732. in.Consumed()
  1733. }
  1734. in.Skip()
  1735. return
  1736. }
  1737. in.Delim('{')
  1738. for !in.IsDelim('}') {
  1739. key := in.UnsafeFieldName(false)
  1740. in.WantColon()
  1741. if in.IsNull() {
  1742. in.Skip()
  1743. in.WantComma()
  1744. continue
  1745. }
  1746. switch key {
  1747. case "browserContextId":
  1748. out.BrowserContextID = cdp.BrowserContextID(in.String())
  1749. default:
  1750. in.SkipRecursive()
  1751. }
  1752. in.WantComma()
  1753. }
  1754. in.Delim('}')
  1755. if isTopLevel {
  1756. in.Consumed()
  1757. }
  1758. }
  1759. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget20(out *jwriter.Writer, in DisposeBrowserContextParams) {
  1760. out.RawByte('{')
  1761. first := true
  1762. _ = first
  1763. {
  1764. const prefix string = ",\"browserContextId\":"
  1765. out.RawString(prefix[1:])
  1766. out.String(string(in.BrowserContextID))
  1767. }
  1768. out.RawByte('}')
  1769. }
  1770. // MarshalJSON supports json.Marshaler interface
  1771. func (v DisposeBrowserContextParams) MarshalJSON() ([]byte, error) {
  1772. w := jwriter.Writer{}
  1773. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget20(&w, v)
  1774. return w.Buffer.BuildBytes(), w.Error
  1775. }
  1776. // MarshalEasyJSON supports easyjson.Marshaler interface
  1777. func (v DisposeBrowserContextParams) MarshalEasyJSON(w *jwriter.Writer) {
  1778. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget20(w, v)
  1779. }
  1780. // UnmarshalJSON supports json.Unmarshaler interface
  1781. func (v *DisposeBrowserContextParams) UnmarshalJSON(data []byte) error {
  1782. r := jlexer.Lexer{Data: data}
  1783. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget20(&r, v)
  1784. return r.Error()
  1785. }
  1786. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1787. func (v *DisposeBrowserContextParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1788. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget20(l, v)
  1789. }
  1790. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget21(in *jlexer.Lexer, out *DetachFromTargetParams) {
  1791. isTopLevel := in.IsStart()
  1792. if in.IsNull() {
  1793. if isTopLevel {
  1794. in.Consumed()
  1795. }
  1796. in.Skip()
  1797. return
  1798. }
  1799. in.Delim('{')
  1800. for !in.IsDelim('}') {
  1801. key := in.UnsafeFieldName(false)
  1802. in.WantColon()
  1803. if in.IsNull() {
  1804. in.Skip()
  1805. in.WantComma()
  1806. continue
  1807. }
  1808. switch key {
  1809. case "sessionId":
  1810. out.SessionID = SessionID(in.String())
  1811. default:
  1812. in.SkipRecursive()
  1813. }
  1814. in.WantComma()
  1815. }
  1816. in.Delim('}')
  1817. if isTopLevel {
  1818. in.Consumed()
  1819. }
  1820. }
  1821. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget21(out *jwriter.Writer, in DetachFromTargetParams) {
  1822. out.RawByte('{')
  1823. first := true
  1824. _ = first
  1825. if in.SessionID != "" {
  1826. const prefix string = ",\"sessionId\":"
  1827. first = false
  1828. out.RawString(prefix[1:])
  1829. out.String(string(in.SessionID))
  1830. }
  1831. out.RawByte('}')
  1832. }
  1833. // MarshalJSON supports json.Marshaler interface
  1834. func (v DetachFromTargetParams) MarshalJSON() ([]byte, error) {
  1835. w := jwriter.Writer{}
  1836. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget21(&w, v)
  1837. return w.Buffer.BuildBytes(), w.Error
  1838. }
  1839. // MarshalEasyJSON supports easyjson.Marshaler interface
  1840. func (v DetachFromTargetParams) MarshalEasyJSON(w *jwriter.Writer) {
  1841. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget21(w, v)
  1842. }
  1843. // UnmarshalJSON supports json.Unmarshaler interface
  1844. func (v *DetachFromTargetParams) UnmarshalJSON(data []byte) error {
  1845. r := jlexer.Lexer{Data: data}
  1846. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget21(&r, v)
  1847. return r.Error()
  1848. }
  1849. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1850. func (v *DetachFromTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1851. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget21(l, v)
  1852. }
  1853. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget22(in *jlexer.Lexer, out *CreateTargetReturns) {
  1854. isTopLevel := in.IsStart()
  1855. if in.IsNull() {
  1856. if isTopLevel {
  1857. in.Consumed()
  1858. }
  1859. in.Skip()
  1860. return
  1861. }
  1862. in.Delim('{')
  1863. for !in.IsDelim('}') {
  1864. key := in.UnsafeFieldName(false)
  1865. in.WantColon()
  1866. if in.IsNull() {
  1867. in.Skip()
  1868. in.WantComma()
  1869. continue
  1870. }
  1871. switch key {
  1872. case "targetId":
  1873. out.TargetID = ID(in.String())
  1874. default:
  1875. in.SkipRecursive()
  1876. }
  1877. in.WantComma()
  1878. }
  1879. in.Delim('}')
  1880. if isTopLevel {
  1881. in.Consumed()
  1882. }
  1883. }
  1884. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget22(out *jwriter.Writer, in CreateTargetReturns) {
  1885. out.RawByte('{')
  1886. first := true
  1887. _ = first
  1888. if in.TargetID != "" {
  1889. const prefix string = ",\"targetId\":"
  1890. first = false
  1891. out.RawString(prefix[1:])
  1892. out.String(string(in.TargetID))
  1893. }
  1894. out.RawByte('}')
  1895. }
  1896. // MarshalJSON supports json.Marshaler interface
  1897. func (v CreateTargetReturns) MarshalJSON() ([]byte, error) {
  1898. w := jwriter.Writer{}
  1899. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget22(&w, v)
  1900. return w.Buffer.BuildBytes(), w.Error
  1901. }
  1902. // MarshalEasyJSON supports easyjson.Marshaler interface
  1903. func (v CreateTargetReturns) MarshalEasyJSON(w *jwriter.Writer) {
  1904. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget22(w, v)
  1905. }
  1906. // UnmarshalJSON supports json.Unmarshaler interface
  1907. func (v *CreateTargetReturns) UnmarshalJSON(data []byte) error {
  1908. r := jlexer.Lexer{Data: data}
  1909. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget22(&r, v)
  1910. return r.Error()
  1911. }
  1912. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1913. func (v *CreateTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1914. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget22(l, v)
  1915. }
  1916. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget23(in *jlexer.Lexer, out *CreateTargetParams) {
  1917. isTopLevel := in.IsStart()
  1918. if in.IsNull() {
  1919. if isTopLevel {
  1920. in.Consumed()
  1921. }
  1922. in.Skip()
  1923. return
  1924. }
  1925. in.Delim('{')
  1926. for !in.IsDelim('}') {
  1927. key := in.UnsafeFieldName(false)
  1928. in.WantColon()
  1929. if in.IsNull() {
  1930. in.Skip()
  1931. in.WantComma()
  1932. continue
  1933. }
  1934. switch key {
  1935. case "url":
  1936. out.URL = string(in.String())
  1937. case "width":
  1938. out.Width = int64(in.Int64())
  1939. case "height":
  1940. out.Height = int64(in.Int64())
  1941. case "browserContextId":
  1942. out.BrowserContextID = cdp.BrowserContextID(in.String())
  1943. case "enableBeginFrameControl":
  1944. out.EnableBeginFrameControl = bool(in.Bool())
  1945. case "newWindow":
  1946. out.NewWindow = bool(in.Bool())
  1947. case "background":
  1948. out.Background = bool(in.Bool())
  1949. case "forTab":
  1950. out.ForTab = bool(in.Bool())
  1951. default:
  1952. in.SkipRecursive()
  1953. }
  1954. in.WantComma()
  1955. }
  1956. in.Delim('}')
  1957. if isTopLevel {
  1958. in.Consumed()
  1959. }
  1960. }
  1961. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget23(out *jwriter.Writer, in CreateTargetParams) {
  1962. out.RawByte('{')
  1963. first := true
  1964. _ = first
  1965. {
  1966. const prefix string = ",\"url\":"
  1967. out.RawString(prefix[1:])
  1968. out.String(string(in.URL))
  1969. }
  1970. if in.Width != 0 {
  1971. const prefix string = ",\"width\":"
  1972. out.RawString(prefix)
  1973. out.Int64(int64(in.Width))
  1974. }
  1975. if in.Height != 0 {
  1976. const prefix string = ",\"height\":"
  1977. out.RawString(prefix)
  1978. out.Int64(int64(in.Height))
  1979. }
  1980. if in.BrowserContextID != "" {
  1981. const prefix string = ",\"browserContextId\":"
  1982. out.RawString(prefix)
  1983. out.String(string(in.BrowserContextID))
  1984. }
  1985. if in.EnableBeginFrameControl {
  1986. const prefix string = ",\"enableBeginFrameControl\":"
  1987. out.RawString(prefix)
  1988. out.Bool(bool(in.EnableBeginFrameControl))
  1989. }
  1990. if in.NewWindow {
  1991. const prefix string = ",\"newWindow\":"
  1992. out.RawString(prefix)
  1993. out.Bool(bool(in.NewWindow))
  1994. }
  1995. if in.Background {
  1996. const prefix string = ",\"background\":"
  1997. out.RawString(prefix)
  1998. out.Bool(bool(in.Background))
  1999. }
  2000. if in.ForTab {
  2001. const prefix string = ",\"forTab\":"
  2002. out.RawString(prefix)
  2003. out.Bool(bool(in.ForTab))
  2004. }
  2005. out.RawByte('}')
  2006. }
  2007. // MarshalJSON supports json.Marshaler interface
  2008. func (v CreateTargetParams) MarshalJSON() ([]byte, error) {
  2009. w := jwriter.Writer{}
  2010. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget23(&w, v)
  2011. return w.Buffer.BuildBytes(), w.Error
  2012. }
  2013. // MarshalEasyJSON supports easyjson.Marshaler interface
  2014. func (v CreateTargetParams) MarshalEasyJSON(w *jwriter.Writer) {
  2015. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget23(w, v)
  2016. }
  2017. // UnmarshalJSON supports json.Unmarshaler interface
  2018. func (v *CreateTargetParams) UnmarshalJSON(data []byte) error {
  2019. r := jlexer.Lexer{Data: data}
  2020. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget23(&r, v)
  2021. return r.Error()
  2022. }
  2023. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2024. func (v *CreateTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2025. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget23(l, v)
  2026. }
  2027. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget24(in *jlexer.Lexer, out *CreateBrowserContextReturns) {
  2028. isTopLevel := in.IsStart()
  2029. if in.IsNull() {
  2030. if isTopLevel {
  2031. in.Consumed()
  2032. }
  2033. in.Skip()
  2034. return
  2035. }
  2036. in.Delim('{')
  2037. for !in.IsDelim('}') {
  2038. key := in.UnsafeFieldName(false)
  2039. in.WantColon()
  2040. if in.IsNull() {
  2041. in.Skip()
  2042. in.WantComma()
  2043. continue
  2044. }
  2045. switch key {
  2046. case "browserContextId":
  2047. out.BrowserContextID = cdp.BrowserContextID(in.String())
  2048. default:
  2049. in.SkipRecursive()
  2050. }
  2051. in.WantComma()
  2052. }
  2053. in.Delim('}')
  2054. if isTopLevel {
  2055. in.Consumed()
  2056. }
  2057. }
  2058. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget24(out *jwriter.Writer, in CreateBrowserContextReturns) {
  2059. out.RawByte('{')
  2060. first := true
  2061. _ = first
  2062. if in.BrowserContextID != "" {
  2063. const prefix string = ",\"browserContextId\":"
  2064. first = false
  2065. out.RawString(prefix[1:])
  2066. out.String(string(in.BrowserContextID))
  2067. }
  2068. out.RawByte('}')
  2069. }
  2070. // MarshalJSON supports json.Marshaler interface
  2071. func (v CreateBrowserContextReturns) MarshalJSON() ([]byte, error) {
  2072. w := jwriter.Writer{}
  2073. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget24(&w, v)
  2074. return w.Buffer.BuildBytes(), w.Error
  2075. }
  2076. // MarshalEasyJSON supports easyjson.Marshaler interface
  2077. func (v CreateBrowserContextReturns) MarshalEasyJSON(w *jwriter.Writer) {
  2078. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget24(w, v)
  2079. }
  2080. // UnmarshalJSON supports json.Unmarshaler interface
  2081. func (v *CreateBrowserContextReturns) UnmarshalJSON(data []byte) error {
  2082. r := jlexer.Lexer{Data: data}
  2083. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget24(&r, v)
  2084. return r.Error()
  2085. }
  2086. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2087. func (v *CreateBrowserContextReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2088. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget24(l, v)
  2089. }
  2090. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget25(in *jlexer.Lexer, out *CreateBrowserContextParams) {
  2091. isTopLevel := in.IsStart()
  2092. if in.IsNull() {
  2093. if isTopLevel {
  2094. in.Consumed()
  2095. }
  2096. in.Skip()
  2097. return
  2098. }
  2099. in.Delim('{')
  2100. for !in.IsDelim('}') {
  2101. key := in.UnsafeFieldName(false)
  2102. in.WantColon()
  2103. if in.IsNull() {
  2104. in.Skip()
  2105. in.WantComma()
  2106. continue
  2107. }
  2108. switch key {
  2109. case "disposeOnDetach":
  2110. out.DisposeOnDetach = bool(in.Bool())
  2111. case "proxyServer":
  2112. out.ProxyServer = string(in.String())
  2113. case "proxyBypassList":
  2114. out.ProxyBypassList = string(in.String())
  2115. case "originsWithUniversalNetworkAccess":
  2116. if in.IsNull() {
  2117. in.Skip()
  2118. out.OriginsWithUniversalNetworkAccess = nil
  2119. } else {
  2120. in.Delim('[')
  2121. if out.OriginsWithUniversalNetworkAccess == nil {
  2122. if !in.IsDelim(']') {
  2123. out.OriginsWithUniversalNetworkAccess = make([]string, 0, 4)
  2124. } else {
  2125. out.OriginsWithUniversalNetworkAccess = []string{}
  2126. }
  2127. } else {
  2128. out.OriginsWithUniversalNetworkAccess = (out.OriginsWithUniversalNetworkAccess)[:0]
  2129. }
  2130. for !in.IsDelim(']') {
  2131. var v19 string
  2132. v19 = string(in.String())
  2133. out.OriginsWithUniversalNetworkAccess = append(out.OriginsWithUniversalNetworkAccess, v19)
  2134. in.WantComma()
  2135. }
  2136. in.Delim(']')
  2137. }
  2138. default:
  2139. in.SkipRecursive()
  2140. }
  2141. in.WantComma()
  2142. }
  2143. in.Delim('}')
  2144. if isTopLevel {
  2145. in.Consumed()
  2146. }
  2147. }
  2148. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget25(out *jwriter.Writer, in CreateBrowserContextParams) {
  2149. out.RawByte('{')
  2150. first := true
  2151. _ = first
  2152. if in.DisposeOnDetach {
  2153. const prefix string = ",\"disposeOnDetach\":"
  2154. first = false
  2155. out.RawString(prefix[1:])
  2156. out.Bool(bool(in.DisposeOnDetach))
  2157. }
  2158. if in.ProxyServer != "" {
  2159. const prefix string = ",\"proxyServer\":"
  2160. if first {
  2161. first = false
  2162. out.RawString(prefix[1:])
  2163. } else {
  2164. out.RawString(prefix)
  2165. }
  2166. out.String(string(in.ProxyServer))
  2167. }
  2168. if in.ProxyBypassList != "" {
  2169. const prefix string = ",\"proxyBypassList\":"
  2170. if first {
  2171. first = false
  2172. out.RawString(prefix[1:])
  2173. } else {
  2174. out.RawString(prefix)
  2175. }
  2176. out.String(string(in.ProxyBypassList))
  2177. }
  2178. if len(in.OriginsWithUniversalNetworkAccess) != 0 {
  2179. const prefix string = ",\"originsWithUniversalNetworkAccess\":"
  2180. if first {
  2181. first = false
  2182. out.RawString(prefix[1:])
  2183. } else {
  2184. out.RawString(prefix)
  2185. }
  2186. {
  2187. out.RawByte('[')
  2188. for v20, v21 := range in.OriginsWithUniversalNetworkAccess {
  2189. if v20 > 0 {
  2190. out.RawByte(',')
  2191. }
  2192. out.String(string(v21))
  2193. }
  2194. out.RawByte(']')
  2195. }
  2196. }
  2197. out.RawByte('}')
  2198. }
  2199. // MarshalJSON supports json.Marshaler interface
  2200. func (v CreateBrowserContextParams) MarshalJSON() ([]byte, error) {
  2201. w := jwriter.Writer{}
  2202. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget25(&w, v)
  2203. return w.Buffer.BuildBytes(), w.Error
  2204. }
  2205. // MarshalEasyJSON supports easyjson.Marshaler interface
  2206. func (v CreateBrowserContextParams) MarshalEasyJSON(w *jwriter.Writer) {
  2207. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget25(w, v)
  2208. }
  2209. // UnmarshalJSON supports json.Unmarshaler interface
  2210. func (v *CreateBrowserContextParams) UnmarshalJSON(data []byte) error {
  2211. r := jlexer.Lexer{Data: data}
  2212. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget25(&r, v)
  2213. return r.Error()
  2214. }
  2215. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2216. func (v *CreateBrowserContextParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2217. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget25(l, v)
  2218. }
  2219. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget26(in *jlexer.Lexer, out *CloseTargetParams) {
  2220. isTopLevel := in.IsStart()
  2221. if in.IsNull() {
  2222. if isTopLevel {
  2223. in.Consumed()
  2224. }
  2225. in.Skip()
  2226. return
  2227. }
  2228. in.Delim('{')
  2229. for !in.IsDelim('}') {
  2230. key := in.UnsafeFieldName(false)
  2231. in.WantColon()
  2232. if in.IsNull() {
  2233. in.Skip()
  2234. in.WantComma()
  2235. continue
  2236. }
  2237. switch key {
  2238. case "targetId":
  2239. out.TargetID = ID(in.String())
  2240. default:
  2241. in.SkipRecursive()
  2242. }
  2243. in.WantComma()
  2244. }
  2245. in.Delim('}')
  2246. if isTopLevel {
  2247. in.Consumed()
  2248. }
  2249. }
  2250. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget26(out *jwriter.Writer, in CloseTargetParams) {
  2251. out.RawByte('{')
  2252. first := true
  2253. _ = first
  2254. {
  2255. const prefix string = ",\"targetId\":"
  2256. out.RawString(prefix[1:])
  2257. out.String(string(in.TargetID))
  2258. }
  2259. out.RawByte('}')
  2260. }
  2261. // MarshalJSON supports json.Marshaler interface
  2262. func (v CloseTargetParams) MarshalJSON() ([]byte, error) {
  2263. w := jwriter.Writer{}
  2264. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget26(&w, v)
  2265. return w.Buffer.BuildBytes(), w.Error
  2266. }
  2267. // MarshalEasyJSON supports easyjson.Marshaler interface
  2268. func (v CloseTargetParams) MarshalEasyJSON(w *jwriter.Writer) {
  2269. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget26(w, v)
  2270. }
  2271. // UnmarshalJSON supports json.Unmarshaler interface
  2272. func (v *CloseTargetParams) UnmarshalJSON(data []byte) error {
  2273. r := jlexer.Lexer{Data: data}
  2274. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget26(&r, v)
  2275. return r.Error()
  2276. }
  2277. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2278. func (v *CloseTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2279. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget26(l, v)
  2280. }
  2281. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget27(in *jlexer.Lexer, out *AutoAttachRelatedParams) {
  2282. isTopLevel := in.IsStart()
  2283. if in.IsNull() {
  2284. if isTopLevel {
  2285. in.Consumed()
  2286. }
  2287. in.Skip()
  2288. return
  2289. }
  2290. in.Delim('{')
  2291. for !in.IsDelim('}') {
  2292. key := in.UnsafeFieldName(false)
  2293. in.WantColon()
  2294. if in.IsNull() {
  2295. in.Skip()
  2296. in.WantComma()
  2297. continue
  2298. }
  2299. switch key {
  2300. case "targetId":
  2301. out.TargetID = ID(in.String())
  2302. case "waitForDebuggerOnStart":
  2303. out.WaitForDebuggerOnStart = bool(in.Bool())
  2304. case "filter":
  2305. if in.IsNull() {
  2306. in.Skip()
  2307. out.Filter = nil
  2308. } else {
  2309. in.Delim('[')
  2310. if out.Filter == nil {
  2311. if !in.IsDelim(']') {
  2312. out.Filter = make(Filter, 0, 2)
  2313. } else {
  2314. out.Filter = Filter{}
  2315. }
  2316. } else {
  2317. out.Filter = (out.Filter)[:0]
  2318. }
  2319. for !in.IsDelim(']') {
  2320. var v22 struct {
  2321. Exclude bool `json:"exclude,omitempty"`
  2322. Type string `json:"type,omitempty"`
  2323. }
  2324. easyjsonC5a4559bDecode(in, &v22)
  2325. out.Filter = append(out.Filter, v22)
  2326. in.WantComma()
  2327. }
  2328. in.Delim(']')
  2329. }
  2330. default:
  2331. in.SkipRecursive()
  2332. }
  2333. in.WantComma()
  2334. }
  2335. in.Delim('}')
  2336. if isTopLevel {
  2337. in.Consumed()
  2338. }
  2339. }
  2340. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget27(out *jwriter.Writer, in AutoAttachRelatedParams) {
  2341. out.RawByte('{')
  2342. first := true
  2343. _ = first
  2344. {
  2345. const prefix string = ",\"targetId\":"
  2346. out.RawString(prefix[1:])
  2347. out.String(string(in.TargetID))
  2348. }
  2349. {
  2350. const prefix string = ",\"waitForDebuggerOnStart\":"
  2351. out.RawString(prefix)
  2352. out.Bool(bool(in.WaitForDebuggerOnStart))
  2353. }
  2354. if len(in.Filter) != 0 {
  2355. const prefix string = ",\"filter\":"
  2356. out.RawString(prefix)
  2357. {
  2358. out.RawByte('[')
  2359. for v23, v24 := range in.Filter {
  2360. if v23 > 0 {
  2361. out.RawByte(',')
  2362. }
  2363. easyjsonC5a4559bEncode(out, v24)
  2364. }
  2365. out.RawByte(']')
  2366. }
  2367. }
  2368. out.RawByte('}')
  2369. }
  2370. // MarshalJSON supports json.Marshaler interface
  2371. func (v AutoAttachRelatedParams) MarshalJSON() ([]byte, error) {
  2372. w := jwriter.Writer{}
  2373. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget27(&w, v)
  2374. return w.Buffer.BuildBytes(), w.Error
  2375. }
  2376. // MarshalEasyJSON supports easyjson.Marshaler interface
  2377. func (v AutoAttachRelatedParams) MarshalEasyJSON(w *jwriter.Writer) {
  2378. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget27(w, v)
  2379. }
  2380. // UnmarshalJSON supports json.Unmarshaler interface
  2381. func (v *AutoAttachRelatedParams) UnmarshalJSON(data []byte) error {
  2382. r := jlexer.Lexer{Data: data}
  2383. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget27(&r, v)
  2384. return r.Error()
  2385. }
  2386. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2387. func (v *AutoAttachRelatedParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2388. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget27(l, v)
  2389. }
  2390. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget28(in *jlexer.Lexer, out *AttachToTargetReturns) {
  2391. isTopLevel := in.IsStart()
  2392. if in.IsNull() {
  2393. if isTopLevel {
  2394. in.Consumed()
  2395. }
  2396. in.Skip()
  2397. return
  2398. }
  2399. in.Delim('{')
  2400. for !in.IsDelim('}') {
  2401. key := in.UnsafeFieldName(false)
  2402. in.WantColon()
  2403. if in.IsNull() {
  2404. in.Skip()
  2405. in.WantComma()
  2406. continue
  2407. }
  2408. switch key {
  2409. case "sessionId":
  2410. out.SessionID = SessionID(in.String())
  2411. default:
  2412. in.SkipRecursive()
  2413. }
  2414. in.WantComma()
  2415. }
  2416. in.Delim('}')
  2417. if isTopLevel {
  2418. in.Consumed()
  2419. }
  2420. }
  2421. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget28(out *jwriter.Writer, in AttachToTargetReturns) {
  2422. out.RawByte('{')
  2423. first := true
  2424. _ = first
  2425. if in.SessionID != "" {
  2426. const prefix string = ",\"sessionId\":"
  2427. first = false
  2428. out.RawString(prefix[1:])
  2429. out.String(string(in.SessionID))
  2430. }
  2431. out.RawByte('}')
  2432. }
  2433. // MarshalJSON supports json.Marshaler interface
  2434. func (v AttachToTargetReturns) MarshalJSON() ([]byte, error) {
  2435. w := jwriter.Writer{}
  2436. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget28(&w, v)
  2437. return w.Buffer.BuildBytes(), w.Error
  2438. }
  2439. // MarshalEasyJSON supports easyjson.Marshaler interface
  2440. func (v AttachToTargetReturns) MarshalEasyJSON(w *jwriter.Writer) {
  2441. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget28(w, v)
  2442. }
  2443. // UnmarshalJSON supports json.Unmarshaler interface
  2444. func (v *AttachToTargetReturns) UnmarshalJSON(data []byte) error {
  2445. r := jlexer.Lexer{Data: data}
  2446. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget28(&r, v)
  2447. return r.Error()
  2448. }
  2449. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2450. func (v *AttachToTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2451. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget28(l, v)
  2452. }
  2453. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget29(in *jlexer.Lexer, out *AttachToTargetParams) {
  2454. isTopLevel := in.IsStart()
  2455. if in.IsNull() {
  2456. if isTopLevel {
  2457. in.Consumed()
  2458. }
  2459. in.Skip()
  2460. return
  2461. }
  2462. in.Delim('{')
  2463. for !in.IsDelim('}') {
  2464. key := in.UnsafeFieldName(false)
  2465. in.WantColon()
  2466. if in.IsNull() {
  2467. in.Skip()
  2468. in.WantComma()
  2469. continue
  2470. }
  2471. switch key {
  2472. case "targetId":
  2473. out.TargetID = ID(in.String())
  2474. case "flatten":
  2475. out.Flatten = bool(in.Bool())
  2476. default:
  2477. in.SkipRecursive()
  2478. }
  2479. in.WantComma()
  2480. }
  2481. in.Delim('}')
  2482. if isTopLevel {
  2483. in.Consumed()
  2484. }
  2485. }
  2486. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget29(out *jwriter.Writer, in AttachToTargetParams) {
  2487. out.RawByte('{')
  2488. first := true
  2489. _ = first
  2490. {
  2491. const prefix string = ",\"targetId\":"
  2492. out.RawString(prefix[1:])
  2493. out.String(string(in.TargetID))
  2494. }
  2495. if in.Flatten {
  2496. const prefix string = ",\"flatten\":"
  2497. out.RawString(prefix)
  2498. out.Bool(bool(in.Flatten))
  2499. }
  2500. out.RawByte('}')
  2501. }
  2502. // MarshalJSON supports json.Marshaler interface
  2503. func (v AttachToTargetParams) MarshalJSON() ([]byte, error) {
  2504. w := jwriter.Writer{}
  2505. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget29(&w, v)
  2506. return w.Buffer.BuildBytes(), w.Error
  2507. }
  2508. // MarshalEasyJSON supports easyjson.Marshaler interface
  2509. func (v AttachToTargetParams) MarshalEasyJSON(w *jwriter.Writer) {
  2510. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget29(w, v)
  2511. }
  2512. // UnmarshalJSON supports json.Unmarshaler interface
  2513. func (v *AttachToTargetParams) UnmarshalJSON(data []byte) error {
  2514. r := jlexer.Lexer{Data: data}
  2515. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget29(&r, v)
  2516. return r.Error()
  2517. }
  2518. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2519. func (v *AttachToTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2520. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget29(l, v)
  2521. }
  2522. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget30(in *jlexer.Lexer, out *AttachToBrowserTargetReturns) {
  2523. isTopLevel := in.IsStart()
  2524. if in.IsNull() {
  2525. if isTopLevel {
  2526. in.Consumed()
  2527. }
  2528. in.Skip()
  2529. return
  2530. }
  2531. in.Delim('{')
  2532. for !in.IsDelim('}') {
  2533. key := in.UnsafeFieldName(false)
  2534. in.WantColon()
  2535. if in.IsNull() {
  2536. in.Skip()
  2537. in.WantComma()
  2538. continue
  2539. }
  2540. switch key {
  2541. case "sessionId":
  2542. out.SessionID = SessionID(in.String())
  2543. default:
  2544. in.SkipRecursive()
  2545. }
  2546. in.WantComma()
  2547. }
  2548. in.Delim('}')
  2549. if isTopLevel {
  2550. in.Consumed()
  2551. }
  2552. }
  2553. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget30(out *jwriter.Writer, in AttachToBrowserTargetReturns) {
  2554. out.RawByte('{')
  2555. first := true
  2556. _ = first
  2557. if in.SessionID != "" {
  2558. const prefix string = ",\"sessionId\":"
  2559. first = false
  2560. out.RawString(prefix[1:])
  2561. out.String(string(in.SessionID))
  2562. }
  2563. out.RawByte('}')
  2564. }
  2565. // MarshalJSON supports json.Marshaler interface
  2566. func (v AttachToBrowserTargetReturns) MarshalJSON() ([]byte, error) {
  2567. w := jwriter.Writer{}
  2568. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget30(&w, v)
  2569. return w.Buffer.BuildBytes(), w.Error
  2570. }
  2571. // MarshalEasyJSON supports easyjson.Marshaler interface
  2572. func (v AttachToBrowserTargetReturns) MarshalEasyJSON(w *jwriter.Writer) {
  2573. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget30(w, v)
  2574. }
  2575. // UnmarshalJSON supports json.Unmarshaler interface
  2576. func (v *AttachToBrowserTargetReturns) UnmarshalJSON(data []byte) error {
  2577. r := jlexer.Lexer{Data: data}
  2578. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget30(&r, v)
  2579. return r.Error()
  2580. }
  2581. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2582. func (v *AttachToBrowserTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2583. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget30(l, v)
  2584. }
  2585. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget31(in *jlexer.Lexer, out *AttachToBrowserTargetParams) {
  2586. isTopLevel := in.IsStart()
  2587. if in.IsNull() {
  2588. if isTopLevel {
  2589. in.Consumed()
  2590. }
  2591. in.Skip()
  2592. return
  2593. }
  2594. in.Delim('{')
  2595. for !in.IsDelim('}') {
  2596. key := in.UnsafeFieldName(false)
  2597. in.WantColon()
  2598. if in.IsNull() {
  2599. in.Skip()
  2600. in.WantComma()
  2601. continue
  2602. }
  2603. switch key {
  2604. default:
  2605. in.SkipRecursive()
  2606. }
  2607. in.WantComma()
  2608. }
  2609. in.Delim('}')
  2610. if isTopLevel {
  2611. in.Consumed()
  2612. }
  2613. }
  2614. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget31(out *jwriter.Writer, in AttachToBrowserTargetParams) {
  2615. out.RawByte('{')
  2616. first := true
  2617. _ = first
  2618. out.RawByte('}')
  2619. }
  2620. // MarshalJSON supports json.Marshaler interface
  2621. func (v AttachToBrowserTargetParams) MarshalJSON() ([]byte, error) {
  2622. w := jwriter.Writer{}
  2623. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget31(&w, v)
  2624. return w.Buffer.BuildBytes(), w.Error
  2625. }
  2626. // MarshalEasyJSON supports easyjson.Marshaler interface
  2627. func (v AttachToBrowserTargetParams) MarshalEasyJSON(w *jwriter.Writer) {
  2628. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget31(w, v)
  2629. }
  2630. // UnmarshalJSON supports json.Unmarshaler interface
  2631. func (v *AttachToBrowserTargetParams) UnmarshalJSON(data []byte) error {
  2632. r := jlexer.Lexer{Data: data}
  2633. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget31(&r, v)
  2634. return r.Error()
  2635. }
  2636. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2637. func (v *AttachToBrowserTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2638. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget31(l, v)
  2639. }
  2640. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget32(in *jlexer.Lexer, out *ActivateTargetParams) {
  2641. isTopLevel := in.IsStart()
  2642. if in.IsNull() {
  2643. if isTopLevel {
  2644. in.Consumed()
  2645. }
  2646. in.Skip()
  2647. return
  2648. }
  2649. in.Delim('{')
  2650. for !in.IsDelim('}') {
  2651. key := in.UnsafeFieldName(false)
  2652. in.WantColon()
  2653. if in.IsNull() {
  2654. in.Skip()
  2655. in.WantComma()
  2656. continue
  2657. }
  2658. switch key {
  2659. case "targetId":
  2660. out.TargetID = ID(in.String())
  2661. default:
  2662. in.SkipRecursive()
  2663. }
  2664. in.WantComma()
  2665. }
  2666. in.Delim('}')
  2667. if isTopLevel {
  2668. in.Consumed()
  2669. }
  2670. }
  2671. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget32(out *jwriter.Writer, in ActivateTargetParams) {
  2672. out.RawByte('{')
  2673. first := true
  2674. _ = first
  2675. {
  2676. const prefix string = ",\"targetId\":"
  2677. out.RawString(prefix[1:])
  2678. out.String(string(in.TargetID))
  2679. }
  2680. out.RawByte('}')
  2681. }
  2682. // MarshalJSON supports json.Marshaler interface
  2683. func (v ActivateTargetParams) MarshalJSON() ([]byte, error) {
  2684. w := jwriter.Writer{}
  2685. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget32(&w, v)
  2686. return w.Buffer.BuildBytes(), w.Error
  2687. }
  2688. // MarshalEasyJSON supports easyjson.Marshaler interface
  2689. func (v ActivateTargetParams) MarshalEasyJSON(w *jwriter.Writer) {
  2690. easyjsonC5a4559bEncodeGithubComChromedpCdprotoTarget32(w, v)
  2691. }
  2692. // UnmarshalJSON supports json.Unmarshaler interface
  2693. func (v *ActivateTargetParams) UnmarshalJSON(data []byte) error {
  2694. r := jlexer.Lexer{Data: data}
  2695. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget32(&r, v)
  2696. return r.Error()
  2697. }
  2698. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2699. func (v *ActivateTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2700. easyjsonC5a4559bDecodeGithubComChromedpCdprotoTarget32(l, v)
  2701. }