easyjson.go 41 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package fetch
  3. import (
  4. json "encoding/json"
  5. io "github.com/chromedp/cdproto/io"
  6. network "github.com/chromedp/cdproto/network"
  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 easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch(in *jlexer.Lexer, out *TakeResponseBodyAsStreamReturns) {
  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 "stream":
  38. out.Stream = io.StreamHandle(in.String())
  39. default:
  40. in.SkipRecursive()
  41. }
  42. in.WantComma()
  43. }
  44. in.Delim('}')
  45. if isTopLevel {
  46. in.Consumed()
  47. }
  48. }
  49. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch(out *jwriter.Writer, in TakeResponseBodyAsStreamReturns) {
  50. out.RawByte('{')
  51. first := true
  52. _ = first
  53. if in.Stream != "" {
  54. const prefix string = ",\"stream\":"
  55. first = false
  56. out.RawString(prefix[1:])
  57. out.String(string(in.Stream))
  58. }
  59. out.RawByte('}')
  60. }
  61. // MarshalJSON supports json.Marshaler interface
  62. func (v TakeResponseBodyAsStreamReturns) MarshalJSON() ([]byte, error) {
  63. w := jwriter.Writer{}
  64. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch(&w, v)
  65. return w.Buffer.BuildBytes(), w.Error
  66. }
  67. // MarshalEasyJSON supports easyjson.Marshaler interface
  68. func (v TakeResponseBodyAsStreamReturns) MarshalEasyJSON(w *jwriter.Writer) {
  69. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch(w, v)
  70. }
  71. // UnmarshalJSON supports json.Unmarshaler interface
  72. func (v *TakeResponseBodyAsStreamReturns) UnmarshalJSON(data []byte) error {
  73. r := jlexer.Lexer{Data: data}
  74. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch(&r, v)
  75. return r.Error()
  76. }
  77. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  78. func (v *TakeResponseBodyAsStreamReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  79. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch(l, v)
  80. }
  81. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch1(in *jlexer.Lexer, out *TakeResponseBodyAsStreamParams) {
  82. isTopLevel := in.IsStart()
  83. if in.IsNull() {
  84. if isTopLevel {
  85. in.Consumed()
  86. }
  87. in.Skip()
  88. return
  89. }
  90. in.Delim('{')
  91. for !in.IsDelim('}') {
  92. key := in.UnsafeFieldName(false)
  93. in.WantColon()
  94. if in.IsNull() {
  95. in.Skip()
  96. in.WantComma()
  97. continue
  98. }
  99. switch key {
  100. case "requestId":
  101. out.RequestID = RequestID(in.String())
  102. default:
  103. in.SkipRecursive()
  104. }
  105. in.WantComma()
  106. }
  107. in.Delim('}')
  108. if isTopLevel {
  109. in.Consumed()
  110. }
  111. }
  112. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch1(out *jwriter.Writer, in TakeResponseBodyAsStreamParams) {
  113. out.RawByte('{')
  114. first := true
  115. _ = first
  116. {
  117. const prefix string = ",\"requestId\":"
  118. out.RawString(prefix[1:])
  119. out.String(string(in.RequestID))
  120. }
  121. out.RawByte('}')
  122. }
  123. // MarshalJSON supports json.Marshaler interface
  124. func (v TakeResponseBodyAsStreamParams) MarshalJSON() ([]byte, error) {
  125. w := jwriter.Writer{}
  126. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch1(&w, v)
  127. return w.Buffer.BuildBytes(), w.Error
  128. }
  129. // MarshalEasyJSON supports easyjson.Marshaler interface
  130. func (v TakeResponseBodyAsStreamParams) MarshalEasyJSON(w *jwriter.Writer) {
  131. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch1(w, v)
  132. }
  133. // UnmarshalJSON supports json.Unmarshaler interface
  134. func (v *TakeResponseBodyAsStreamParams) UnmarshalJSON(data []byte) error {
  135. r := jlexer.Lexer{Data: data}
  136. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch1(&r, v)
  137. return r.Error()
  138. }
  139. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  140. func (v *TakeResponseBodyAsStreamParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  141. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch1(l, v)
  142. }
  143. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch2(in *jlexer.Lexer, out *RequestPattern) {
  144. isTopLevel := in.IsStart()
  145. if in.IsNull() {
  146. if isTopLevel {
  147. in.Consumed()
  148. }
  149. in.Skip()
  150. return
  151. }
  152. in.Delim('{')
  153. for !in.IsDelim('}') {
  154. key := in.UnsafeFieldName(false)
  155. in.WantColon()
  156. if in.IsNull() {
  157. in.Skip()
  158. in.WantComma()
  159. continue
  160. }
  161. switch key {
  162. case "urlPattern":
  163. out.URLPattern = string(in.String())
  164. case "resourceType":
  165. (out.ResourceType).UnmarshalEasyJSON(in)
  166. case "requestStage":
  167. (out.RequestStage).UnmarshalEasyJSON(in)
  168. default:
  169. in.SkipRecursive()
  170. }
  171. in.WantComma()
  172. }
  173. in.Delim('}')
  174. if isTopLevel {
  175. in.Consumed()
  176. }
  177. }
  178. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch2(out *jwriter.Writer, in RequestPattern) {
  179. out.RawByte('{')
  180. first := true
  181. _ = first
  182. if in.URLPattern != "" {
  183. const prefix string = ",\"urlPattern\":"
  184. first = false
  185. out.RawString(prefix[1:])
  186. out.String(string(in.URLPattern))
  187. }
  188. if in.ResourceType != "" {
  189. const prefix string = ",\"resourceType\":"
  190. if first {
  191. first = false
  192. out.RawString(prefix[1:])
  193. } else {
  194. out.RawString(prefix)
  195. }
  196. (in.ResourceType).MarshalEasyJSON(out)
  197. }
  198. if in.RequestStage != "" {
  199. const prefix string = ",\"requestStage\":"
  200. if first {
  201. first = false
  202. out.RawString(prefix[1:])
  203. } else {
  204. out.RawString(prefix)
  205. }
  206. (in.RequestStage).MarshalEasyJSON(out)
  207. }
  208. out.RawByte('}')
  209. }
  210. // MarshalJSON supports json.Marshaler interface
  211. func (v RequestPattern) MarshalJSON() ([]byte, error) {
  212. w := jwriter.Writer{}
  213. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch2(&w, v)
  214. return w.Buffer.BuildBytes(), w.Error
  215. }
  216. // MarshalEasyJSON supports easyjson.Marshaler interface
  217. func (v RequestPattern) MarshalEasyJSON(w *jwriter.Writer) {
  218. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch2(w, v)
  219. }
  220. // UnmarshalJSON supports json.Unmarshaler interface
  221. func (v *RequestPattern) UnmarshalJSON(data []byte) error {
  222. r := jlexer.Lexer{Data: data}
  223. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch2(&r, v)
  224. return r.Error()
  225. }
  226. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  227. func (v *RequestPattern) UnmarshalEasyJSON(l *jlexer.Lexer) {
  228. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch2(l, v)
  229. }
  230. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch3(in *jlexer.Lexer, out *HeaderEntry) {
  231. isTopLevel := in.IsStart()
  232. if in.IsNull() {
  233. if isTopLevel {
  234. in.Consumed()
  235. }
  236. in.Skip()
  237. return
  238. }
  239. in.Delim('{')
  240. for !in.IsDelim('}') {
  241. key := in.UnsafeFieldName(false)
  242. in.WantColon()
  243. if in.IsNull() {
  244. in.Skip()
  245. in.WantComma()
  246. continue
  247. }
  248. switch key {
  249. case "name":
  250. out.Name = string(in.String())
  251. case "value":
  252. out.Value = string(in.String())
  253. default:
  254. in.SkipRecursive()
  255. }
  256. in.WantComma()
  257. }
  258. in.Delim('}')
  259. if isTopLevel {
  260. in.Consumed()
  261. }
  262. }
  263. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch3(out *jwriter.Writer, in HeaderEntry) {
  264. out.RawByte('{')
  265. first := true
  266. _ = first
  267. {
  268. const prefix string = ",\"name\":"
  269. out.RawString(prefix[1:])
  270. out.String(string(in.Name))
  271. }
  272. {
  273. const prefix string = ",\"value\":"
  274. out.RawString(prefix)
  275. out.String(string(in.Value))
  276. }
  277. out.RawByte('}')
  278. }
  279. // MarshalJSON supports json.Marshaler interface
  280. func (v HeaderEntry) MarshalJSON() ([]byte, error) {
  281. w := jwriter.Writer{}
  282. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch3(&w, v)
  283. return w.Buffer.BuildBytes(), w.Error
  284. }
  285. // MarshalEasyJSON supports easyjson.Marshaler interface
  286. func (v HeaderEntry) MarshalEasyJSON(w *jwriter.Writer) {
  287. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch3(w, v)
  288. }
  289. // UnmarshalJSON supports json.Unmarshaler interface
  290. func (v *HeaderEntry) UnmarshalJSON(data []byte) error {
  291. r := jlexer.Lexer{Data: data}
  292. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch3(&r, v)
  293. return r.Error()
  294. }
  295. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  296. func (v *HeaderEntry) UnmarshalEasyJSON(l *jlexer.Lexer) {
  297. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch3(l, v)
  298. }
  299. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch4(in *jlexer.Lexer, out *GetResponseBodyReturns) {
  300. isTopLevel := in.IsStart()
  301. if in.IsNull() {
  302. if isTopLevel {
  303. in.Consumed()
  304. }
  305. in.Skip()
  306. return
  307. }
  308. in.Delim('{')
  309. for !in.IsDelim('}') {
  310. key := in.UnsafeFieldName(false)
  311. in.WantColon()
  312. if in.IsNull() {
  313. in.Skip()
  314. in.WantComma()
  315. continue
  316. }
  317. switch key {
  318. case "body":
  319. out.Body = string(in.String())
  320. case "base64Encoded":
  321. out.Base64encoded = bool(in.Bool())
  322. default:
  323. in.SkipRecursive()
  324. }
  325. in.WantComma()
  326. }
  327. in.Delim('}')
  328. if isTopLevel {
  329. in.Consumed()
  330. }
  331. }
  332. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch4(out *jwriter.Writer, in GetResponseBodyReturns) {
  333. out.RawByte('{')
  334. first := true
  335. _ = first
  336. if in.Body != "" {
  337. const prefix string = ",\"body\":"
  338. first = false
  339. out.RawString(prefix[1:])
  340. out.String(string(in.Body))
  341. }
  342. if in.Base64encoded {
  343. const prefix string = ",\"base64Encoded\":"
  344. if first {
  345. first = false
  346. out.RawString(prefix[1:])
  347. } else {
  348. out.RawString(prefix)
  349. }
  350. out.Bool(bool(in.Base64encoded))
  351. }
  352. out.RawByte('}')
  353. }
  354. // MarshalJSON supports json.Marshaler interface
  355. func (v GetResponseBodyReturns) MarshalJSON() ([]byte, error) {
  356. w := jwriter.Writer{}
  357. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch4(&w, v)
  358. return w.Buffer.BuildBytes(), w.Error
  359. }
  360. // MarshalEasyJSON supports easyjson.Marshaler interface
  361. func (v GetResponseBodyReturns) MarshalEasyJSON(w *jwriter.Writer) {
  362. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch4(w, v)
  363. }
  364. // UnmarshalJSON supports json.Unmarshaler interface
  365. func (v *GetResponseBodyReturns) UnmarshalJSON(data []byte) error {
  366. r := jlexer.Lexer{Data: data}
  367. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch4(&r, v)
  368. return r.Error()
  369. }
  370. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  371. func (v *GetResponseBodyReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  372. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch4(l, v)
  373. }
  374. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch5(in *jlexer.Lexer, out *GetResponseBodyParams) {
  375. isTopLevel := in.IsStart()
  376. if in.IsNull() {
  377. if isTopLevel {
  378. in.Consumed()
  379. }
  380. in.Skip()
  381. return
  382. }
  383. in.Delim('{')
  384. for !in.IsDelim('}') {
  385. key := in.UnsafeFieldName(false)
  386. in.WantColon()
  387. if in.IsNull() {
  388. in.Skip()
  389. in.WantComma()
  390. continue
  391. }
  392. switch key {
  393. case "requestId":
  394. out.RequestID = RequestID(in.String())
  395. default:
  396. in.SkipRecursive()
  397. }
  398. in.WantComma()
  399. }
  400. in.Delim('}')
  401. if isTopLevel {
  402. in.Consumed()
  403. }
  404. }
  405. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch5(out *jwriter.Writer, in GetResponseBodyParams) {
  406. out.RawByte('{')
  407. first := true
  408. _ = first
  409. {
  410. const prefix string = ",\"requestId\":"
  411. out.RawString(prefix[1:])
  412. out.String(string(in.RequestID))
  413. }
  414. out.RawByte('}')
  415. }
  416. // MarshalJSON supports json.Marshaler interface
  417. func (v GetResponseBodyParams) MarshalJSON() ([]byte, error) {
  418. w := jwriter.Writer{}
  419. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch5(&w, v)
  420. return w.Buffer.BuildBytes(), w.Error
  421. }
  422. // MarshalEasyJSON supports easyjson.Marshaler interface
  423. func (v GetResponseBodyParams) MarshalEasyJSON(w *jwriter.Writer) {
  424. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch5(w, v)
  425. }
  426. // UnmarshalJSON supports json.Unmarshaler interface
  427. func (v *GetResponseBodyParams) UnmarshalJSON(data []byte) error {
  428. r := jlexer.Lexer{Data: data}
  429. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch5(&r, v)
  430. return r.Error()
  431. }
  432. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  433. func (v *GetResponseBodyParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  434. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch5(l, v)
  435. }
  436. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch6(in *jlexer.Lexer, out *FulfillRequestParams) {
  437. isTopLevel := in.IsStart()
  438. if in.IsNull() {
  439. if isTopLevel {
  440. in.Consumed()
  441. }
  442. in.Skip()
  443. return
  444. }
  445. in.Delim('{')
  446. for !in.IsDelim('}') {
  447. key := in.UnsafeFieldName(false)
  448. in.WantColon()
  449. if in.IsNull() {
  450. in.Skip()
  451. in.WantComma()
  452. continue
  453. }
  454. switch key {
  455. case "requestId":
  456. out.RequestID = RequestID(in.String())
  457. case "responseCode":
  458. out.ResponseCode = int64(in.Int64())
  459. case "responseHeaders":
  460. if in.IsNull() {
  461. in.Skip()
  462. out.ResponseHeaders = nil
  463. } else {
  464. in.Delim('[')
  465. if out.ResponseHeaders == nil {
  466. if !in.IsDelim(']') {
  467. out.ResponseHeaders = make([]*HeaderEntry, 0, 8)
  468. } else {
  469. out.ResponseHeaders = []*HeaderEntry{}
  470. }
  471. } else {
  472. out.ResponseHeaders = (out.ResponseHeaders)[:0]
  473. }
  474. for !in.IsDelim(']') {
  475. var v1 *HeaderEntry
  476. if in.IsNull() {
  477. in.Skip()
  478. v1 = nil
  479. } else {
  480. if v1 == nil {
  481. v1 = new(HeaderEntry)
  482. }
  483. (*v1).UnmarshalEasyJSON(in)
  484. }
  485. out.ResponseHeaders = append(out.ResponseHeaders, v1)
  486. in.WantComma()
  487. }
  488. in.Delim(']')
  489. }
  490. case "binaryResponseHeaders":
  491. out.BinaryResponseHeaders = string(in.String())
  492. case "body":
  493. out.Body = string(in.String())
  494. case "responsePhrase":
  495. out.ResponsePhrase = string(in.String())
  496. default:
  497. in.SkipRecursive()
  498. }
  499. in.WantComma()
  500. }
  501. in.Delim('}')
  502. if isTopLevel {
  503. in.Consumed()
  504. }
  505. }
  506. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch6(out *jwriter.Writer, in FulfillRequestParams) {
  507. out.RawByte('{')
  508. first := true
  509. _ = first
  510. {
  511. const prefix string = ",\"requestId\":"
  512. out.RawString(prefix[1:])
  513. out.String(string(in.RequestID))
  514. }
  515. {
  516. const prefix string = ",\"responseCode\":"
  517. out.RawString(prefix)
  518. out.Int64(int64(in.ResponseCode))
  519. }
  520. if len(in.ResponseHeaders) != 0 {
  521. const prefix string = ",\"responseHeaders\":"
  522. out.RawString(prefix)
  523. {
  524. out.RawByte('[')
  525. for v2, v3 := range in.ResponseHeaders {
  526. if v2 > 0 {
  527. out.RawByte(',')
  528. }
  529. if v3 == nil {
  530. out.RawString("null")
  531. } else {
  532. (*v3).MarshalEasyJSON(out)
  533. }
  534. }
  535. out.RawByte(']')
  536. }
  537. }
  538. if in.BinaryResponseHeaders != "" {
  539. const prefix string = ",\"binaryResponseHeaders\":"
  540. out.RawString(prefix)
  541. out.String(string(in.BinaryResponseHeaders))
  542. }
  543. if in.Body != "" {
  544. const prefix string = ",\"body\":"
  545. out.RawString(prefix)
  546. out.String(string(in.Body))
  547. }
  548. if in.ResponsePhrase != "" {
  549. const prefix string = ",\"responsePhrase\":"
  550. out.RawString(prefix)
  551. out.String(string(in.ResponsePhrase))
  552. }
  553. out.RawByte('}')
  554. }
  555. // MarshalJSON supports json.Marshaler interface
  556. func (v FulfillRequestParams) MarshalJSON() ([]byte, error) {
  557. w := jwriter.Writer{}
  558. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch6(&w, v)
  559. return w.Buffer.BuildBytes(), w.Error
  560. }
  561. // MarshalEasyJSON supports easyjson.Marshaler interface
  562. func (v FulfillRequestParams) MarshalEasyJSON(w *jwriter.Writer) {
  563. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch6(w, v)
  564. }
  565. // UnmarshalJSON supports json.Unmarshaler interface
  566. func (v *FulfillRequestParams) UnmarshalJSON(data []byte) error {
  567. r := jlexer.Lexer{Data: data}
  568. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch6(&r, v)
  569. return r.Error()
  570. }
  571. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  572. func (v *FulfillRequestParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  573. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch6(l, v)
  574. }
  575. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch7(in *jlexer.Lexer, out *FailRequestParams) {
  576. isTopLevel := in.IsStart()
  577. if in.IsNull() {
  578. if isTopLevel {
  579. in.Consumed()
  580. }
  581. in.Skip()
  582. return
  583. }
  584. in.Delim('{')
  585. for !in.IsDelim('}') {
  586. key := in.UnsafeFieldName(false)
  587. in.WantColon()
  588. if in.IsNull() {
  589. in.Skip()
  590. in.WantComma()
  591. continue
  592. }
  593. switch key {
  594. case "requestId":
  595. out.RequestID = RequestID(in.String())
  596. case "errorReason":
  597. (out.ErrorReason).UnmarshalEasyJSON(in)
  598. default:
  599. in.SkipRecursive()
  600. }
  601. in.WantComma()
  602. }
  603. in.Delim('}')
  604. if isTopLevel {
  605. in.Consumed()
  606. }
  607. }
  608. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch7(out *jwriter.Writer, in FailRequestParams) {
  609. out.RawByte('{')
  610. first := true
  611. _ = first
  612. {
  613. const prefix string = ",\"requestId\":"
  614. out.RawString(prefix[1:])
  615. out.String(string(in.RequestID))
  616. }
  617. {
  618. const prefix string = ",\"errorReason\":"
  619. out.RawString(prefix)
  620. (in.ErrorReason).MarshalEasyJSON(out)
  621. }
  622. out.RawByte('}')
  623. }
  624. // MarshalJSON supports json.Marshaler interface
  625. func (v FailRequestParams) MarshalJSON() ([]byte, error) {
  626. w := jwriter.Writer{}
  627. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch7(&w, v)
  628. return w.Buffer.BuildBytes(), w.Error
  629. }
  630. // MarshalEasyJSON supports easyjson.Marshaler interface
  631. func (v FailRequestParams) MarshalEasyJSON(w *jwriter.Writer) {
  632. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch7(w, v)
  633. }
  634. // UnmarshalJSON supports json.Unmarshaler interface
  635. func (v *FailRequestParams) UnmarshalJSON(data []byte) error {
  636. r := jlexer.Lexer{Data: data}
  637. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch7(&r, v)
  638. return r.Error()
  639. }
  640. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  641. func (v *FailRequestParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  642. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch7(l, v)
  643. }
  644. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch8(in *jlexer.Lexer, out *EventRequestPaused) {
  645. isTopLevel := in.IsStart()
  646. if in.IsNull() {
  647. if isTopLevel {
  648. in.Consumed()
  649. }
  650. in.Skip()
  651. return
  652. }
  653. in.Delim('{')
  654. for !in.IsDelim('}') {
  655. key := in.UnsafeFieldName(false)
  656. in.WantColon()
  657. if in.IsNull() {
  658. in.Skip()
  659. in.WantComma()
  660. continue
  661. }
  662. switch key {
  663. case "requestId":
  664. out.RequestID = RequestID(in.String())
  665. case "request":
  666. if in.IsNull() {
  667. in.Skip()
  668. out.Request = nil
  669. } else {
  670. if out.Request == nil {
  671. out.Request = new(network.Request)
  672. }
  673. (*out.Request).UnmarshalEasyJSON(in)
  674. }
  675. case "frameId":
  676. (out.FrameID).UnmarshalEasyJSON(in)
  677. case "resourceType":
  678. (out.ResourceType).UnmarshalEasyJSON(in)
  679. case "responseErrorReason":
  680. (out.ResponseErrorReason).UnmarshalEasyJSON(in)
  681. case "responseStatusCode":
  682. out.ResponseStatusCode = int64(in.Int64())
  683. case "responseStatusText":
  684. out.ResponseStatusText = string(in.String())
  685. case "responseHeaders":
  686. if in.IsNull() {
  687. in.Skip()
  688. out.ResponseHeaders = nil
  689. } else {
  690. in.Delim('[')
  691. if out.ResponseHeaders == nil {
  692. if !in.IsDelim(']') {
  693. out.ResponseHeaders = make([]*HeaderEntry, 0, 8)
  694. } else {
  695. out.ResponseHeaders = []*HeaderEntry{}
  696. }
  697. } else {
  698. out.ResponseHeaders = (out.ResponseHeaders)[:0]
  699. }
  700. for !in.IsDelim(']') {
  701. var v4 *HeaderEntry
  702. if in.IsNull() {
  703. in.Skip()
  704. v4 = nil
  705. } else {
  706. if v4 == nil {
  707. v4 = new(HeaderEntry)
  708. }
  709. (*v4).UnmarshalEasyJSON(in)
  710. }
  711. out.ResponseHeaders = append(out.ResponseHeaders, v4)
  712. in.WantComma()
  713. }
  714. in.Delim(']')
  715. }
  716. case "networkId":
  717. out.NetworkID = network.RequestID(in.String())
  718. case "redirectedRequestId":
  719. out.RedirectedRequestID = RequestID(in.String())
  720. default:
  721. in.SkipRecursive()
  722. }
  723. in.WantComma()
  724. }
  725. in.Delim('}')
  726. if isTopLevel {
  727. in.Consumed()
  728. }
  729. }
  730. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch8(out *jwriter.Writer, in EventRequestPaused) {
  731. out.RawByte('{')
  732. first := true
  733. _ = first
  734. {
  735. const prefix string = ",\"requestId\":"
  736. out.RawString(prefix[1:])
  737. out.String(string(in.RequestID))
  738. }
  739. {
  740. const prefix string = ",\"request\":"
  741. out.RawString(prefix)
  742. if in.Request == nil {
  743. out.RawString("null")
  744. } else {
  745. (*in.Request).MarshalEasyJSON(out)
  746. }
  747. }
  748. {
  749. const prefix string = ",\"frameId\":"
  750. out.RawString(prefix)
  751. out.String(string(in.FrameID))
  752. }
  753. {
  754. const prefix string = ",\"resourceType\":"
  755. out.RawString(prefix)
  756. (in.ResourceType).MarshalEasyJSON(out)
  757. }
  758. if in.ResponseErrorReason != "" {
  759. const prefix string = ",\"responseErrorReason\":"
  760. out.RawString(prefix)
  761. (in.ResponseErrorReason).MarshalEasyJSON(out)
  762. }
  763. if in.ResponseStatusCode != 0 {
  764. const prefix string = ",\"responseStatusCode\":"
  765. out.RawString(prefix)
  766. out.Int64(int64(in.ResponseStatusCode))
  767. }
  768. if in.ResponseStatusText != "" {
  769. const prefix string = ",\"responseStatusText\":"
  770. out.RawString(prefix)
  771. out.String(string(in.ResponseStatusText))
  772. }
  773. if len(in.ResponseHeaders) != 0 {
  774. const prefix string = ",\"responseHeaders\":"
  775. out.RawString(prefix)
  776. {
  777. out.RawByte('[')
  778. for v5, v6 := range in.ResponseHeaders {
  779. if v5 > 0 {
  780. out.RawByte(',')
  781. }
  782. if v6 == nil {
  783. out.RawString("null")
  784. } else {
  785. (*v6).MarshalEasyJSON(out)
  786. }
  787. }
  788. out.RawByte(']')
  789. }
  790. }
  791. if in.NetworkID != "" {
  792. const prefix string = ",\"networkId\":"
  793. out.RawString(prefix)
  794. out.String(string(in.NetworkID))
  795. }
  796. if in.RedirectedRequestID != "" {
  797. const prefix string = ",\"redirectedRequestId\":"
  798. out.RawString(prefix)
  799. out.String(string(in.RedirectedRequestID))
  800. }
  801. out.RawByte('}')
  802. }
  803. // MarshalJSON supports json.Marshaler interface
  804. func (v EventRequestPaused) MarshalJSON() ([]byte, error) {
  805. w := jwriter.Writer{}
  806. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch8(&w, v)
  807. return w.Buffer.BuildBytes(), w.Error
  808. }
  809. // MarshalEasyJSON supports easyjson.Marshaler interface
  810. func (v EventRequestPaused) MarshalEasyJSON(w *jwriter.Writer) {
  811. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch8(w, v)
  812. }
  813. // UnmarshalJSON supports json.Unmarshaler interface
  814. func (v *EventRequestPaused) UnmarshalJSON(data []byte) error {
  815. r := jlexer.Lexer{Data: data}
  816. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch8(&r, v)
  817. return r.Error()
  818. }
  819. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  820. func (v *EventRequestPaused) UnmarshalEasyJSON(l *jlexer.Lexer) {
  821. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch8(l, v)
  822. }
  823. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch9(in *jlexer.Lexer, out *EventAuthRequired) {
  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 "requestId":
  843. out.RequestID = RequestID(in.String())
  844. case "request":
  845. if in.IsNull() {
  846. in.Skip()
  847. out.Request = nil
  848. } else {
  849. if out.Request == nil {
  850. out.Request = new(network.Request)
  851. }
  852. (*out.Request).UnmarshalEasyJSON(in)
  853. }
  854. case "frameId":
  855. (out.FrameID).UnmarshalEasyJSON(in)
  856. case "resourceType":
  857. (out.ResourceType).UnmarshalEasyJSON(in)
  858. case "authChallenge":
  859. if in.IsNull() {
  860. in.Skip()
  861. out.AuthChallenge = nil
  862. } else {
  863. if out.AuthChallenge == nil {
  864. out.AuthChallenge = new(AuthChallenge)
  865. }
  866. (*out.AuthChallenge).UnmarshalEasyJSON(in)
  867. }
  868. default:
  869. in.SkipRecursive()
  870. }
  871. in.WantComma()
  872. }
  873. in.Delim('}')
  874. if isTopLevel {
  875. in.Consumed()
  876. }
  877. }
  878. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch9(out *jwriter.Writer, in EventAuthRequired) {
  879. out.RawByte('{')
  880. first := true
  881. _ = first
  882. {
  883. const prefix string = ",\"requestId\":"
  884. out.RawString(prefix[1:])
  885. out.String(string(in.RequestID))
  886. }
  887. {
  888. const prefix string = ",\"request\":"
  889. out.RawString(prefix)
  890. if in.Request == nil {
  891. out.RawString("null")
  892. } else {
  893. (*in.Request).MarshalEasyJSON(out)
  894. }
  895. }
  896. {
  897. const prefix string = ",\"frameId\":"
  898. out.RawString(prefix)
  899. out.String(string(in.FrameID))
  900. }
  901. {
  902. const prefix string = ",\"resourceType\":"
  903. out.RawString(prefix)
  904. (in.ResourceType).MarshalEasyJSON(out)
  905. }
  906. {
  907. const prefix string = ",\"authChallenge\":"
  908. out.RawString(prefix)
  909. if in.AuthChallenge == nil {
  910. out.RawString("null")
  911. } else {
  912. (*in.AuthChallenge).MarshalEasyJSON(out)
  913. }
  914. }
  915. out.RawByte('}')
  916. }
  917. // MarshalJSON supports json.Marshaler interface
  918. func (v EventAuthRequired) MarshalJSON() ([]byte, error) {
  919. w := jwriter.Writer{}
  920. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch9(&w, v)
  921. return w.Buffer.BuildBytes(), w.Error
  922. }
  923. // MarshalEasyJSON supports easyjson.Marshaler interface
  924. func (v EventAuthRequired) MarshalEasyJSON(w *jwriter.Writer) {
  925. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch9(w, v)
  926. }
  927. // UnmarshalJSON supports json.Unmarshaler interface
  928. func (v *EventAuthRequired) UnmarshalJSON(data []byte) error {
  929. r := jlexer.Lexer{Data: data}
  930. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch9(&r, v)
  931. return r.Error()
  932. }
  933. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  934. func (v *EventAuthRequired) UnmarshalEasyJSON(l *jlexer.Lexer) {
  935. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch9(l, v)
  936. }
  937. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch10(in *jlexer.Lexer, out *EnableParams) {
  938. isTopLevel := in.IsStart()
  939. if in.IsNull() {
  940. if isTopLevel {
  941. in.Consumed()
  942. }
  943. in.Skip()
  944. return
  945. }
  946. in.Delim('{')
  947. for !in.IsDelim('}') {
  948. key := in.UnsafeFieldName(false)
  949. in.WantColon()
  950. if in.IsNull() {
  951. in.Skip()
  952. in.WantComma()
  953. continue
  954. }
  955. switch key {
  956. case "patterns":
  957. if in.IsNull() {
  958. in.Skip()
  959. out.Patterns = nil
  960. } else {
  961. in.Delim('[')
  962. if out.Patterns == nil {
  963. if !in.IsDelim(']') {
  964. out.Patterns = make([]*RequestPattern, 0, 8)
  965. } else {
  966. out.Patterns = []*RequestPattern{}
  967. }
  968. } else {
  969. out.Patterns = (out.Patterns)[:0]
  970. }
  971. for !in.IsDelim(']') {
  972. var v7 *RequestPattern
  973. if in.IsNull() {
  974. in.Skip()
  975. v7 = nil
  976. } else {
  977. if v7 == nil {
  978. v7 = new(RequestPattern)
  979. }
  980. (*v7).UnmarshalEasyJSON(in)
  981. }
  982. out.Patterns = append(out.Patterns, v7)
  983. in.WantComma()
  984. }
  985. in.Delim(']')
  986. }
  987. case "handleAuthRequests":
  988. out.HandleAuthRequests = bool(in.Bool())
  989. default:
  990. in.SkipRecursive()
  991. }
  992. in.WantComma()
  993. }
  994. in.Delim('}')
  995. if isTopLevel {
  996. in.Consumed()
  997. }
  998. }
  999. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch10(out *jwriter.Writer, in EnableParams) {
  1000. out.RawByte('{')
  1001. first := true
  1002. _ = first
  1003. if len(in.Patterns) != 0 {
  1004. const prefix string = ",\"patterns\":"
  1005. first = false
  1006. out.RawString(prefix[1:])
  1007. {
  1008. out.RawByte('[')
  1009. for v8, v9 := range in.Patterns {
  1010. if v8 > 0 {
  1011. out.RawByte(',')
  1012. }
  1013. if v9 == nil {
  1014. out.RawString("null")
  1015. } else {
  1016. (*v9).MarshalEasyJSON(out)
  1017. }
  1018. }
  1019. out.RawByte(']')
  1020. }
  1021. }
  1022. if in.HandleAuthRequests {
  1023. const prefix string = ",\"handleAuthRequests\":"
  1024. if first {
  1025. first = false
  1026. out.RawString(prefix[1:])
  1027. } else {
  1028. out.RawString(prefix)
  1029. }
  1030. out.Bool(bool(in.HandleAuthRequests))
  1031. }
  1032. out.RawByte('}')
  1033. }
  1034. // MarshalJSON supports json.Marshaler interface
  1035. func (v EnableParams) MarshalJSON() ([]byte, error) {
  1036. w := jwriter.Writer{}
  1037. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch10(&w, v)
  1038. return w.Buffer.BuildBytes(), w.Error
  1039. }
  1040. // MarshalEasyJSON supports easyjson.Marshaler interface
  1041. func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
  1042. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch10(w, v)
  1043. }
  1044. // UnmarshalJSON supports json.Unmarshaler interface
  1045. func (v *EnableParams) UnmarshalJSON(data []byte) error {
  1046. r := jlexer.Lexer{Data: data}
  1047. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch10(&r, v)
  1048. return r.Error()
  1049. }
  1050. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1051. func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1052. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch10(l, v)
  1053. }
  1054. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch11(in *jlexer.Lexer, out *DisableParams) {
  1055. isTopLevel := in.IsStart()
  1056. if in.IsNull() {
  1057. if isTopLevel {
  1058. in.Consumed()
  1059. }
  1060. in.Skip()
  1061. return
  1062. }
  1063. in.Delim('{')
  1064. for !in.IsDelim('}') {
  1065. key := in.UnsafeFieldName(false)
  1066. in.WantColon()
  1067. if in.IsNull() {
  1068. in.Skip()
  1069. in.WantComma()
  1070. continue
  1071. }
  1072. switch key {
  1073. default:
  1074. in.SkipRecursive()
  1075. }
  1076. in.WantComma()
  1077. }
  1078. in.Delim('}')
  1079. if isTopLevel {
  1080. in.Consumed()
  1081. }
  1082. }
  1083. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch11(out *jwriter.Writer, in DisableParams) {
  1084. out.RawByte('{')
  1085. first := true
  1086. _ = first
  1087. out.RawByte('}')
  1088. }
  1089. // MarshalJSON supports json.Marshaler interface
  1090. func (v DisableParams) MarshalJSON() ([]byte, error) {
  1091. w := jwriter.Writer{}
  1092. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch11(&w, v)
  1093. return w.Buffer.BuildBytes(), w.Error
  1094. }
  1095. // MarshalEasyJSON supports easyjson.Marshaler interface
  1096. func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
  1097. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch11(w, v)
  1098. }
  1099. // UnmarshalJSON supports json.Unmarshaler interface
  1100. func (v *DisableParams) UnmarshalJSON(data []byte) error {
  1101. r := jlexer.Lexer{Data: data}
  1102. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch11(&r, v)
  1103. return r.Error()
  1104. }
  1105. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1106. func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1107. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch11(l, v)
  1108. }
  1109. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch12(in *jlexer.Lexer, out *ContinueWithAuthParams) {
  1110. isTopLevel := in.IsStart()
  1111. if in.IsNull() {
  1112. if isTopLevel {
  1113. in.Consumed()
  1114. }
  1115. in.Skip()
  1116. return
  1117. }
  1118. in.Delim('{')
  1119. for !in.IsDelim('}') {
  1120. key := in.UnsafeFieldName(false)
  1121. in.WantColon()
  1122. if in.IsNull() {
  1123. in.Skip()
  1124. in.WantComma()
  1125. continue
  1126. }
  1127. switch key {
  1128. case "requestId":
  1129. out.RequestID = RequestID(in.String())
  1130. case "authChallengeResponse":
  1131. if in.IsNull() {
  1132. in.Skip()
  1133. out.AuthChallengeResponse = nil
  1134. } else {
  1135. if out.AuthChallengeResponse == nil {
  1136. out.AuthChallengeResponse = new(AuthChallengeResponse)
  1137. }
  1138. (*out.AuthChallengeResponse).UnmarshalEasyJSON(in)
  1139. }
  1140. default:
  1141. in.SkipRecursive()
  1142. }
  1143. in.WantComma()
  1144. }
  1145. in.Delim('}')
  1146. if isTopLevel {
  1147. in.Consumed()
  1148. }
  1149. }
  1150. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch12(out *jwriter.Writer, in ContinueWithAuthParams) {
  1151. out.RawByte('{')
  1152. first := true
  1153. _ = first
  1154. {
  1155. const prefix string = ",\"requestId\":"
  1156. out.RawString(prefix[1:])
  1157. out.String(string(in.RequestID))
  1158. }
  1159. {
  1160. const prefix string = ",\"authChallengeResponse\":"
  1161. out.RawString(prefix)
  1162. if in.AuthChallengeResponse == nil {
  1163. out.RawString("null")
  1164. } else {
  1165. (*in.AuthChallengeResponse).MarshalEasyJSON(out)
  1166. }
  1167. }
  1168. out.RawByte('}')
  1169. }
  1170. // MarshalJSON supports json.Marshaler interface
  1171. func (v ContinueWithAuthParams) MarshalJSON() ([]byte, error) {
  1172. w := jwriter.Writer{}
  1173. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch12(&w, v)
  1174. return w.Buffer.BuildBytes(), w.Error
  1175. }
  1176. // MarshalEasyJSON supports easyjson.Marshaler interface
  1177. func (v ContinueWithAuthParams) MarshalEasyJSON(w *jwriter.Writer) {
  1178. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch12(w, v)
  1179. }
  1180. // UnmarshalJSON supports json.Unmarshaler interface
  1181. func (v *ContinueWithAuthParams) UnmarshalJSON(data []byte) error {
  1182. r := jlexer.Lexer{Data: data}
  1183. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch12(&r, v)
  1184. return r.Error()
  1185. }
  1186. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1187. func (v *ContinueWithAuthParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1188. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch12(l, v)
  1189. }
  1190. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch13(in *jlexer.Lexer, out *ContinueResponseParams) {
  1191. isTopLevel := in.IsStart()
  1192. if in.IsNull() {
  1193. if isTopLevel {
  1194. in.Consumed()
  1195. }
  1196. in.Skip()
  1197. return
  1198. }
  1199. in.Delim('{')
  1200. for !in.IsDelim('}') {
  1201. key := in.UnsafeFieldName(false)
  1202. in.WantColon()
  1203. if in.IsNull() {
  1204. in.Skip()
  1205. in.WantComma()
  1206. continue
  1207. }
  1208. switch key {
  1209. case "requestId":
  1210. out.RequestID = RequestID(in.String())
  1211. case "responseCode":
  1212. out.ResponseCode = int64(in.Int64())
  1213. case "responsePhrase":
  1214. out.ResponsePhrase = string(in.String())
  1215. case "responseHeaders":
  1216. if in.IsNull() {
  1217. in.Skip()
  1218. out.ResponseHeaders = nil
  1219. } else {
  1220. in.Delim('[')
  1221. if out.ResponseHeaders == nil {
  1222. if !in.IsDelim(']') {
  1223. out.ResponseHeaders = make([]*HeaderEntry, 0, 8)
  1224. } else {
  1225. out.ResponseHeaders = []*HeaderEntry{}
  1226. }
  1227. } else {
  1228. out.ResponseHeaders = (out.ResponseHeaders)[:0]
  1229. }
  1230. for !in.IsDelim(']') {
  1231. var v10 *HeaderEntry
  1232. if in.IsNull() {
  1233. in.Skip()
  1234. v10 = nil
  1235. } else {
  1236. if v10 == nil {
  1237. v10 = new(HeaderEntry)
  1238. }
  1239. (*v10).UnmarshalEasyJSON(in)
  1240. }
  1241. out.ResponseHeaders = append(out.ResponseHeaders, v10)
  1242. in.WantComma()
  1243. }
  1244. in.Delim(']')
  1245. }
  1246. case "binaryResponseHeaders":
  1247. out.BinaryResponseHeaders = string(in.String())
  1248. default:
  1249. in.SkipRecursive()
  1250. }
  1251. in.WantComma()
  1252. }
  1253. in.Delim('}')
  1254. if isTopLevel {
  1255. in.Consumed()
  1256. }
  1257. }
  1258. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch13(out *jwriter.Writer, in ContinueResponseParams) {
  1259. out.RawByte('{')
  1260. first := true
  1261. _ = first
  1262. {
  1263. const prefix string = ",\"requestId\":"
  1264. out.RawString(prefix[1:])
  1265. out.String(string(in.RequestID))
  1266. }
  1267. if in.ResponseCode != 0 {
  1268. const prefix string = ",\"responseCode\":"
  1269. out.RawString(prefix)
  1270. out.Int64(int64(in.ResponseCode))
  1271. }
  1272. if in.ResponsePhrase != "" {
  1273. const prefix string = ",\"responsePhrase\":"
  1274. out.RawString(prefix)
  1275. out.String(string(in.ResponsePhrase))
  1276. }
  1277. if len(in.ResponseHeaders) != 0 {
  1278. const prefix string = ",\"responseHeaders\":"
  1279. out.RawString(prefix)
  1280. {
  1281. out.RawByte('[')
  1282. for v11, v12 := range in.ResponseHeaders {
  1283. if v11 > 0 {
  1284. out.RawByte(',')
  1285. }
  1286. if v12 == nil {
  1287. out.RawString("null")
  1288. } else {
  1289. (*v12).MarshalEasyJSON(out)
  1290. }
  1291. }
  1292. out.RawByte(']')
  1293. }
  1294. }
  1295. if in.BinaryResponseHeaders != "" {
  1296. const prefix string = ",\"binaryResponseHeaders\":"
  1297. out.RawString(prefix)
  1298. out.String(string(in.BinaryResponseHeaders))
  1299. }
  1300. out.RawByte('}')
  1301. }
  1302. // MarshalJSON supports json.Marshaler interface
  1303. func (v ContinueResponseParams) MarshalJSON() ([]byte, error) {
  1304. w := jwriter.Writer{}
  1305. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch13(&w, v)
  1306. return w.Buffer.BuildBytes(), w.Error
  1307. }
  1308. // MarshalEasyJSON supports easyjson.Marshaler interface
  1309. func (v ContinueResponseParams) MarshalEasyJSON(w *jwriter.Writer) {
  1310. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch13(w, v)
  1311. }
  1312. // UnmarshalJSON supports json.Unmarshaler interface
  1313. func (v *ContinueResponseParams) UnmarshalJSON(data []byte) error {
  1314. r := jlexer.Lexer{Data: data}
  1315. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch13(&r, v)
  1316. return r.Error()
  1317. }
  1318. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1319. func (v *ContinueResponseParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1320. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch13(l, v)
  1321. }
  1322. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch14(in *jlexer.Lexer, out *ContinueRequestParams) {
  1323. isTopLevel := in.IsStart()
  1324. if in.IsNull() {
  1325. if isTopLevel {
  1326. in.Consumed()
  1327. }
  1328. in.Skip()
  1329. return
  1330. }
  1331. in.Delim('{')
  1332. for !in.IsDelim('}') {
  1333. key := in.UnsafeFieldName(false)
  1334. in.WantColon()
  1335. if in.IsNull() {
  1336. in.Skip()
  1337. in.WantComma()
  1338. continue
  1339. }
  1340. switch key {
  1341. case "requestId":
  1342. out.RequestID = RequestID(in.String())
  1343. case "url":
  1344. out.URL = string(in.String())
  1345. case "method":
  1346. out.Method = string(in.String())
  1347. case "postData":
  1348. out.PostData = string(in.String())
  1349. case "headers":
  1350. if in.IsNull() {
  1351. in.Skip()
  1352. out.Headers = nil
  1353. } else {
  1354. in.Delim('[')
  1355. if out.Headers == nil {
  1356. if !in.IsDelim(']') {
  1357. out.Headers = make([]*HeaderEntry, 0, 8)
  1358. } else {
  1359. out.Headers = []*HeaderEntry{}
  1360. }
  1361. } else {
  1362. out.Headers = (out.Headers)[:0]
  1363. }
  1364. for !in.IsDelim(']') {
  1365. var v13 *HeaderEntry
  1366. if in.IsNull() {
  1367. in.Skip()
  1368. v13 = nil
  1369. } else {
  1370. if v13 == nil {
  1371. v13 = new(HeaderEntry)
  1372. }
  1373. (*v13).UnmarshalEasyJSON(in)
  1374. }
  1375. out.Headers = append(out.Headers, v13)
  1376. in.WantComma()
  1377. }
  1378. in.Delim(']')
  1379. }
  1380. case "interceptResponse":
  1381. out.InterceptResponse = bool(in.Bool())
  1382. default:
  1383. in.SkipRecursive()
  1384. }
  1385. in.WantComma()
  1386. }
  1387. in.Delim('}')
  1388. if isTopLevel {
  1389. in.Consumed()
  1390. }
  1391. }
  1392. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch14(out *jwriter.Writer, in ContinueRequestParams) {
  1393. out.RawByte('{')
  1394. first := true
  1395. _ = first
  1396. {
  1397. const prefix string = ",\"requestId\":"
  1398. out.RawString(prefix[1:])
  1399. out.String(string(in.RequestID))
  1400. }
  1401. if in.URL != "" {
  1402. const prefix string = ",\"url\":"
  1403. out.RawString(prefix)
  1404. out.String(string(in.URL))
  1405. }
  1406. if in.Method != "" {
  1407. const prefix string = ",\"method\":"
  1408. out.RawString(prefix)
  1409. out.String(string(in.Method))
  1410. }
  1411. if in.PostData != "" {
  1412. const prefix string = ",\"postData\":"
  1413. out.RawString(prefix)
  1414. out.String(string(in.PostData))
  1415. }
  1416. if len(in.Headers) != 0 {
  1417. const prefix string = ",\"headers\":"
  1418. out.RawString(prefix)
  1419. {
  1420. out.RawByte('[')
  1421. for v14, v15 := range in.Headers {
  1422. if v14 > 0 {
  1423. out.RawByte(',')
  1424. }
  1425. if v15 == nil {
  1426. out.RawString("null")
  1427. } else {
  1428. (*v15).MarshalEasyJSON(out)
  1429. }
  1430. }
  1431. out.RawByte(']')
  1432. }
  1433. }
  1434. if in.InterceptResponse {
  1435. const prefix string = ",\"interceptResponse\":"
  1436. out.RawString(prefix)
  1437. out.Bool(bool(in.InterceptResponse))
  1438. }
  1439. out.RawByte('}')
  1440. }
  1441. // MarshalJSON supports json.Marshaler interface
  1442. func (v ContinueRequestParams) MarshalJSON() ([]byte, error) {
  1443. w := jwriter.Writer{}
  1444. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch14(&w, v)
  1445. return w.Buffer.BuildBytes(), w.Error
  1446. }
  1447. // MarshalEasyJSON supports easyjson.Marshaler interface
  1448. func (v ContinueRequestParams) MarshalEasyJSON(w *jwriter.Writer) {
  1449. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch14(w, v)
  1450. }
  1451. // UnmarshalJSON supports json.Unmarshaler interface
  1452. func (v *ContinueRequestParams) UnmarshalJSON(data []byte) error {
  1453. r := jlexer.Lexer{Data: data}
  1454. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch14(&r, v)
  1455. return r.Error()
  1456. }
  1457. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1458. func (v *ContinueRequestParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1459. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch14(l, v)
  1460. }
  1461. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch15(in *jlexer.Lexer, out *AuthChallengeResponse) {
  1462. isTopLevel := in.IsStart()
  1463. if in.IsNull() {
  1464. if isTopLevel {
  1465. in.Consumed()
  1466. }
  1467. in.Skip()
  1468. return
  1469. }
  1470. in.Delim('{')
  1471. for !in.IsDelim('}') {
  1472. key := in.UnsafeFieldName(false)
  1473. in.WantColon()
  1474. if in.IsNull() {
  1475. in.Skip()
  1476. in.WantComma()
  1477. continue
  1478. }
  1479. switch key {
  1480. case "response":
  1481. (out.Response).UnmarshalEasyJSON(in)
  1482. case "username":
  1483. out.Username = string(in.String())
  1484. case "password":
  1485. out.Password = string(in.String())
  1486. default:
  1487. in.SkipRecursive()
  1488. }
  1489. in.WantComma()
  1490. }
  1491. in.Delim('}')
  1492. if isTopLevel {
  1493. in.Consumed()
  1494. }
  1495. }
  1496. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch15(out *jwriter.Writer, in AuthChallengeResponse) {
  1497. out.RawByte('{')
  1498. first := true
  1499. _ = first
  1500. {
  1501. const prefix string = ",\"response\":"
  1502. out.RawString(prefix[1:])
  1503. (in.Response).MarshalEasyJSON(out)
  1504. }
  1505. if in.Username != "" {
  1506. const prefix string = ",\"username\":"
  1507. out.RawString(prefix)
  1508. out.String(string(in.Username))
  1509. }
  1510. if in.Password != "" {
  1511. const prefix string = ",\"password\":"
  1512. out.RawString(prefix)
  1513. out.String(string(in.Password))
  1514. }
  1515. out.RawByte('}')
  1516. }
  1517. // MarshalJSON supports json.Marshaler interface
  1518. func (v AuthChallengeResponse) MarshalJSON() ([]byte, error) {
  1519. w := jwriter.Writer{}
  1520. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch15(&w, v)
  1521. return w.Buffer.BuildBytes(), w.Error
  1522. }
  1523. // MarshalEasyJSON supports easyjson.Marshaler interface
  1524. func (v AuthChallengeResponse) MarshalEasyJSON(w *jwriter.Writer) {
  1525. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch15(w, v)
  1526. }
  1527. // UnmarshalJSON supports json.Unmarshaler interface
  1528. func (v *AuthChallengeResponse) UnmarshalJSON(data []byte) error {
  1529. r := jlexer.Lexer{Data: data}
  1530. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch15(&r, v)
  1531. return r.Error()
  1532. }
  1533. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1534. func (v *AuthChallengeResponse) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1535. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch15(l, v)
  1536. }
  1537. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch16(in *jlexer.Lexer, out *AuthChallenge) {
  1538. isTopLevel := in.IsStart()
  1539. if in.IsNull() {
  1540. if isTopLevel {
  1541. in.Consumed()
  1542. }
  1543. in.Skip()
  1544. return
  1545. }
  1546. in.Delim('{')
  1547. for !in.IsDelim('}') {
  1548. key := in.UnsafeFieldName(false)
  1549. in.WantColon()
  1550. if in.IsNull() {
  1551. in.Skip()
  1552. in.WantComma()
  1553. continue
  1554. }
  1555. switch key {
  1556. case "source":
  1557. (out.Source).UnmarshalEasyJSON(in)
  1558. case "origin":
  1559. out.Origin = string(in.String())
  1560. case "scheme":
  1561. out.Scheme = string(in.String())
  1562. case "realm":
  1563. out.Realm = string(in.String())
  1564. default:
  1565. in.SkipRecursive()
  1566. }
  1567. in.WantComma()
  1568. }
  1569. in.Delim('}')
  1570. if isTopLevel {
  1571. in.Consumed()
  1572. }
  1573. }
  1574. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch16(out *jwriter.Writer, in AuthChallenge) {
  1575. out.RawByte('{')
  1576. first := true
  1577. _ = first
  1578. if in.Source != "" {
  1579. const prefix string = ",\"source\":"
  1580. first = false
  1581. out.RawString(prefix[1:])
  1582. (in.Source).MarshalEasyJSON(out)
  1583. }
  1584. {
  1585. const prefix string = ",\"origin\":"
  1586. if first {
  1587. first = false
  1588. out.RawString(prefix[1:])
  1589. } else {
  1590. out.RawString(prefix)
  1591. }
  1592. out.String(string(in.Origin))
  1593. }
  1594. {
  1595. const prefix string = ",\"scheme\":"
  1596. out.RawString(prefix)
  1597. out.String(string(in.Scheme))
  1598. }
  1599. {
  1600. const prefix string = ",\"realm\":"
  1601. out.RawString(prefix)
  1602. out.String(string(in.Realm))
  1603. }
  1604. out.RawByte('}')
  1605. }
  1606. // MarshalJSON supports json.Marshaler interface
  1607. func (v AuthChallenge) MarshalJSON() ([]byte, error) {
  1608. w := jwriter.Writer{}
  1609. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch16(&w, v)
  1610. return w.Buffer.BuildBytes(), w.Error
  1611. }
  1612. // MarshalEasyJSON supports easyjson.Marshaler interface
  1613. func (v AuthChallenge) MarshalEasyJSON(w *jwriter.Writer) {
  1614. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFetch16(w, v)
  1615. }
  1616. // UnmarshalJSON supports json.Unmarshaler interface
  1617. func (v *AuthChallenge) UnmarshalJSON(data []byte) error {
  1618. r := jlexer.Lexer{Data: data}
  1619. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch16(&r, v)
  1620. return r.Error()
  1621. }
  1622. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1623. func (v *AuthChallenge) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1624. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFetch16(l, v)
  1625. }