easyjson.go 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package browser
  3. import (
  4. json "encoding/json"
  5. cdp "github.com/chromedp/cdproto/cdp"
  6. target "github.com/chromedp/cdproto/target"
  7. easyjson "github.com/mailru/easyjson"
  8. jlexer "github.com/mailru/easyjson/jlexer"
  9. jwriter "github.com/mailru/easyjson/jwriter"
  10. )
  11. // suppress unused package warning
  12. var (
  13. _ *json.RawMessage
  14. _ *jlexer.Lexer
  15. _ *jwriter.Writer
  16. _ easyjson.Marshaler
  17. )
  18. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser(in *jlexer.Lexer, out *SetWindowBoundsParams) {
  19. isTopLevel := in.IsStart()
  20. if in.IsNull() {
  21. if isTopLevel {
  22. in.Consumed()
  23. }
  24. in.Skip()
  25. return
  26. }
  27. in.Delim('{')
  28. for !in.IsDelim('}') {
  29. key := in.UnsafeFieldName(false)
  30. in.WantColon()
  31. if in.IsNull() {
  32. in.Skip()
  33. in.WantComma()
  34. continue
  35. }
  36. switch key {
  37. case "windowId":
  38. out.WindowID = WindowID(in.Int64())
  39. case "bounds":
  40. if in.IsNull() {
  41. in.Skip()
  42. out.Bounds = nil
  43. } else {
  44. if out.Bounds == nil {
  45. out.Bounds = new(Bounds)
  46. }
  47. (*out.Bounds).UnmarshalEasyJSON(in)
  48. }
  49. default:
  50. in.SkipRecursive()
  51. }
  52. in.WantComma()
  53. }
  54. in.Delim('}')
  55. if isTopLevel {
  56. in.Consumed()
  57. }
  58. }
  59. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser(out *jwriter.Writer, in SetWindowBoundsParams) {
  60. out.RawByte('{')
  61. first := true
  62. _ = first
  63. {
  64. const prefix string = ",\"windowId\":"
  65. out.RawString(prefix[1:])
  66. out.Int64(int64(in.WindowID))
  67. }
  68. {
  69. const prefix string = ",\"bounds\":"
  70. out.RawString(prefix)
  71. if in.Bounds == nil {
  72. out.RawString("null")
  73. } else {
  74. (*in.Bounds).MarshalEasyJSON(out)
  75. }
  76. }
  77. out.RawByte('}')
  78. }
  79. // MarshalJSON supports json.Marshaler interface
  80. func (v SetWindowBoundsParams) MarshalJSON() ([]byte, error) {
  81. w := jwriter.Writer{}
  82. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser(&w, v)
  83. return w.Buffer.BuildBytes(), w.Error
  84. }
  85. // MarshalEasyJSON supports easyjson.Marshaler interface
  86. func (v SetWindowBoundsParams) MarshalEasyJSON(w *jwriter.Writer) {
  87. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser(w, v)
  88. }
  89. // UnmarshalJSON supports json.Unmarshaler interface
  90. func (v *SetWindowBoundsParams) UnmarshalJSON(data []byte) error {
  91. r := jlexer.Lexer{Data: data}
  92. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser(&r, v)
  93. return r.Error()
  94. }
  95. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  96. func (v *SetWindowBoundsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  97. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser(l, v)
  98. }
  99. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser1(in *jlexer.Lexer, out *SetPermissionParams) {
  100. isTopLevel := in.IsStart()
  101. if in.IsNull() {
  102. if isTopLevel {
  103. in.Consumed()
  104. }
  105. in.Skip()
  106. return
  107. }
  108. in.Delim('{')
  109. for !in.IsDelim('}') {
  110. key := in.UnsafeFieldName(false)
  111. in.WantColon()
  112. if in.IsNull() {
  113. in.Skip()
  114. in.WantComma()
  115. continue
  116. }
  117. switch key {
  118. case "permission":
  119. if in.IsNull() {
  120. in.Skip()
  121. out.Permission = nil
  122. } else {
  123. if out.Permission == nil {
  124. out.Permission = new(PermissionDescriptor)
  125. }
  126. (*out.Permission).UnmarshalEasyJSON(in)
  127. }
  128. case "setting":
  129. (out.Setting).UnmarshalEasyJSON(in)
  130. case "origin":
  131. out.Origin = string(in.String())
  132. case "browserContextId":
  133. out.BrowserContextID = cdp.BrowserContextID(in.String())
  134. default:
  135. in.SkipRecursive()
  136. }
  137. in.WantComma()
  138. }
  139. in.Delim('}')
  140. if isTopLevel {
  141. in.Consumed()
  142. }
  143. }
  144. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser1(out *jwriter.Writer, in SetPermissionParams) {
  145. out.RawByte('{')
  146. first := true
  147. _ = first
  148. {
  149. const prefix string = ",\"permission\":"
  150. out.RawString(prefix[1:])
  151. if in.Permission == nil {
  152. out.RawString("null")
  153. } else {
  154. (*in.Permission).MarshalEasyJSON(out)
  155. }
  156. }
  157. {
  158. const prefix string = ",\"setting\":"
  159. out.RawString(prefix)
  160. (in.Setting).MarshalEasyJSON(out)
  161. }
  162. if in.Origin != "" {
  163. const prefix string = ",\"origin\":"
  164. out.RawString(prefix)
  165. out.String(string(in.Origin))
  166. }
  167. if in.BrowserContextID != "" {
  168. const prefix string = ",\"browserContextId\":"
  169. out.RawString(prefix)
  170. out.String(string(in.BrowserContextID))
  171. }
  172. out.RawByte('}')
  173. }
  174. // MarshalJSON supports json.Marshaler interface
  175. func (v SetPermissionParams) MarshalJSON() ([]byte, error) {
  176. w := jwriter.Writer{}
  177. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser1(&w, v)
  178. return w.Buffer.BuildBytes(), w.Error
  179. }
  180. // MarshalEasyJSON supports easyjson.Marshaler interface
  181. func (v SetPermissionParams) MarshalEasyJSON(w *jwriter.Writer) {
  182. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser1(w, v)
  183. }
  184. // UnmarshalJSON supports json.Unmarshaler interface
  185. func (v *SetPermissionParams) UnmarshalJSON(data []byte) error {
  186. r := jlexer.Lexer{Data: data}
  187. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser1(&r, v)
  188. return r.Error()
  189. }
  190. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  191. func (v *SetPermissionParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  192. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser1(l, v)
  193. }
  194. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser2(in *jlexer.Lexer, out *SetDownloadBehaviorParams) {
  195. isTopLevel := in.IsStart()
  196. if in.IsNull() {
  197. if isTopLevel {
  198. in.Consumed()
  199. }
  200. in.Skip()
  201. return
  202. }
  203. in.Delim('{')
  204. for !in.IsDelim('}') {
  205. key := in.UnsafeFieldName(false)
  206. in.WantColon()
  207. if in.IsNull() {
  208. in.Skip()
  209. in.WantComma()
  210. continue
  211. }
  212. switch key {
  213. case "behavior":
  214. (out.Behavior).UnmarshalEasyJSON(in)
  215. case "browserContextId":
  216. out.BrowserContextID = cdp.BrowserContextID(in.String())
  217. case "downloadPath":
  218. out.DownloadPath = string(in.String())
  219. case "eventsEnabled":
  220. out.EventsEnabled = bool(in.Bool())
  221. default:
  222. in.SkipRecursive()
  223. }
  224. in.WantComma()
  225. }
  226. in.Delim('}')
  227. if isTopLevel {
  228. in.Consumed()
  229. }
  230. }
  231. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser2(out *jwriter.Writer, in SetDownloadBehaviorParams) {
  232. out.RawByte('{')
  233. first := true
  234. _ = first
  235. {
  236. const prefix string = ",\"behavior\":"
  237. out.RawString(prefix[1:])
  238. (in.Behavior).MarshalEasyJSON(out)
  239. }
  240. if in.BrowserContextID != "" {
  241. const prefix string = ",\"browserContextId\":"
  242. out.RawString(prefix)
  243. out.String(string(in.BrowserContextID))
  244. }
  245. if in.DownloadPath != "" {
  246. const prefix string = ",\"downloadPath\":"
  247. out.RawString(prefix)
  248. out.String(string(in.DownloadPath))
  249. }
  250. if in.EventsEnabled {
  251. const prefix string = ",\"eventsEnabled\":"
  252. out.RawString(prefix)
  253. out.Bool(bool(in.EventsEnabled))
  254. }
  255. out.RawByte('}')
  256. }
  257. // MarshalJSON supports json.Marshaler interface
  258. func (v SetDownloadBehaviorParams) MarshalJSON() ([]byte, error) {
  259. w := jwriter.Writer{}
  260. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser2(&w, v)
  261. return w.Buffer.BuildBytes(), w.Error
  262. }
  263. // MarshalEasyJSON supports easyjson.Marshaler interface
  264. func (v SetDownloadBehaviorParams) MarshalEasyJSON(w *jwriter.Writer) {
  265. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser2(w, v)
  266. }
  267. // UnmarshalJSON supports json.Unmarshaler interface
  268. func (v *SetDownloadBehaviorParams) UnmarshalJSON(data []byte) error {
  269. r := jlexer.Lexer{Data: data}
  270. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser2(&r, v)
  271. return r.Error()
  272. }
  273. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  274. func (v *SetDownloadBehaviorParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  275. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser2(l, v)
  276. }
  277. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser3(in *jlexer.Lexer, out *SetDockTileParams) {
  278. isTopLevel := in.IsStart()
  279. if in.IsNull() {
  280. if isTopLevel {
  281. in.Consumed()
  282. }
  283. in.Skip()
  284. return
  285. }
  286. in.Delim('{')
  287. for !in.IsDelim('}') {
  288. key := in.UnsafeFieldName(false)
  289. in.WantColon()
  290. if in.IsNull() {
  291. in.Skip()
  292. in.WantComma()
  293. continue
  294. }
  295. switch key {
  296. case "badgeLabel":
  297. out.BadgeLabel = string(in.String())
  298. case "image":
  299. out.Image = string(in.String())
  300. default:
  301. in.SkipRecursive()
  302. }
  303. in.WantComma()
  304. }
  305. in.Delim('}')
  306. if isTopLevel {
  307. in.Consumed()
  308. }
  309. }
  310. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser3(out *jwriter.Writer, in SetDockTileParams) {
  311. out.RawByte('{')
  312. first := true
  313. _ = first
  314. if in.BadgeLabel != "" {
  315. const prefix string = ",\"badgeLabel\":"
  316. first = false
  317. out.RawString(prefix[1:])
  318. out.String(string(in.BadgeLabel))
  319. }
  320. if in.Image != "" {
  321. const prefix string = ",\"image\":"
  322. if first {
  323. first = false
  324. out.RawString(prefix[1:])
  325. } else {
  326. out.RawString(prefix)
  327. }
  328. out.String(string(in.Image))
  329. }
  330. out.RawByte('}')
  331. }
  332. // MarshalJSON supports json.Marshaler interface
  333. func (v SetDockTileParams) MarshalJSON() ([]byte, error) {
  334. w := jwriter.Writer{}
  335. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser3(&w, v)
  336. return w.Buffer.BuildBytes(), w.Error
  337. }
  338. // MarshalEasyJSON supports easyjson.Marshaler interface
  339. func (v SetDockTileParams) MarshalEasyJSON(w *jwriter.Writer) {
  340. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser3(w, v)
  341. }
  342. // UnmarshalJSON supports json.Unmarshaler interface
  343. func (v *SetDockTileParams) UnmarshalJSON(data []byte) error {
  344. r := jlexer.Lexer{Data: data}
  345. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser3(&r, v)
  346. return r.Error()
  347. }
  348. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  349. func (v *SetDockTileParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  350. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser3(l, v)
  351. }
  352. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser4(in *jlexer.Lexer, out *ResetPermissionsParams) {
  353. isTopLevel := in.IsStart()
  354. if in.IsNull() {
  355. if isTopLevel {
  356. in.Consumed()
  357. }
  358. in.Skip()
  359. return
  360. }
  361. in.Delim('{')
  362. for !in.IsDelim('}') {
  363. key := in.UnsafeFieldName(false)
  364. in.WantColon()
  365. if in.IsNull() {
  366. in.Skip()
  367. in.WantComma()
  368. continue
  369. }
  370. switch key {
  371. case "browserContextId":
  372. out.BrowserContextID = cdp.BrowserContextID(in.String())
  373. default:
  374. in.SkipRecursive()
  375. }
  376. in.WantComma()
  377. }
  378. in.Delim('}')
  379. if isTopLevel {
  380. in.Consumed()
  381. }
  382. }
  383. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser4(out *jwriter.Writer, in ResetPermissionsParams) {
  384. out.RawByte('{')
  385. first := true
  386. _ = first
  387. if in.BrowserContextID != "" {
  388. const prefix string = ",\"browserContextId\":"
  389. first = false
  390. out.RawString(prefix[1:])
  391. out.String(string(in.BrowserContextID))
  392. }
  393. out.RawByte('}')
  394. }
  395. // MarshalJSON supports json.Marshaler interface
  396. func (v ResetPermissionsParams) MarshalJSON() ([]byte, error) {
  397. w := jwriter.Writer{}
  398. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser4(&w, v)
  399. return w.Buffer.BuildBytes(), w.Error
  400. }
  401. // MarshalEasyJSON supports easyjson.Marshaler interface
  402. func (v ResetPermissionsParams) MarshalEasyJSON(w *jwriter.Writer) {
  403. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser4(w, v)
  404. }
  405. // UnmarshalJSON supports json.Unmarshaler interface
  406. func (v *ResetPermissionsParams) UnmarshalJSON(data []byte) error {
  407. r := jlexer.Lexer{Data: data}
  408. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser4(&r, v)
  409. return r.Error()
  410. }
  411. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  412. func (v *ResetPermissionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  413. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser4(l, v)
  414. }
  415. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser5(in *jlexer.Lexer, out *PermissionDescriptor) {
  416. isTopLevel := in.IsStart()
  417. if in.IsNull() {
  418. if isTopLevel {
  419. in.Consumed()
  420. }
  421. in.Skip()
  422. return
  423. }
  424. in.Delim('{')
  425. for !in.IsDelim('}') {
  426. key := in.UnsafeFieldName(false)
  427. in.WantColon()
  428. if in.IsNull() {
  429. in.Skip()
  430. in.WantComma()
  431. continue
  432. }
  433. switch key {
  434. case "name":
  435. out.Name = string(in.String())
  436. case "sysex":
  437. out.Sysex = bool(in.Bool())
  438. case "userVisibleOnly":
  439. out.UserVisibleOnly = bool(in.Bool())
  440. case "allowWithoutSanitization":
  441. out.AllowWithoutSanitization = bool(in.Bool())
  442. case "panTiltZoom":
  443. out.PanTiltZoom = bool(in.Bool())
  444. default:
  445. in.SkipRecursive()
  446. }
  447. in.WantComma()
  448. }
  449. in.Delim('}')
  450. if isTopLevel {
  451. in.Consumed()
  452. }
  453. }
  454. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser5(out *jwriter.Writer, in PermissionDescriptor) {
  455. out.RawByte('{')
  456. first := true
  457. _ = first
  458. {
  459. const prefix string = ",\"name\":"
  460. out.RawString(prefix[1:])
  461. out.String(string(in.Name))
  462. }
  463. if in.Sysex {
  464. const prefix string = ",\"sysex\":"
  465. out.RawString(prefix)
  466. out.Bool(bool(in.Sysex))
  467. }
  468. if in.UserVisibleOnly {
  469. const prefix string = ",\"userVisibleOnly\":"
  470. out.RawString(prefix)
  471. out.Bool(bool(in.UserVisibleOnly))
  472. }
  473. if in.AllowWithoutSanitization {
  474. const prefix string = ",\"allowWithoutSanitization\":"
  475. out.RawString(prefix)
  476. out.Bool(bool(in.AllowWithoutSanitization))
  477. }
  478. if in.PanTiltZoom {
  479. const prefix string = ",\"panTiltZoom\":"
  480. out.RawString(prefix)
  481. out.Bool(bool(in.PanTiltZoom))
  482. }
  483. out.RawByte('}')
  484. }
  485. // MarshalJSON supports json.Marshaler interface
  486. func (v PermissionDescriptor) MarshalJSON() ([]byte, error) {
  487. w := jwriter.Writer{}
  488. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser5(&w, v)
  489. return w.Buffer.BuildBytes(), w.Error
  490. }
  491. // MarshalEasyJSON supports easyjson.Marshaler interface
  492. func (v PermissionDescriptor) MarshalEasyJSON(w *jwriter.Writer) {
  493. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser5(w, v)
  494. }
  495. // UnmarshalJSON supports json.Unmarshaler interface
  496. func (v *PermissionDescriptor) UnmarshalJSON(data []byte) error {
  497. r := jlexer.Lexer{Data: data}
  498. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser5(&r, v)
  499. return r.Error()
  500. }
  501. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  502. func (v *PermissionDescriptor) UnmarshalEasyJSON(l *jlexer.Lexer) {
  503. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser5(l, v)
  504. }
  505. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser6(in *jlexer.Lexer, out *Histogram) {
  506. isTopLevel := in.IsStart()
  507. if in.IsNull() {
  508. if isTopLevel {
  509. in.Consumed()
  510. }
  511. in.Skip()
  512. return
  513. }
  514. in.Delim('{')
  515. for !in.IsDelim('}') {
  516. key := in.UnsafeFieldName(false)
  517. in.WantColon()
  518. if in.IsNull() {
  519. in.Skip()
  520. in.WantComma()
  521. continue
  522. }
  523. switch key {
  524. case "name":
  525. out.Name = string(in.String())
  526. case "sum":
  527. out.Sum = int64(in.Int64())
  528. case "count":
  529. out.Count = int64(in.Int64())
  530. case "buckets":
  531. if in.IsNull() {
  532. in.Skip()
  533. out.Buckets = nil
  534. } else {
  535. in.Delim('[')
  536. if out.Buckets == nil {
  537. if !in.IsDelim(']') {
  538. out.Buckets = make([]*Bucket, 0, 8)
  539. } else {
  540. out.Buckets = []*Bucket{}
  541. }
  542. } else {
  543. out.Buckets = (out.Buckets)[:0]
  544. }
  545. for !in.IsDelim(']') {
  546. var v1 *Bucket
  547. if in.IsNull() {
  548. in.Skip()
  549. v1 = nil
  550. } else {
  551. if v1 == nil {
  552. v1 = new(Bucket)
  553. }
  554. (*v1).UnmarshalEasyJSON(in)
  555. }
  556. out.Buckets = append(out.Buckets, v1)
  557. in.WantComma()
  558. }
  559. in.Delim(']')
  560. }
  561. default:
  562. in.SkipRecursive()
  563. }
  564. in.WantComma()
  565. }
  566. in.Delim('}')
  567. if isTopLevel {
  568. in.Consumed()
  569. }
  570. }
  571. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser6(out *jwriter.Writer, in Histogram) {
  572. out.RawByte('{')
  573. first := true
  574. _ = first
  575. {
  576. const prefix string = ",\"name\":"
  577. out.RawString(prefix[1:])
  578. out.String(string(in.Name))
  579. }
  580. {
  581. const prefix string = ",\"sum\":"
  582. out.RawString(prefix)
  583. out.Int64(int64(in.Sum))
  584. }
  585. {
  586. const prefix string = ",\"count\":"
  587. out.RawString(prefix)
  588. out.Int64(int64(in.Count))
  589. }
  590. {
  591. const prefix string = ",\"buckets\":"
  592. out.RawString(prefix)
  593. if in.Buckets == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  594. out.RawString("null")
  595. } else {
  596. out.RawByte('[')
  597. for v2, v3 := range in.Buckets {
  598. if v2 > 0 {
  599. out.RawByte(',')
  600. }
  601. if v3 == nil {
  602. out.RawString("null")
  603. } else {
  604. (*v3).MarshalEasyJSON(out)
  605. }
  606. }
  607. out.RawByte(']')
  608. }
  609. }
  610. out.RawByte('}')
  611. }
  612. // MarshalJSON supports json.Marshaler interface
  613. func (v Histogram) MarshalJSON() ([]byte, error) {
  614. w := jwriter.Writer{}
  615. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser6(&w, v)
  616. return w.Buffer.BuildBytes(), w.Error
  617. }
  618. // MarshalEasyJSON supports easyjson.Marshaler interface
  619. func (v Histogram) MarshalEasyJSON(w *jwriter.Writer) {
  620. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser6(w, v)
  621. }
  622. // UnmarshalJSON supports json.Unmarshaler interface
  623. func (v *Histogram) UnmarshalJSON(data []byte) error {
  624. r := jlexer.Lexer{Data: data}
  625. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser6(&r, v)
  626. return r.Error()
  627. }
  628. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  629. func (v *Histogram) UnmarshalEasyJSON(l *jlexer.Lexer) {
  630. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser6(l, v)
  631. }
  632. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser7(in *jlexer.Lexer, out *GrantPermissionsParams) {
  633. isTopLevel := in.IsStart()
  634. if in.IsNull() {
  635. if isTopLevel {
  636. in.Consumed()
  637. }
  638. in.Skip()
  639. return
  640. }
  641. in.Delim('{')
  642. for !in.IsDelim('}') {
  643. key := in.UnsafeFieldName(false)
  644. in.WantColon()
  645. if in.IsNull() {
  646. in.Skip()
  647. in.WantComma()
  648. continue
  649. }
  650. switch key {
  651. case "permissions":
  652. if in.IsNull() {
  653. in.Skip()
  654. out.Permissions = nil
  655. } else {
  656. in.Delim('[')
  657. if out.Permissions == nil {
  658. if !in.IsDelim(']') {
  659. out.Permissions = make([]PermissionType, 0, 4)
  660. } else {
  661. out.Permissions = []PermissionType{}
  662. }
  663. } else {
  664. out.Permissions = (out.Permissions)[:0]
  665. }
  666. for !in.IsDelim(']') {
  667. var v4 PermissionType
  668. (v4).UnmarshalEasyJSON(in)
  669. out.Permissions = append(out.Permissions, v4)
  670. in.WantComma()
  671. }
  672. in.Delim(']')
  673. }
  674. case "origin":
  675. out.Origin = string(in.String())
  676. case "browserContextId":
  677. out.BrowserContextID = cdp.BrowserContextID(in.String())
  678. default:
  679. in.SkipRecursive()
  680. }
  681. in.WantComma()
  682. }
  683. in.Delim('}')
  684. if isTopLevel {
  685. in.Consumed()
  686. }
  687. }
  688. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser7(out *jwriter.Writer, in GrantPermissionsParams) {
  689. out.RawByte('{')
  690. first := true
  691. _ = first
  692. {
  693. const prefix string = ",\"permissions\":"
  694. out.RawString(prefix[1:])
  695. if in.Permissions == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  696. out.RawString("null")
  697. } else {
  698. out.RawByte('[')
  699. for v5, v6 := range in.Permissions {
  700. if v5 > 0 {
  701. out.RawByte(',')
  702. }
  703. (v6).MarshalEasyJSON(out)
  704. }
  705. out.RawByte(']')
  706. }
  707. }
  708. if in.Origin != "" {
  709. const prefix string = ",\"origin\":"
  710. out.RawString(prefix)
  711. out.String(string(in.Origin))
  712. }
  713. if in.BrowserContextID != "" {
  714. const prefix string = ",\"browserContextId\":"
  715. out.RawString(prefix)
  716. out.String(string(in.BrowserContextID))
  717. }
  718. out.RawByte('}')
  719. }
  720. // MarshalJSON supports json.Marshaler interface
  721. func (v GrantPermissionsParams) MarshalJSON() ([]byte, error) {
  722. w := jwriter.Writer{}
  723. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser7(&w, v)
  724. return w.Buffer.BuildBytes(), w.Error
  725. }
  726. // MarshalEasyJSON supports easyjson.Marshaler interface
  727. func (v GrantPermissionsParams) MarshalEasyJSON(w *jwriter.Writer) {
  728. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser7(w, v)
  729. }
  730. // UnmarshalJSON supports json.Unmarshaler interface
  731. func (v *GrantPermissionsParams) UnmarshalJSON(data []byte) error {
  732. r := jlexer.Lexer{Data: data}
  733. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser7(&r, v)
  734. return r.Error()
  735. }
  736. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  737. func (v *GrantPermissionsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  738. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser7(l, v)
  739. }
  740. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser8(in *jlexer.Lexer, out *GetWindowForTargetReturns) {
  741. isTopLevel := in.IsStart()
  742. if in.IsNull() {
  743. if isTopLevel {
  744. in.Consumed()
  745. }
  746. in.Skip()
  747. return
  748. }
  749. in.Delim('{')
  750. for !in.IsDelim('}') {
  751. key := in.UnsafeFieldName(false)
  752. in.WantColon()
  753. if in.IsNull() {
  754. in.Skip()
  755. in.WantComma()
  756. continue
  757. }
  758. switch key {
  759. case "windowId":
  760. out.WindowID = WindowID(in.Int64())
  761. case "bounds":
  762. if in.IsNull() {
  763. in.Skip()
  764. out.Bounds = nil
  765. } else {
  766. if out.Bounds == nil {
  767. out.Bounds = new(Bounds)
  768. }
  769. (*out.Bounds).UnmarshalEasyJSON(in)
  770. }
  771. default:
  772. in.SkipRecursive()
  773. }
  774. in.WantComma()
  775. }
  776. in.Delim('}')
  777. if isTopLevel {
  778. in.Consumed()
  779. }
  780. }
  781. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser8(out *jwriter.Writer, in GetWindowForTargetReturns) {
  782. out.RawByte('{')
  783. first := true
  784. _ = first
  785. if in.WindowID != 0 {
  786. const prefix string = ",\"windowId\":"
  787. first = false
  788. out.RawString(prefix[1:])
  789. out.Int64(int64(in.WindowID))
  790. }
  791. if in.Bounds != nil {
  792. const prefix string = ",\"bounds\":"
  793. if first {
  794. first = false
  795. out.RawString(prefix[1:])
  796. } else {
  797. out.RawString(prefix)
  798. }
  799. (*in.Bounds).MarshalEasyJSON(out)
  800. }
  801. out.RawByte('}')
  802. }
  803. // MarshalJSON supports json.Marshaler interface
  804. func (v GetWindowForTargetReturns) MarshalJSON() ([]byte, error) {
  805. w := jwriter.Writer{}
  806. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser8(&w, v)
  807. return w.Buffer.BuildBytes(), w.Error
  808. }
  809. // MarshalEasyJSON supports easyjson.Marshaler interface
  810. func (v GetWindowForTargetReturns) MarshalEasyJSON(w *jwriter.Writer) {
  811. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser8(w, v)
  812. }
  813. // UnmarshalJSON supports json.Unmarshaler interface
  814. func (v *GetWindowForTargetReturns) UnmarshalJSON(data []byte) error {
  815. r := jlexer.Lexer{Data: data}
  816. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser8(&r, v)
  817. return r.Error()
  818. }
  819. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  820. func (v *GetWindowForTargetReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  821. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser8(l, v)
  822. }
  823. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser9(in *jlexer.Lexer, out *GetWindowForTargetParams) {
  824. isTopLevel := in.IsStart()
  825. if in.IsNull() {
  826. if isTopLevel {
  827. in.Consumed()
  828. }
  829. in.Skip()
  830. return
  831. }
  832. in.Delim('{')
  833. for !in.IsDelim('}') {
  834. key := in.UnsafeFieldName(false)
  835. in.WantColon()
  836. if in.IsNull() {
  837. in.Skip()
  838. in.WantComma()
  839. continue
  840. }
  841. switch key {
  842. case "targetId":
  843. out.TargetID = target.ID(in.String())
  844. default:
  845. in.SkipRecursive()
  846. }
  847. in.WantComma()
  848. }
  849. in.Delim('}')
  850. if isTopLevel {
  851. in.Consumed()
  852. }
  853. }
  854. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser9(out *jwriter.Writer, in GetWindowForTargetParams) {
  855. out.RawByte('{')
  856. first := true
  857. _ = first
  858. if in.TargetID != "" {
  859. const prefix string = ",\"targetId\":"
  860. first = false
  861. out.RawString(prefix[1:])
  862. out.String(string(in.TargetID))
  863. }
  864. out.RawByte('}')
  865. }
  866. // MarshalJSON supports json.Marshaler interface
  867. func (v GetWindowForTargetParams) MarshalJSON() ([]byte, error) {
  868. w := jwriter.Writer{}
  869. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser9(&w, v)
  870. return w.Buffer.BuildBytes(), w.Error
  871. }
  872. // MarshalEasyJSON supports easyjson.Marshaler interface
  873. func (v GetWindowForTargetParams) MarshalEasyJSON(w *jwriter.Writer) {
  874. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser9(w, v)
  875. }
  876. // UnmarshalJSON supports json.Unmarshaler interface
  877. func (v *GetWindowForTargetParams) UnmarshalJSON(data []byte) error {
  878. r := jlexer.Lexer{Data: data}
  879. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser9(&r, v)
  880. return r.Error()
  881. }
  882. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  883. func (v *GetWindowForTargetParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  884. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser9(l, v)
  885. }
  886. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser10(in *jlexer.Lexer, out *GetWindowBoundsReturns) {
  887. isTopLevel := in.IsStart()
  888. if in.IsNull() {
  889. if isTopLevel {
  890. in.Consumed()
  891. }
  892. in.Skip()
  893. return
  894. }
  895. in.Delim('{')
  896. for !in.IsDelim('}') {
  897. key := in.UnsafeFieldName(false)
  898. in.WantColon()
  899. if in.IsNull() {
  900. in.Skip()
  901. in.WantComma()
  902. continue
  903. }
  904. switch key {
  905. case "bounds":
  906. if in.IsNull() {
  907. in.Skip()
  908. out.Bounds = nil
  909. } else {
  910. if out.Bounds == nil {
  911. out.Bounds = new(Bounds)
  912. }
  913. (*out.Bounds).UnmarshalEasyJSON(in)
  914. }
  915. default:
  916. in.SkipRecursive()
  917. }
  918. in.WantComma()
  919. }
  920. in.Delim('}')
  921. if isTopLevel {
  922. in.Consumed()
  923. }
  924. }
  925. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser10(out *jwriter.Writer, in GetWindowBoundsReturns) {
  926. out.RawByte('{')
  927. first := true
  928. _ = first
  929. if in.Bounds != nil {
  930. const prefix string = ",\"bounds\":"
  931. first = false
  932. out.RawString(prefix[1:])
  933. (*in.Bounds).MarshalEasyJSON(out)
  934. }
  935. out.RawByte('}')
  936. }
  937. // MarshalJSON supports json.Marshaler interface
  938. func (v GetWindowBoundsReturns) MarshalJSON() ([]byte, error) {
  939. w := jwriter.Writer{}
  940. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser10(&w, v)
  941. return w.Buffer.BuildBytes(), w.Error
  942. }
  943. // MarshalEasyJSON supports easyjson.Marshaler interface
  944. func (v GetWindowBoundsReturns) MarshalEasyJSON(w *jwriter.Writer) {
  945. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser10(w, v)
  946. }
  947. // UnmarshalJSON supports json.Unmarshaler interface
  948. func (v *GetWindowBoundsReturns) UnmarshalJSON(data []byte) error {
  949. r := jlexer.Lexer{Data: data}
  950. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser10(&r, v)
  951. return r.Error()
  952. }
  953. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  954. func (v *GetWindowBoundsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  955. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser10(l, v)
  956. }
  957. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser11(in *jlexer.Lexer, out *GetWindowBoundsParams) {
  958. isTopLevel := in.IsStart()
  959. if in.IsNull() {
  960. if isTopLevel {
  961. in.Consumed()
  962. }
  963. in.Skip()
  964. return
  965. }
  966. in.Delim('{')
  967. for !in.IsDelim('}') {
  968. key := in.UnsafeFieldName(false)
  969. in.WantColon()
  970. if in.IsNull() {
  971. in.Skip()
  972. in.WantComma()
  973. continue
  974. }
  975. switch key {
  976. case "windowId":
  977. out.WindowID = WindowID(in.Int64())
  978. default:
  979. in.SkipRecursive()
  980. }
  981. in.WantComma()
  982. }
  983. in.Delim('}')
  984. if isTopLevel {
  985. in.Consumed()
  986. }
  987. }
  988. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser11(out *jwriter.Writer, in GetWindowBoundsParams) {
  989. out.RawByte('{')
  990. first := true
  991. _ = first
  992. {
  993. const prefix string = ",\"windowId\":"
  994. out.RawString(prefix[1:])
  995. out.Int64(int64(in.WindowID))
  996. }
  997. out.RawByte('}')
  998. }
  999. // MarshalJSON supports json.Marshaler interface
  1000. func (v GetWindowBoundsParams) MarshalJSON() ([]byte, error) {
  1001. w := jwriter.Writer{}
  1002. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser11(&w, v)
  1003. return w.Buffer.BuildBytes(), w.Error
  1004. }
  1005. // MarshalEasyJSON supports easyjson.Marshaler interface
  1006. func (v GetWindowBoundsParams) MarshalEasyJSON(w *jwriter.Writer) {
  1007. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser11(w, v)
  1008. }
  1009. // UnmarshalJSON supports json.Unmarshaler interface
  1010. func (v *GetWindowBoundsParams) UnmarshalJSON(data []byte) error {
  1011. r := jlexer.Lexer{Data: data}
  1012. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser11(&r, v)
  1013. return r.Error()
  1014. }
  1015. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1016. func (v *GetWindowBoundsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1017. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser11(l, v)
  1018. }
  1019. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser12(in *jlexer.Lexer, out *GetVersionReturns) {
  1020. isTopLevel := in.IsStart()
  1021. if in.IsNull() {
  1022. if isTopLevel {
  1023. in.Consumed()
  1024. }
  1025. in.Skip()
  1026. return
  1027. }
  1028. in.Delim('{')
  1029. for !in.IsDelim('}') {
  1030. key := in.UnsafeFieldName(false)
  1031. in.WantColon()
  1032. if in.IsNull() {
  1033. in.Skip()
  1034. in.WantComma()
  1035. continue
  1036. }
  1037. switch key {
  1038. case "protocolVersion":
  1039. out.ProtocolVersion = string(in.String())
  1040. case "product":
  1041. out.Product = string(in.String())
  1042. case "revision":
  1043. out.Revision = string(in.String())
  1044. case "userAgent":
  1045. out.UserAgent = string(in.String())
  1046. case "jsVersion":
  1047. out.JsVersion = string(in.String())
  1048. default:
  1049. in.SkipRecursive()
  1050. }
  1051. in.WantComma()
  1052. }
  1053. in.Delim('}')
  1054. if isTopLevel {
  1055. in.Consumed()
  1056. }
  1057. }
  1058. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser12(out *jwriter.Writer, in GetVersionReturns) {
  1059. out.RawByte('{')
  1060. first := true
  1061. _ = first
  1062. if in.ProtocolVersion != "" {
  1063. const prefix string = ",\"protocolVersion\":"
  1064. first = false
  1065. out.RawString(prefix[1:])
  1066. out.String(string(in.ProtocolVersion))
  1067. }
  1068. if in.Product != "" {
  1069. const prefix string = ",\"product\":"
  1070. if first {
  1071. first = false
  1072. out.RawString(prefix[1:])
  1073. } else {
  1074. out.RawString(prefix)
  1075. }
  1076. out.String(string(in.Product))
  1077. }
  1078. if in.Revision != "" {
  1079. const prefix string = ",\"revision\":"
  1080. if first {
  1081. first = false
  1082. out.RawString(prefix[1:])
  1083. } else {
  1084. out.RawString(prefix)
  1085. }
  1086. out.String(string(in.Revision))
  1087. }
  1088. if in.UserAgent != "" {
  1089. const prefix string = ",\"userAgent\":"
  1090. if first {
  1091. first = false
  1092. out.RawString(prefix[1:])
  1093. } else {
  1094. out.RawString(prefix)
  1095. }
  1096. out.String(string(in.UserAgent))
  1097. }
  1098. if in.JsVersion != "" {
  1099. const prefix string = ",\"jsVersion\":"
  1100. if first {
  1101. first = false
  1102. out.RawString(prefix[1:])
  1103. } else {
  1104. out.RawString(prefix)
  1105. }
  1106. out.String(string(in.JsVersion))
  1107. }
  1108. out.RawByte('}')
  1109. }
  1110. // MarshalJSON supports json.Marshaler interface
  1111. func (v GetVersionReturns) MarshalJSON() ([]byte, error) {
  1112. w := jwriter.Writer{}
  1113. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser12(&w, v)
  1114. return w.Buffer.BuildBytes(), w.Error
  1115. }
  1116. // MarshalEasyJSON supports easyjson.Marshaler interface
  1117. func (v GetVersionReturns) MarshalEasyJSON(w *jwriter.Writer) {
  1118. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser12(w, v)
  1119. }
  1120. // UnmarshalJSON supports json.Unmarshaler interface
  1121. func (v *GetVersionReturns) UnmarshalJSON(data []byte) error {
  1122. r := jlexer.Lexer{Data: data}
  1123. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser12(&r, v)
  1124. return r.Error()
  1125. }
  1126. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1127. func (v *GetVersionReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1128. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser12(l, v)
  1129. }
  1130. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser13(in *jlexer.Lexer, out *GetVersionParams) {
  1131. isTopLevel := in.IsStart()
  1132. if in.IsNull() {
  1133. if isTopLevel {
  1134. in.Consumed()
  1135. }
  1136. in.Skip()
  1137. return
  1138. }
  1139. in.Delim('{')
  1140. for !in.IsDelim('}') {
  1141. key := in.UnsafeFieldName(false)
  1142. in.WantColon()
  1143. if in.IsNull() {
  1144. in.Skip()
  1145. in.WantComma()
  1146. continue
  1147. }
  1148. switch key {
  1149. default:
  1150. in.SkipRecursive()
  1151. }
  1152. in.WantComma()
  1153. }
  1154. in.Delim('}')
  1155. if isTopLevel {
  1156. in.Consumed()
  1157. }
  1158. }
  1159. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser13(out *jwriter.Writer, in GetVersionParams) {
  1160. out.RawByte('{')
  1161. first := true
  1162. _ = first
  1163. out.RawByte('}')
  1164. }
  1165. // MarshalJSON supports json.Marshaler interface
  1166. func (v GetVersionParams) MarshalJSON() ([]byte, error) {
  1167. w := jwriter.Writer{}
  1168. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser13(&w, v)
  1169. return w.Buffer.BuildBytes(), w.Error
  1170. }
  1171. // MarshalEasyJSON supports easyjson.Marshaler interface
  1172. func (v GetVersionParams) MarshalEasyJSON(w *jwriter.Writer) {
  1173. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser13(w, v)
  1174. }
  1175. // UnmarshalJSON supports json.Unmarshaler interface
  1176. func (v *GetVersionParams) UnmarshalJSON(data []byte) error {
  1177. r := jlexer.Lexer{Data: data}
  1178. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser13(&r, v)
  1179. return r.Error()
  1180. }
  1181. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1182. func (v *GetVersionParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1183. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser13(l, v)
  1184. }
  1185. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser14(in *jlexer.Lexer, out *GetHistogramsReturns) {
  1186. isTopLevel := in.IsStart()
  1187. if in.IsNull() {
  1188. if isTopLevel {
  1189. in.Consumed()
  1190. }
  1191. in.Skip()
  1192. return
  1193. }
  1194. in.Delim('{')
  1195. for !in.IsDelim('}') {
  1196. key := in.UnsafeFieldName(false)
  1197. in.WantColon()
  1198. if in.IsNull() {
  1199. in.Skip()
  1200. in.WantComma()
  1201. continue
  1202. }
  1203. switch key {
  1204. case "histograms":
  1205. if in.IsNull() {
  1206. in.Skip()
  1207. out.Histograms = nil
  1208. } else {
  1209. in.Delim('[')
  1210. if out.Histograms == nil {
  1211. if !in.IsDelim(']') {
  1212. out.Histograms = make([]*Histogram, 0, 8)
  1213. } else {
  1214. out.Histograms = []*Histogram{}
  1215. }
  1216. } else {
  1217. out.Histograms = (out.Histograms)[:0]
  1218. }
  1219. for !in.IsDelim(']') {
  1220. var v7 *Histogram
  1221. if in.IsNull() {
  1222. in.Skip()
  1223. v7 = nil
  1224. } else {
  1225. if v7 == nil {
  1226. v7 = new(Histogram)
  1227. }
  1228. (*v7).UnmarshalEasyJSON(in)
  1229. }
  1230. out.Histograms = append(out.Histograms, v7)
  1231. in.WantComma()
  1232. }
  1233. in.Delim(']')
  1234. }
  1235. default:
  1236. in.SkipRecursive()
  1237. }
  1238. in.WantComma()
  1239. }
  1240. in.Delim('}')
  1241. if isTopLevel {
  1242. in.Consumed()
  1243. }
  1244. }
  1245. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser14(out *jwriter.Writer, in GetHistogramsReturns) {
  1246. out.RawByte('{')
  1247. first := true
  1248. _ = first
  1249. if len(in.Histograms) != 0 {
  1250. const prefix string = ",\"histograms\":"
  1251. first = false
  1252. out.RawString(prefix[1:])
  1253. {
  1254. out.RawByte('[')
  1255. for v8, v9 := range in.Histograms {
  1256. if v8 > 0 {
  1257. out.RawByte(',')
  1258. }
  1259. if v9 == nil {
  1260. out.RawString("null")
  1261. } else {
  1262. (*v9).MarshalEasyJSON(out)
  1263. }
  1264. }
  1265. out.RawByte(']')
  1266. }
  1267. }
  1268. out.RawByte('}')
  1269. }
  1270. // MarshalJSON supports json.Marshaler interface
  1271. func (v GetHistogramsReturns) MarshalJSON() ([]byte, error) {
  1272. w := jwriter.Writer{}
  1273. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser14(&w, v)
  1274. return w.Buffer.BuildBytes(), w.Error
  1275. }
  1276. // MarshalEasyJSON supports easyjson.Marshaler interface
  1277. func (v GetHistogramsReturns) MarshalEasyJSON(w *jwriter.Writer) {
  1278. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser14(w, v)
  1279. }
  1280. // UnmarshalJSON supports json.Unmarshaler interface
  1281. func (v *GetHistogramsReturns) UnmarshalJSON(data []byte) error {
  1282. r := jlexer.Lexer{Data: data}
  1283. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser14(&r, v)
  1284. return r.Error()
  1285. }
  1286. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1287. func (v *GetHistogramsReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1288. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser14(l, v)
  1289. }
  1290. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser15(in *jlexer.Lexer, out *GetHistogramsParams) {
  1291. isTopLevel := in.IsStart()
  1292. if in.IsNull() {
  1293. if isTopLevel {
  1294. in.Consumed()
  1295. }
  1296. in.Skip()
  1297. return
  1298. }
  1299. in.Delim('{')
  1300. for !in.IsDelim('}') {
  1301. key := in.UnsafeFieldName(false)
  1302. in.WantColon()
  1303. if in.IsNull() {
  1304. in.Skip()
  1305. in.WantComma()
  1306. continue
  1307. }
  1308. switch key {
  1309. case "query":
  1310. out.Query = string(in.String())
  1311. case "delta":
  1312. out.Delta = bool(in.Bool())
  1313. default:
  1314. in.SkipRecursive()
  1315. }
  1316. in.WantComma()
  1317. }
  1318. in.Delim('}')
  1319. if isTopLevel {
  1320. in.Consumed()
  1321. }
  1322. }
  1323. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser15(out *jwriter.Writer, in GetHistogramsParams) {
  1324. out.RawByte('{')
  1325. first := true
  1326. _ = first
  1327. if in.Query != "" {
  1328. const prefix string = ",\"query\":"
  1329. first = false
  1330. out.RawString(prefix[1:])
  1331. out.String(string(in.Query))
  1332. }
  1333. if in.Delta {
  1334. const prefix string = ",\"delta\":"
  1335. if first {
  1336. first = false
  1337. out.RawString(prefix[1:])
  1338. } else {
  1339. out.RawString(prefix)
  1340. }
  1341. out.Bool(bool(in.Delta))
  1342. }
  1343. out.RawByte('}')
  1344. }
  1345. // MarshalJSON supports json.Marshaler interface
  1346. func (v GetHistogramsParams) MarshalJSON() ([]byte, error) {
  1347. w := jwriter.Writer{}
  1348. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser15(&w, v)
  1349. return w.Buffer.BuildBytes(), w.Error
  1350. }
  1351. // MarshalEasyJSON supports easyjson.Marshaler interface
  1352. func (v GetHistogramsParams) MarshalEasyJSON(w *jwriter.Writer) {
  1353. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser15(w, v)
  1354. }
  1355. // UnmarshalJSON supports json.Unmarshaler interface
  1356. func (v *GetHistogramsParams) UnmarshalJSON(data []byte) error {
  1357. r := jlexer.Lexer{Data: data}
  1358. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser15(&r, v)
  1359. return r.Error()
  1360. }
  1361. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1362. func (v *GetHistogramsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1363. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser15(l, v)
  1364. }
  1365. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser16(in *jlexer.Lexer, out *GetHistogramReturns) {
  1366. isTopLevel := in.IsStart()
  1367. if in.IsNull() {
  1368. if isTopLevel {
  1369. in.Consumed()
  1370. }
  1371. in.Skip()
  1372. return
  1373. }
  1374. in.Delim('{')
  1375. for !in.IsDelim('}') {
  1376. key := in.UnsafeFieldName(false)
  1377. in.WantColon()
  1378. if in.IsNull() {
  1379. in.Skip()
  1380. in.WantComma()
  1381. continue
  1382. }
  1383. switch key {
  1384. case "histogram":
  1385. if in.IsNull() {
  1386. in.Skip()
  1387. out.Histogram = nil
  1388. } else {
  1389. if out.Histogram == nil {
  1390. out.Histogram = new(Histogram)
  1391. }
  1392. (*out.Histogram).UnmarshalEasyJSON(in)
  1393. }
  1394. default:
  1395. in.SkipRecursive()
  1396. }
  1397. in.WantComma()
  1398. }
  1399. in.Delim('}')
  1400. if isTopLevel {
  1401. in.Consumed()
  1402. }
  1403. }
  1404. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser16(out *jwriter.Writer, in GetHistogramReturns) {
  1405. out.RawByte('{')
  1406. first := true
  1407. _ = first
  1408. if in.Histogram != nil {
  1409. const prefix string = ",\"histogram\":"
  1410. first = false
  1411. out.RawString(prefix[1:])
  1412. (*in.Histogram).MarshalEasyJSON(out)
  1413. }
  1414. out.RawByte('}')
  1415. }
  1416. // MarshalJSON supports json.Marshaler interface
  1417. func (v GetHistogramReturns) MarshalJSON() ([]byte, error) {
  1418. w := jwriter.Writer{}
  1419. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser16(&w, v)
  1420. return w.Buffer.BuildBytes(), w.Error
  1421. }
  1422. // MarshalEasyJSON supports easyjson.Marshaler interface
  1423. func (v GetHistogramReturns) MarshalEasyJSON(w *jwriter.Writer) {
  1424. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser16(w, v)
  1425. }
  1426. // UnmarshalJSON supports json.Unmarshaler interface
  1427. func (v *GetHistogramReturns) UnmarshalJSON(data []byte) error {
  1428. r := jlexer.Lexer{Data: data}
  1429. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser16(&r, v)
  1430. return r.Error()
  1431. }
  1432. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1433. func (v *GetHistogramReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1434. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser16(l, v)
  1435. }
  1436. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser17(in *jlexer.Lexer, out *GetHistogramParams) {
  1437. isTopLevel := in.IsStart()
  1438. if in.IsNull() {
  1439. if isTopLevel {
  1440. in.Consumed()
  1441. }
  1442. in.Skip()
  1443. return
  1444. }
  1445. in.Delim('{')
  1446. for !in.IsDelim('}') {
  1447. key := in.UnsafeFieldName(false)
  1448. in.WantColon()
  1449. if in.IsNull() {
  1450. in.Skip()
  1451. in.WantComma()
  1452. continue
  1453. }
  1454. switch key {
  1455. case "name":
  1456. out.Name = string(in.String())
  1457. case "delta":
  1458. out.Delta = bool(in.Bool())
  1459. default:
  1460. in.SkipRecursive()
  1461. }
  1462. in.WantComma()
  1463. }
  1464. in.Delim('}')
  1465. if isTopLevel {
  1466. in.Consumed()
  1467. }
  1468. }
  1469. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser17(out *jwriter.Writer, in GetHistogramParams) {
  1470. out.RawByte('{')
  1471. first := true
  1472. _ = first
  1473. {
  1474. const prefix string = ",\"name\":"
  1475. out.RawString(prefix[1:])
  1476. out.String(string(in.Name))
  1477. }
  1478. if in.Delta {
  1479. const prefix string = ",\"delta\":"
  1480. out.RawString(prefix)
  1481. out.Bool(bool(in.Delta))
  1482. }
  1483. out.RawByte('}')
  1484. }
  1485. // MarshalJSON supports json.Marshaler interface
  1486. func (v GetHistogramParams) MarshalJSON() ([]byte, error) {
  1487. w := jwriter.Writer{}
  1488. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser17(&w, v)
  1489. return w.Buffer.BuildBytes(), w.Error
  1490. }
  1491. // MarshalEasyJSON supports easyjson.Marshaler interface
  1492. func (v GetHistogramParams) MarshalEasyJSON(w *jwriter.Writer) {
  1493. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser17(w, v)
  1494. }
  1495. // UnmarshalJSON supports json.Unmarshaler interface
  1496. func (v *GetHistogramParams) UnmarshalJSON(data []byte) error {
  1497. r := jlexer.Lexer{Data: data}
  1498. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser17(&r, v)
  1499. return r.Error()
  1500. }
  1501. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1502. func (v *GetHistogramParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1503. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser17(l, v)
  1504. }
  1505. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser18(in *jlexer.Lexer, out *GetBrowserCommandLineReturns) {
  1506. isTopLevel := in.IsStart()
  1507. if in.IsNull() {
  1508. if isTopLevel {
  1509. in.Consumed()
  1510. }
  1511. in.Skip()
  1512. return
  1513. }
  1514. in.Delim('{')
  1515. for !in.IsDelim('}') {
  1516. key := in.UnsafeFieldName(false)
  1517. in.WantColon()
  1518. if in.IsNull() {
  1519. in.Skip()
  1520. in.WantComma()
  1521. continue
  1522. }
  1523. switch key {
  1524. case "arguments":
  1525. if in.IsNull() {
  1526. in.Skip()
  1527. out.Arguments = nil
  1528. } else {
  1529. in.Delim('[')
  1530. if out.Arguments == nil {
  1531. if !in.IsDelim(']') {
  1532. out.Arguments = make([]string, 0, 4)
  1533. } else {
  1534. out.Arguments = []string{}
  1535. }
  1536. } else {
  1537. out.Arguments = (out.Arguments)[:0]
  1538. }
  1539. for !in.IsDelim(']') {
  1540. var v10 string
  1541. v10 = string(in.String())
  1542. out.Arguments = append(out.Arguments, v10)
  1543. in.WantComma()
  1544. }
  1545. in.Delim(']')
  1546. }
  1547. default:
  1548. in.SkipRecursive()
  1549. }
  1550. in.WantComma()
  1551. }
  1552. in.Delim('}')
  1553. if isTopLevel {
  1554. in.Consumed()
  1555. }
  1556. }
  1557. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser18(out *jwriter.Writer, in GetBrowserCommandLineReturns) {
  1558. out.RawByte('{')
  1559. first := true
  1560. _ = first
  1561. if len(in.Arguments) != 0 {
  1562. const prefix string = ",\"arguments\":"
  1563. first = false
  1564. out.RawString(prefix[1:])
  1565. {
  1566. out.RawByte('[')
  1567. for v11, v12 := range in.Arguments {
  1568. if v11 > 0 {
  1569. out.RawByte(',')
  1570. }
  1571. out.String(string(v12))
  1572. }
  1573. out.RawByte(']')
  1574. }
  1575. }
  1576. out.RawByte('}')
  1577. }
  1578. // MarshalJSON supports json.Marshaler interface
  1579. func (v GetBrowserCommandLineReturns) MarshalJSON() ([]byte, error) {
  1580. w := jwriter.Writer{}
  1581. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser18(&w, v)
  1582. return w.Buffer.BuildBytes(), w.Error
  1583. }
  1584. // MarshalEasyJSON supports easyjson.Marshaler interface
  1585. func (v GetBrowserCommandLineReturns) MarshalEasyJSON(w *jwriter.Writer) {
  1586. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser18(w, v)
  1587. }
  1588. // UnmarshalJSON supports json.Unmarshaler interface
  1589. func (v *GetBrowserCommandLineReturns) UnmarshalJSON(data []byte) error {
  1590. r := jlexer.Lexer{Data: data}
  1591. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser18(&r, v)
  1592. return r.Error()
  1593. }
  1594. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1595. func (v *GetBrowserCommandLineReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1596. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser18(l, v)
  1597. }
  1598. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser19(in *jlexer.Lexer, out *GetBrowserCommandLineParams) {
  1599. isTopLevel := in.IsStart()
  1600. if in.IsNull() {
  1601. if isTopLevel {
  1602. in.Consumed()
  1603. }
  1604. in.Skip()
  1605. return
  1606. }
  1607. in.Delim('{')
  1608. for !in.IsDelim('}') {
  1609. key := in.UnsafeFieldName(false)
  1610. in.WantColon()
  1611. if in.IsNull() {
  1612. in.Skip()
  1613. in.WantComma()
  1614. continue
  1615. }
  1616. switch key {
  1617. default:
  1618. in.SkipRecursive()
  1619. }
  1620. in.WantComma()
  1621. }
  1622. in.Delim('}')
  1623. if isTopLevel {
  1624. in.Consumed()
  1625. }
  1626. }
  1627. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser19(out *jwriter.Writer, in GetBrowserCommandLineParams) {
  1628. out.RawByte('{')
  1629. first := true
  1630. _ = first
  1631. out.RawByte('}')
  1632. }
  1633. // MarshalJSON supports json.Marshaler interface
  1634. func (v GetBrowserCommandLineParams) MarshalJSON() ([]byte, error) {
  1635. w := jwriter.Writer{}
  1636. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser19(&w, v)
  1637. return w.Buffer.BuildBytes(), w.Error
  1638. }
  1639. // MarshalEasyJSON supports easyjson.Marshaler interface
  1640. func (v GetBrowserCommandLineParams) MarshalEasyJSON(w *jwriter.Writer) {
  1641. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser19(w, v)
  1642. }
  1643. // UnmarshalJSON supports json.Unmarshaler interface
  1644. func (v *GetBrowserCommandLineParams) UnmarshalJSON(data []byte) error {
  1645. r := jlexer.Lexer{Data: data}
  1646. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser19(&r, v)
  1647. return r.Error()
  1648. }
  1649. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1650. func (v *GetBrowserCommandLineParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1651. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser19(l, v)
  1652. }
  1653. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser20(in *jlexer.Lexer, out *ExecuteBrowserCommandParams) {
  1654. isTopLevel := in.IsStart()
  1655. if in.IsNull() {
  1656. if isTopLevel {
  1657. in.Consumed()
  1658. }
  1659. in.Skip()
  1660. return
  1661. }
  1662. in.Delim('{')
  1663. for !in.IsDelim('}') {
  1664. key := in.UnsafeFieldName(false)
  1665. in.WantColon()
  1666. if in.IsNull() {
  1667. in.Skip()
  1668. in.WantComma()
  1669. continue
  1670. }
  1671. switch key {
  1672. case "commandId":
  1673. (out.CommandID).UnmarshalEasyJSON(in)
  1674. default:
  1675. in.SkipRecursive()
  1676. }
  1677. in.WantComma()
  1678. }
  1679. in.Delim('}')
  1680. if isTopLevel {
  1681. in.Consumed()
  1682. }
  1683. }
  1684. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser20(out *jwriter.Writer, in ExecuteBrowserCommandParams) {
  1685. out.RawByte('{')
  1686. first := true
  1687. _ = first
  1688. {
  1689. const prefix string = ",\"commandId\":"
  1690. out.RawString(prefix[1:])
  1691. (in.CommandID).MarshalEasyJSON(out)
  1692. }
  1693. out.RawByte('}')
  1694. }
  1695. // MarshalJSON supports json.Marshaler interface
  1696. func (v ExecuteBrowserCommandParams) MarshalJSON() ([]byte, error) {
  1697. w := jwriter.Writer{}
  1698. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser20(&w, v)
  1699. return w.Buffer.BuildBytes(), w.Error
  1700. }
  1701. // MarshalEasyJSON supports easyjson.Marshaler interface
  1702. func (v ExecuteBrowserCommandParams) MarshalEasyJSON(w *jwriter.Writer) {
  1703. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser20(w, v)
  1704. }
  1705. // UnmarshalJSON supports json.Unmarshaler interface
  1706. func (v *ExecuteBrowserCommandParams) UnmarshalJSON(data []byte) error {
  1707. r := jlexer.Lexer{Data: data}
  1708. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser20(&r, v)
  1709. return r.Error()
  1710. }
  1711. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1712. func (v *ExecuteBrowserCommandParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1713. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser20(l, v)
  1714. }
  1715. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser21(in *jlexer.Lexer, out *EventDownloadWillBegin) {
  1716. isTopLevel := in.IsStart()
  1717. if in.IsNull() {
  1718. if isTopLevel {
  1719. in.Consumed()
  1720. }
  1721. in.Skip()
  1722. return
  1723. }
  1724. in.Delim('{')
  1725. for !in.IsDelim('}') {
  1726. key := in.UnsafeFieldName(false)
  1727. in.WantColon()
  1728. if in.IsNull() {
  1729. in.Skip()
  1730. in.WantComma()
  1731. continue
  1732. }
  1733. switch key {
  1734. case "frameId":
  1735. (out.FrameID).UnmarshalEasyJSON(in)
  1736. case "guid":
  1737. out.GUID = string(in.String())
  1738. case "url":
  1739. out.URL = string(in.String())
  1740. case "suggestedFilename":
  1741. out.SuggestedFilename = string(in.String())
  1742. default:
  1743. in.SkipRecursive()
  1744. }
  1745. in.WantComma()
  1746. }
  1747. in.Delim('}')
  1748. if isTopLevel {
  1749. in.Consumed()
  1750. }
  1751. }
  1752. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser21(out *jwriter.Writer, in EventDownloadWillBegin) {
  1753. out.RawByte('{')
  1754. first := true
  1755. _ = first
  1756. {
  1757. const prefix string = ",\"frameId\":"
  1758. out.RawString(prefix[1:])
  1759. out.String(string(in.FrameID))
  1760. }
  1761. {
  1762. const prefix string = ",\"guid\":"
  1763. out.RawString(prefix)
  1764. out.String(string(in.GUID))
  1765. }
  1766. {
  1767. const prefix string = ",\"url\":"
  1768. out.RawString(prefix)
  1769. out.String(string(in.URL))
  1770. }
  1771. {
  1772. const prefix string = ",\"suggestedFilename\":"
  1773. out.RawString(prefix)
  1774. out.String(string(in.SuggestedFilename))
  1775. }
  1776. out.RawByte('}')
  1777. }
  1778. // MarshalJSON supports json.Marshaler interface
  1779. func (v EventDownloadWillBegin) MarshalJSON() ([]byte, error) {
  1780. w := jwriter.Writer{}
  1781. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser21(&w, v)
  1782. return w.Buffer.BuildBytes(), w.Error
  1783. }
  1784. // MarshalEasyJSON supports easyjson.Marshaler interface
  1785. func (v EventDownloadWillBegin) MarshalEasyJSON(w *jwriter.Writer) {
  1786. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser21(w, v)
  1787. }
  1788. // UnmarshalJSON supports json.Unmarshaler interface
  1789. func (v *EventDownloadWillBegin) UnmarshalJSON(data []byte) error {
  1790. r := jlexer.Lexer{Data: data}
  1791. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser21(&r, v)
  1792. return r.Error()
  1793. }
  1794. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1795. func (v *EventDownloadWillBegin) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1796. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser21(l, v)
  1797. }
  1798. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser22(in *jlexer.Lexer, out *EventDownloadProgress) {
  1799. isTopLevel := in.IsStart()
  1800. if in.IsNull() {
  1801. if isTopLevel {
  1802. in.Consumed()
  1803. }
  1804. in.Skip()
  1805. return
  1806. }
  1807. in.Delim('{')
  1808. for !in.IsDelim('}') {
  1809. key := in.UnsafeFieldName(false)
  1810. in.WantColon()
  1811. if in.IsNull() {
  1812. in.Skip()
  1813. in.WantComma()
  1814. continue
  1815. }
  1816. switch key {
  1817. case "guid":
  1818. out.GUID = string(in.String())
  1819. case "totalBytes":
  1820. out.TotalBytes = float64(in.Float64())
  1821. case "receivedBytes":
  1822. out.ReceivedBytes = float64(in.Float64())
  1823. case "state":
  1824. (out.State).UnmarshalEasyJSON(in)
  1825. default:
  1826. in.SkipRecursive()
  1827. }
  1828. in.WantComma()
  1829. }
  1830. in.Delim('}')
  1831. if isTopLevel {
  1832. in.Consumed()
  1833. }
  1834. }
  1835. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser22(out *jwriter.Writer, in EventDownloadProgress) {
  1836. out.RawByte('{')
  1837. first := true
  1838. _ = first
  1839. {
  1840. const prefix string = ",\"guid\":"
  1841. out.RawString(prefix[1:])
  1842. out.String(string(in.GUID))
  1843. }
  1844. {
  1845. const prefix string = ",\"totalBytes\":"
  1846. out.RawString(prefix)
  1847. out.Float64(float64(in.TotalBytes))
  1848. }
  1849. {
  1850. const prefix string = ",\"receivedBytes\":"
  1851. out.RawString(prefix)
  1852. out.Float64(float64(in.ReceivedBytes))
  1853. }
  1854. {
  1855. const prefix string = ",\"state\":"
  1856. out.RawString(prefix)
  1857. (in.State).MarshalEasyJSON(out)
  1858. }
  1859. out.RawByte('}')
  1860. }
  1861. // MarshalJSON supports json.Marshaler interface
  1862. func (v EventDownloadProgress) MarshalJSON() ([]byte, error) {
  1863. w := jwriter.Writer{}
  1864. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser22(&w, v)
  1865. return w.Buffer.BuildBytes(), w.Error
  1866. }
  1867. // MarshalEasyJSON supports easyjson.Marshaler interface
  1868. func (v EventDownloadProgress) MarshalEasyJSON(w *jwriter.Writer) {
  1869. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser22(w, v)
  1870. }
  1871. // UnmarshalJSON supports json.Unmarshaler interface
  1872. func (v *EventDownloadProgress) UnmarshalJSON(data []byte) error {
  1873. r := jlexer.Lexer{Data: data}
  1874. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser22(&r, v)
  1875. return r.Error()
  1876. }
  1877. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1878. func (v *EventDownloadProgress) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1879. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser22(l, v)
  1880. }
  1881. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser23(in *jlexer.Lexer, out *CrashParams) {
  1882. isTopLevel := in.IsStart()
  1883. if in.IsNull() {
  1884. if isTopLevel {
  1885. in.Consumed()
  1886. }
  1887. in.Skip()
  1888. return
  1889. }
  1890. in.Delim('{')
  1891. for !in.IsDelim('}') {
  1892. key := in.UnsafeFieldName(false)
  1893. in.WantColon()
  1894. if in.IsNull() {
  1895. in.Skip()
  1896. in.WantComma()
  1897. continue
  1898. }
  1899. switch key {
  1900. default:
  1901. in.SkipRecursive()
  1902. }
  1903. in.WantComma()
  1904. }
  1905. in.Delim('}')
  1906. if isTopLevel {
  1907. in.Consumed()
  1908. }
  1909. }
  1910. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser23(out *jwriter.Writer, in CrashParams) {
  1911. out.RawByte('{')
  1912. first := true
  1913. _ = first
  1914. out.RawByte('}')
  1915. }
  1916. // MarshalJSON supports json.Marshaler interface
  1917. func (v CrashParams) MarshalJSON() ([]byte, error) {
  1918. w := jwriter.Writer{}
  1919. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser23(&w, v)
  1920. return w.Buffer.BuildBytes(), w.Error
  1921. }
  1922. // MarshalEasyJSON supports easyjson.Marshaler interface
  1923. func (v CrashParams) MarshalEasyJSON(w *jwriter.Writer) {
  1924. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser23(w, v)
  1925. }
  1926. // UnmarshalJSON supports json.Unmarshaler interface
  1927. func (v *CrashParams) UnmarshalJSON(data []byte) error {
  1928. r := jlexer.Lexer{Data: data}
  1929. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser23(&r, v)
  1930. return r.Error()
  1931. }
  1932. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1933. func (v *CrashParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1934. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser23(l, v)
  1935. }
  1936. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser24(in *jlexer.Lexer, out *CrashGpuProcessParams) {
  1937. isTopLevel := in.IsStart()
  1938. if in.IsNull() {
  1939. if isTopLevel {
  1940. in.Consumed()
  1941. }
  1942. in.Skip()
  1943. return
  1944. }
  1945. in.Delim('{')
  1946. for !in.IsDelim('}') {
  1947. key := in.UnsafeFieldName(false)
  1948. in.WantColon()
  1949. if in.IsNull() {
  1950. in.Skip()
  1951. in.WantComma()
  1952. continue
  1953. }
  1954. switch key {
  1955. default:
  1956. in.SkipRecursive()
  1957. }
  1958. in.WantComma()
  1959. }
  1960. in.Delim('}')
  1961. if isTopLevel {
  1962. in.Consumed()
  1963. }
  1964. }
  1965. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser24(out *jwriter.Writer, in CrashGpuProcessParams) {
  1966. out.RawByte('{')
  1967. first := true
  1968. _ = first
  1969. out.RawByte('}')
  1970. }
  1971. // MarshalJSON supports json.Marshaler interface
  1972. func (v CrashGpuProcessParams) MarshalJSON() ([]byte, error) {
  1973. w := jwriter.Writer{}
  1974. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser24(&w, v)
  1975. return w.Buffer.BuildBytes(), w.Error
  1976. }
  1977. // MarshalEasyJSON supports easyjson.Marshaler interface
  1978. func (v CrashGpuProcessParams) MarshalEasyJSON(w *jwriter.Writer) {
  1979. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser24(w, v)
  1980. }
  1981. // UnmarshalJSON supports json.Unmarshaler interface
  1982. func (v *CrashGpuProcessParams) UnmarshalJSON(data []byte) error {
  1983. r := jlexer.Lexer{Data: data}
  1984. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser24(&r, v)
  1985. return r.Error()
  1986. }
  1987. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1988. func (v *CrashGpuProcessParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1989. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser24(l, v)
  1990. }
  1991. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser25(in *jlexer.Lexer, out *CloseParams) {
  1992. isTopLevel := in.IsStart()
  1993. if in.IsNull() {
  1994. if isTopLevel {
  1995. in.Consumed()
  1996. }
  1997. in.Skip()
  1998. return
  1999. }
  2000. in.Delim('{')
  2001. for !in.IsDelim('}') {
  2002. key := in.UnsafeFieldName(false)
  2003. in.WantColon()
  2004. if in.IsNull() {
  2005. in.Skip()
  2006. in.WantComma()
  2007. continue
  2008. }
  2009. switch key {
  2010. default:
  2011. in.SkipRecursive()
  2012. }
  2013. in.WantComma()
  2014. }
  2015. in.Delim('}')
  2016. if isTopLevel {
  2017. in.Consumed()
  2018. }
  2019. }
  2020. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser25(out *jwriter.Writer, in CloseParams) {
  2021. out.RawByte('{')
  2022. first := true
  2023. _ = first
  2024. out.RawByte('}')
  2025. }
  2026. // MarshalJSON supports json.Marshaler interface
  2027. func (v CloseParams) MarshalJSON() ([]byte, error) {
  2028. w := jwriter.Writer{}
  2029. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser25(&w, v)
  2030. return w.Buffer.BuildBytes(), w.Error
  2031. }
  2032. // MarshalEasyJSON supports easyjson.Marshaler interface
  2033. func (v CloseParams) MarshalEasyJSON(w *jwriter.Writer) {
  2034. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser25(w, v)
  2035. }
  2036. // UnmarshalJSON supports json.Unmarshaler interface
  2037. func (v *CloseParams) UnmarshalJSON(data []byte) error {
  2038. r := jlexer.Lexer{Data: data}
  2039. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser25(&r, v)
  2040. return r.Error()
  2041. }
  2042. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2043. func (v *CloseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2044. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser25(l, v)
  2045. }
  2046. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser26(in *jlexer.Lexer, out *CancelDownloadParams) {
  2047. isTopLevel := in.IsStart()
  2048. if in.IsNull() {
  2049. if isTopLevel {
  2050. in.Consumed()
  2051. }
  2052. in.Skip()
  2053. return
  2054. }
  2055. in.Delim('{')
  2056. for !in.IsDelim('}') {
  2057. key := in.UnsafeFieldName(false)
  2058. in.WantColon()
  2059. if in.IsNull() {
  2060. in.Skip()
  2061. in.WantComma()
  2062. continue
  2063. }
  2064. switch key {
  2065. case "guid":
  2066. out.GUID = string(in.String())
  2067. case "browserContextId":
  2068. out.BrowserContextID = cdp.BrowserContextID(in.String())
  2069. default:
  2070. in.SkipRecursive()
  2071. }
  2072. in.WantComma()
  2073. }
  2074. in.Delim('}')
  2075. if isTopLevel {
  2076. in.Consumed()
  2077. }
  2078. }
  2079. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser26(out *jwriter.Writer, in CancelDownloadParams) {
  2080. out.RawByte('{')
  2081. first := true
  2082. _ = first
  2083. {
  2084. const prefix string = ",\"guid\":"
  2085. out.RawString(prefix[1:])
  2086. out.String(string(in.GUID))
  2087. }
  2088. if in.BrowserContextID != "" {
  2089. const prefix string = ",\"browserContextId\":"
  2090. out.RawString(prefix)
  2091. out.String(string(in.BrowserContextID))
  2092. }
  2093. out.RawByte('}')
  2094. }
  2095. // MarshalJSON supports json.Marshaler interface
  2096. func (v CancelDownloadParams) MarshalJSON() ([]byte, error) {
  2097. w := jwriter.Writer{}
  2098. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser26(&w, v)
  2099. return w.Buffer.BuildBytes(), w.Error
  2100. }
  2101. // MarshalEasyJSON supports easyjson.Marshaler interface
  2102. func (v CancelDownloadParams) MarshalEasyJSON(w *jwriter.Writer) {
  2103. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser26(w, v)
  2104. }
  2105. // UnmarshalJSON supports json.Unmarshaler interface
  2106. func (v *CancelDownloadParams) UnmarshalJSON(data []byte) error {
  2107. r := jlexer.Lexer{Data: data}
  2108. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser26(&r, v)
  2109. return r.Error()
  2110. }
  2111. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2112. func (v *CancelDownloadParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2113. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser26(l, v)
  2114. }
  2115. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser27(in *jlexer.Lexer, out *Bucket) {
  2116. isTopLevel := in.IsStart()
  2117. if in.IsNull() {
  2118. if isTopLevel {
  2119. in.Consumed()
  2120. }
  2121. in.Skip()
  2122. return
  2123. }
  2124. in.Delim('{')
  2125. for !in.IsDelim('}') {
  2126. key := in.UnsafeFieldName(false)
  2127. in.WantColon()
  2128. if in.IsNull() {
  2129. in.Skip()
  2130. in.WantComma()
  2131. continue
  2132. }
  2133. switch key {
  2134. case "low":
  2135. out.Low = int64(in.Int64())
  2136. case "high":
  2137. out.High = int64(in.Int64())
  2138. case "count":
  2139. out.Count = int64(in.Int64())
  2140. default:
  2141. in.SkipRecursive()
  2142. }
  2143. in.WantComma()
  2144. }
  2145. in.Delim('}')
  2146. if isTopLevel {
  2147. in.Consumed()
  2148. }
  2149. }
  2150. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser27(out *jwriter.Writer, in Bucket) {
  2151. out.RawByte('{')
  2152. first := true
  2153. _ = first
  2154. {
  2155. const prefix string = ",\"low\":"
  2156. out.RawString(prefix[1:])
  2157. out.Int64(int64(in.Low))
  2158. }
  2159. {
  2160. const prefix string = ",\"high\":"
  2161. out.RawString(prefix)
  2162. out.Int64(int64(in.High))
  2163. }
  2164. {
  2165. const prefix string = ",\"count\":"
  2166. out.RawString(prefix)
  2167. out.Int64(int64(in.Count))
  2168. }
  2169. out.RawByte('}')
  2170. }
  2171. // MarshalJSON supports json.Marshaler interface
  2172. func (v Bucket) MarshalJSON() ([]byte, error) {
  2173. w := jwriter.Writer{}
  2174. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser27(&w, v)
  2175. return w.Buffer.BuildBytes(), w.Error
  2176. }
  2177. // MarshalEasyJSON supports easyjson.Marshaler interface
  2178. func (v Bucket) MarshalEasyJSON(w *jwriter.Writer) {
  2179. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser27(w, v)
  2180. }
  2181. // UnmarshalJSON supports json.Unmarshaler interface
  2182. func (v *Bucket) UnmarshalJSON(data []byte) error {
  2183. r := jlexer.Lexer{Data: data}
  2184. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser27(&r, v)
  2185. return r.Error()
  2186. }
  2187. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2188. func (v *Bucket) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2189. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser27(l, v)
  2190. }
  2191. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser28(in *jlexer.Lexer, out *Bounds) {
  2192. isTopLevel := in.IsStart()
  2193. if in.IsNull() {
  2194. if isTopLevel {
  2195. in.Consumed()
  2196. }
  2197. in.Skip()
  2198. return
  2199. }
  2200. in.Delim('{')
  2201. for !in.IsDelim('}') {
  2202. key := in.UnsafeFieldName(false)
  2203. in.WantColon()
  2204. if in.IsNull() {
  2205. in.Skip()
  2206. in.WantComma()
  2207. continue
  2208. }
  2209. switch key {
  2210. case "left":
  2211. out.Left = int64(in.Int64())
  2212. case "top":
  2213. out.Top = int64(in.Int64())
  2214. case "width":
  2215. out.Width = int64(in.Int64())
  2216. case "height":
  2217. out.Height = int64(in.Int64())
  2218. case "windowState":
  2219. (out.WindowState).UnmarshalEasyJSON(in)
  2220. default:
  2221. in.SkipRecursive()
  2222. }
  2223. in.WantComma()
  2224. }
  2225. in.Delim('}')
  2226. if isTopLevel {
  2227. in.Consumed()
  2228. }
  2229. }
  2230. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser28(out *jwriter.Writer, in Bounds) {
  2231. out.RawByte('{')
  2232. first := true
  2233. _ = first
  2234. if in.Left != 0 {
  2235. const prefix string = ",\"left\":"
  2236. first = false
  2237. out.RawString(prefix[1:])
  2238. out.Int64(int64(in.Left))
  2239. }
  2240. if in.Top != 0 {
  2241. const prefix string = ",\"top\":"
  2242. if first {
  2243. first = false
  2244. out.RawString(prefix[1:])
  2245. } else {
  2246. out.RawString(prefix)
  2247. }
  2248. out.Int64(int64(in.Top))
  2249. }
  2250. if in.Width != 0 {
  2251. const prefix string = ",\"width\":"
  2252. if first {
  2253. first = false
  2254. out.RawString(prefix[1:])
  2255. } else {
  2256. out.RawString(prefix)
  2257. }
  2258. out.Int64(int64(in.Width))
  2259. }
  2260. if in.Height != 0 {
  2261. const prefix string = ",\"height\":"
  2262. if first {
  2263. first = false
  2264. out.RawString(prefix[1:])
  2265. } else {
  2266. out.RawString(prefix)
  2267. }
  2268. out.Int64(int64(in.Height))
  2269. }
  2270. if in.WindowState != "" {
  2271. const prefix string = ",\"windowState\":"
  2272. if first {
  2273. first = false
  2274. out.RawString(prefix[1:])
  2275. } else {
  2276. out.RawString(prefix)
  2277. }
  2278. (in.WindowState).MarshalEasyJSON(out)
  2279. }
  2280. out.RawByte('}')
  2281. }
  2282. // MarshalJSON supports json.Marshaler interface
  2283. func (v Bounds) MarshalJSON() ([]byte, error) {
  2284. w := jwriter.Writer{}
  2285. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser28(&w, v)
  2286. return w.Buffer.BuildBytes(), w.Error
  2287. }
  2288. // MarshalEasyJSON supports easyjson.Marshaler interface
  2289. func (v Bounds) MarshalEasyJSON(w *jwriter.Writer) {
  2290. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser28(w, v)
  2291. }
  2292. // UnmarshalJSON supports json.Unmarshaler interface
  2293. func (v *Bounds) UnmarshalJSON(data []byte) error {
  2294. r := jlexer.Lexer{Data: data}
  2295. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser28(&r, v)
  2296. return r.Error()
  2297. }
  2298. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2299. func (v *Bounds) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2300. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser28(l, v)
  2301. }
  2302. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser29(in *jlexer.Lexer, out *AddPrivacySandboxEnrollmentOverrideParams) {
  2303. isTopLevel := in.IsStart()
  2304. if in.IsNull() {
  2305. if isTopLevel {
  2306. in.Consumed()
  2307. }
  2308. in.Skip()
  2309. return
  2310. }
  2311. in.Delim('{')
  2312. for !in.IsDelim('}') {
  2313. key := in.UnsafeFieldName(false)
  2314. in.WantColon()
  2315. if in.IsNull() {
  2316. in.Skip()
  2317. in.WantComma()
  2318. continue
  2319. }
  2320. switch key {
  2321. case "url":
  2322. out.URL = string(in.String())
  2323. default:
  2324. in.SkipRecursive()
  2325. }
  2326. in.WantComma()
  2327. }
  2328. in.Delim('}')
  2329. if isTopLevel {
  2330. in.Consumed()
  2331. }
  2332. }
  2333. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser29(out *jwriter.Writer, in AddPrivacySandboxEnrollmentOverrideParams) {
  2334. out.RawByte('{')
  2335. first := true
  2336. _ = first
  2337. {
  2338. const prefix string = ",\"url\":"
  2339. out.RawString(prefix[1:])
  2340. out.String(string(in.URL))
  2341. }
  2342. out.RawByte('}')
  2343. }
  2344. // MarshalJSON supports json.Marshaler interface
  2345. func (v AddPrivacySandboxEnrollmentOverrideParams) MarshalJSON() ([]byte, error) {
  2346. w := jwriter.Writer{}
  2347. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser29(&w, v)
  2348. return w.Buffer.BuildBytes(), w.Error
  2349. }
  2350. // MarshalEasyJSON supports easyjson.Marshaler interface
  2351. func (v AddPrivacySandboxEnrollmentOverrideParams) MarshalEasyJSON(w *jwriter.Writer) {
  2352. easyjsonC5a4559bEncodeGithubComChromedpCdprotoBrowser29(w, v)
  2353. }
  2354. // UnmarshalJSON supports json.Unmarshaler interface
  2355. func (v *AddPrivacySandboxEnrollmentOverrideParams) UnmarshalJSON(data []byte) error {
  2356. r := jlexer.Lexer{Data: data}
  2357. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser29(&r, v)
  2358. return r.Error()
  2359. }
  2360. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  2361. func (v *AddPrivacySandboxEnrollmentOverrideParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  2362. easyjsonC5a4559bDecodeGithubComChromedpCdprotoBrowser29(l, v)
  2363. }