easyjson.go 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package fedcm
  3. import (
  4. json "encoding/json"
  5. easyjson "github.com/mailru/easyjson"
  6. jlexer "github.com/mailru/easyjson/jlexer"
  7. jwriter "github.com/mailru/easyjson/jwriter"
  8. )
  9. // suppress unused package warning
  10. var (
  11. _ *json.RawMessage
  12. _ *jlexer.Lexer
  13. _ *jwriter.Writer
  14. _ easyjson.Marshaler
  15. )
  16. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm(in *jlexer.Lexer, out *SelectAccountParams) {
  17. isTopLevel := in.IsStart()
  18. if in.IsNull() {
  19. if isTopLevel {
  20. in.Consumed()
  21. }
  22. in.Skip()
  23. return
  24. }
  25. in.Delim('{')
  26. for !in.IsDelim('}') {
  27. key := in.UnsafeFieldName(false)
  28. in.WantColon()
  29. if in.IsNull() {
  30. in.Skip()
  31. in.WantComma()
  32. continue
  33. }
  34. switch key {
  35. case "dialogId":
  36. out.DialogID = string(in.String())
  37. case "accountIndex":
  38. out.AccountIndex = int64(in.Int64())
  39. default:
  40. in.SkipRecursive()
  41. }
  42. in.WantComma()
  43. }
  44. in.Delim('}')
  45. if isTopLevel {
  46. in.Consumed()
  47. }
  48. }
  49. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm(out *jwriter.Writer, in SelectAccountParams) {
  50. out.RawByte('{')
  51. first := true
  52. _ = first
  53. {
  54. const prefix string = ",\"dialogId\":"
  55. out.RawString(prefix[1:])
  56. out.String(string(in.DialogID))
  57. }
  58. {
  59. const prefix string = ",\"accountIndex\":"
  60. out.RawString(prefix)
  61. out.Int64(int64(in.AccountIndex))
  62. }
  63. out.RawByte('}')
  64. }
  65. // MarshalJSON supports json.Marshaler interface
  66. func (v SelectAccountParams) MarshalJSON() ([]byte, error) {
  67. w := jwriter.Writer{}
  68. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm(&w, v)
  69. return w.Buffer.BuildBytes(), w.Error
  70. }
  71. // MarshalEasyJSON supports easyjson.Marshaler interface
  72. func (v SelectAccountParams) MarshalEasyJSON(w *jwriter.Writer) {
  73. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm(w, v)
  74. }
  75. // UnmarshalJSON supports json.Unmarshaler interface
  76. func (v *SelectAccountParams) UnmarshalJSON(data []byte) error {
  77. r := jlexer.Lexer{Data: data}
  78. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm(&r, v)
  79. return r.Error()
  80. }
  81. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  82. func (v *SelectAccountParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  83. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm(l, v)
  84. }
  85. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm1(in *jlexer.Lexer, out *ResetCooldownParams) {
  86. isTopLevel := in.IsStart()
  87. if in.IsNull() {
  88. if isTopLevel {
  89. in.Consumed()
  90. }
  91. in.Skip()
  92. return
  93. }
  94. in.Delim('{')
  95. for !in.IsDelim('}') {
  96. key := in.UnsafeFieldName(false)
  97. in.WantColon()
  98. if in.IsNull() {
  99. in.Skip()
  100. in.WantComma()
  101. continue
  102. }
  103. switch key {
  104. default:
  105. in.SkipRecursive()
  106. }
  107. in.WantComma()
  108. }
  109. in.Delim('}')
  110. if isTopLevel {
  111. in.Consumed()
  112. }
  113. }
  114. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm1(out *jwriter.Writer, in ResetCooldownParams) {
  115. out.RawByte('{')
  116. first := true
  117. _ = first
  118. out.RawByte('}')
  119. }
  120. // MarshalJSON supports json.Marshaler interface
  121. func (v ResetCooldownParams) MarshalJSON() ([]byte, error) {
  122. w := jwriter.Writer{}
  123. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm1(&w, v)
  124. return w.Buffer.BuildBytes(), w.Error
  125. }
  126. // MarshalEasyJSON supports easyjson.Marshaler interface
  127. func (v ResetCooldownParams) MarshalEasyJSON(w *jwriter.Writer) {
  128. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm1(w, v)
  129. }
  130. // UnmarshalJSON supports json.Unmarshaler interface
  131. func (v *ResetCooldownParams) UnmarshalJSON(data []byte) error {
  132. r := jlexer.Lexer{Data: data}
  133. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm1(&r, v)
  134. return r.Error()
  135. }
  136. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  137. func (v *ResetCooldownParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  138. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm1(l, v)
  139. }
  140. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm2(in *jlexer.Lexer, out *OpenURLParams) {
  141. isTopLevel := in.IsStart()
  142. if in.IsNull() {
  143. if isTopLevel {
  144. in.Consumed()
  145. }
  146. in.Skip()
  147. return
  148. }
  149. in.Delim('{')
  150. for !in.IsDelim('}') {
  151. key := in.UnsafeFieldName(false)
  152. in.WantColon()
  153. if in.IsNull() {
  154. in.Skip()
  155. in.WantComma()
  156. continue
  157. }
  158. switch key {
  159. case "dialogId":
  160. out.DialogID = string(in.String())
  161. case "accountIndex":
  162. out.AccountIndex = int64(in.Int64())
  163. case "accountUrlType":
  164. (out.AccountURLType).UnmarshalEasyJSON(in)
  165. default:
  166. in.SkipRecursive()
  167. }
  168. in.WantComma()
  169. }
  170. in.Delim('}')
  171. if isTopLevel {
  172. in.Consumed()
  173. }
  174. }
  175. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm2(out *jwriter.Writer, in OpenURLParams) {
  176. out.RawByte('{')
  177. first := true
  178. _ = first
  179. {
  180. const prefix string = ",\"dialogId\":"
  181. out.RawString(prefix[1:])
  182. out.String(string(in.DialogID))
  183. }
  184. {
  185. const prefix string = ",\"accountIndex\":"
  186. out.RawString(prefix)
  187. out.Int64(int64(in.AccountIndex))
  188. }
  189. {
  190. const prefix string = ",\"accountUrlType\":"
  191. out.RawString(prefix)
  192. (in.AccountURLType).MarshalEasyJSON(out)
  193. }
  194. out.RawByte('}')
  195. }
  196. // MarshalJSON supports json.Marshaler interface
  197. func (v OpenURLParams) MarshalJSON() ([]byte, error) {
  198. w := jwriter.Writer{}
  199. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm2(&w, v)
  200. return w.Buffer.BuildBytes(), w.Error
  201. }
  202. // MarshalEasyJSON supports easyjson.Marshaler interface
  203. func (v OpenURLParams) MarshalEasyJSON(w *jwriter.Writer) {
  204. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm2(w, v)
  205. }
  206. // UnmarshalJSON supports json.Unmarshaler interface
  207. func (v *OpenURLParams) UnmarshalJSON(data []byte) error {
  208. r := jlexer.Lexer{Data: data}
  209. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm2(&r, v)
  210. return r.Error()
  211. }
  212. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  213. func (v *OpenURLParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  214. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm2(l, v)
  215. }
  216. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm3(in *jlexer.Lexer, out *EventDialogShown) {
  217. isTopLevel := in.IsStart()
  218. if in.IsNull() {
  219. if isTopLevel {
  220. in.Consumed()
  221. }
  222. in.Skip()
  223. return
  224. }
  225. in.Delim('{')
  226. for !in.IsDelim('}') {
  227. key := in.UnsafeFieldName(false)
  228. in.WantColon()
  229. if in.IsNull() {
  230. in.Skip()
  231. in.WantComma()
  232. continue
  233. }
  234. switch key {
  235. case "dialogId":
  236. out.DialogID = string(in.String())
  237. case "dialogType":
  238. (out.DialogType).UnmarshalEasyJSON(in)
  239. case "accounts":
  240. if in.IsNull() {
  241. in.Skip()
  242. out.Accounts = nil
  243. } else {
  244. in.Delim('[')
  245. if out.Accounts == nil {
  246. if !in.IsDelim(']') {
  247. out.Accounts = make([]*Account, 0, 8)
  248. } else {
  249. out.Accounts = []*Account{}
  250. }
  251. } else {
  252. out.Accounts = (out.Accounts)[:0]
  253. }
  254. for !in.IsDelim(']') {
  255. var v1 *Account
  256. if in.IsNull() {
  257. in.Skip()
  258. v1 = nil
  259. } else {
  260. if v1 == nil {
  261. v1 = new(Account)
  262. }
  263. (*v1).UnmarshalEasyJSON(in)
  264. }
  265. out.Accounts = append(out.Accounts, v1)
  266. in.WantComma()
  267. }
  268. in.Delim(']')
  269. }
  270. case "title":
  271. out.Title = string(in.String())
  272. case "subtitle":
  273. out.Subtitle = string(in.String())
  274. default:
  275. in.SkipRecursive()
  276. }
  277. in.WantComma()
  278. }
  279. in.Delim('}')
  280. if isTopLevel {
  281. in.Consumed()
  282. }
  283. }
  284. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm3(out *jwriter.Writer, in EventDialogShown) {
  285. out.RawByte('{')
  286. first := true
  287. _ = first
  288. {
  289. const prefix string = ",\"dialogId\":"
  290. out.RawString(prefix[1:])
  291. out.String(string(in.DialogID))
  292. }
  293. {
  294. const prefix string = ",\"dialogType\":"
  295. out.RawString(prefix)
  296. (in.DialogType).MarshalEasyJSON(out)
  297. }
  298. {
  299. const prefix string = ",\"accounts\":"
  300. out.RawString(prefix)
  301. if in.Accounts == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  302. out.RawString("null")
  303. } else {
  304. out.RawByte('[')
  305. for v2, v3 := range in.Accounts {
  306. if v2 > 0 {
  307. out.RawByte(',')
  308. }
  309. if v3 == nil {
  310. out.RawString("null")
  311. } else {
  312. (*v3).MarshalEasyJSON(out)
  313. }
  314. }
  315. out.RawByte(']')
  316. }
  317. }
  318. {
  319. const prefix string = ",\"title\":"
  320. out.RawString(prefix)
  321. out.String(string(in.Title))
  322. }
  323. if in.Subtitle != "" {
  324. const prefix string = ",\"subtitle\":"
  325. out.RawString(prefix)
  326. out.String(string(in.Subtitle))
  327. }
  328. out.RawByte('}')
  329. }
  330. // MarshalJSON supports json.Marshaler interface
  331. func (v EventDialogShown) MarshalJSON() ([]byte, error) {
  332. w := jwriter.Writer{}
  333. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm3(&w, v)
  334. return w.Buffer.BuildBytes(), w.Error
  335. }
  336. // MarshalEasyJSON supports easyjson.Marshaler interface
  337. func (v EventDialogShown) MarshalEasyJSON(w *jwriter.Writer) {
  338. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm3(w, v)
  339. }
  340. // UnmarshalJSON supports json.Unmarshaler interface
  341. func (v *EventDialogShown) UnmarshalJSON(data []byte) error {
  342. r := jlexer.Lexer{Data: data}
  343. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm3(&r, v)
  344. return r.Error()
  345. }
  346. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  347. func (v *EventDialogShown) UnmarshalEasyJSON(l *jlexer.Lexer) {
  348. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm3(l, v)
  349. }
  350. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm4(in *jlexer.Lexer, out *EventDialogClosed) {
  351. isTopLevel := in.IsStart()
  352. if in.IsNull() {
  353. if isTopLevel {
  354. in.Consumed()
  355. }
  356. in.Skip()
  357. return
  358. }
  359. in.Delim('{')
  360. for !in.IsDelim('}') {
  361. key := in.UnsafeFieldName(false)
  362. in.WantColon()
  363. if in.IsNull() {
  364. in.Skip()
  365. in.WantComma()
  366. continue
  367. }
  368. switch key {
  369. case "dialogId":
  370. out.DialogID = string(in.String())
  371. default:
  372. in.SkipRecursive()
  373. }
  374. in.WantComma()
  375. }
  376. in.Delim('}')
  377. if isTopLevel {
  378. in.Consumed()
  379. }
  380. }
  381. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm4(out *jwriter.Writer, in EventDialogClosed) {
  382. out.RawByte('{')
  383. first := true
  384. _ = first
  385. {
  386. const prefix string = ",\"dialogId\":"
  387. out.RawString(prefix[1:])
  388. out.String(string(in.DialogID))
  389. }
  390. out.RawByte('}')
  391. }
  392. // MarshalJSON supports json.Marshaler interface
  393. func (v EventDialogClosed) MarshalJSON() ([]byte, error) {
  394. w := jwriter.Writer{}
  395. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm4(&w, v)
  396. return w.Buffer.BuildBytes(), w.Error
  397. }
  398. // MarshalEasyJSON supports easyjson.Marshaler interface
  399. func (v EventDialogClosed) MarshalEasyJSON(w *jwriter.Writer) {
  400. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm4(w, v)
  401. }
  402. // UnmarshalJSON supports json.Unmarshaler interface
  403. func (v *EventDialogClosed) UnmarshalJSON(data []byte) error {
  404. r := jlexer.Lexer{Data: data}
  405. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm4(&r, v)
  406. return r.Error()
  407. }
  408. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  409. func (v *EventDialogClosed) UnmarshalEasyJSON(l *jlexer.Lexer) {
  410. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm4(l, v)
  411. }
  412. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm5(in *jlexer.Lexer, out *EnableParams) {
  413. isTopLevel := in.IsStart()
  414. if in.IsNull() {
  415. if isTopLevel {
  416. in.Consumed()
  417. }
  418. in.Skip()
  419. return
  420. }
  421. in.Delim('{')
  422. for !in.IsDelim('}') {
  423. key := in.UnsafeFieldName(false)
  424. in.WantColon()
  425. if in.IsNull() {
  426. in.Skip()
  427. in.WantComma()
  428. continue
  429. }
  430. switch key {
  431. case "disableRejectionDelay":
  432. out.DisableRejectionDelay = bool(in.Bool())
  433. default:
  434. in.SkipRecursive()
  435. }
  436. in.WantComma()
  437. }
  438. in.Delim('}')
  439. if isTopLevel {
  440. in.Consumed()
  441. }
  442. }
  443. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm5(out *jwriter.Writer, in EnableParams) {
  444. out.RawByte('{')
  445. first := true
  446. _ = first
  447. if in.DisableRejectionDelay {
  448. const prefix string = ",\"disableRejectionDelay\":"
  449. first = false
  450. out.RawString(prefix[1:])
  451. out.Bool(bool(in.DisableRejectionDelay))
  452. }
  453. out.RawByte('}')
  454. }
  455. // MarshalJSON supports json.Marshaler interface
  456. func (v EnableParams) MarshalJSON() ([]byte, error) {
  457. w := jwriter.Writer{}
  458. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm5(&w, v)
  459. return w.Buffer.BuildBytes(), w.Error
  460. }
  461. // MarshalEasyJSON supports easyjson.Marshaler interface
  462. func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
  463. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm5(w, v)
  464. }
  465. // UnmarshalJSON supports json.Unmarshaler interface
  466. func (v *EnableParams) UnmarshalJSON(data []byte) error {
  467. r := jlexer.Lexer{Data: data}
  468. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm5(&r, v)
  469. return r.Error()
  470. }
  471. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  472. func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  473. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm5(l, v)
  474. }
  475. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm6(in *jlexer.Lexer, out *DismissDialogParams) {
  476. isTopLevel := in.IsStart()
  477. if in.IsNull() {
  478. if isTopLevel {
  479. in.Consumed()
  480. }
  481. in.Skip()
  482. return
  483. }
  484. in.Delim('{')
  485. for !in.IsDelim('}') {
  486. key := in.UnsafeFieldName(false)
  487. in.WantColon()
  488. if in.IsNull() {
  489. in.Skip()
  490. in.WantComma()
  491. continue
  492. }
  493. switch key {
  494. case "dialogId":
  495. out.DialogID = string(in.String())
  496. case "triggerCooldown":
  497. out.TriggerCooldown = bool(in.Bool())
  498. default:
  499. in.SkipRecursive()
  500. }
  501. in.WantComma()
  502. }
  503. in.Delim('}')
  504. if isTopLevel {
  505. in.Consumed()
  506. }
  507. }
  508. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm6(out *jwriter.Writer, in DismissDialogParams) {
  509. out.RawByte('{')
  510. first := true
  511. _ = first
  512. {
  513. const prefix string = ",\"dialogId\":"
  514. out.RawString(prefix[1:])
  515. out.String(string(in.DialogID))
  516. }
  517. if in.TriggerCooldown {
  518. const prefix string = ",\"triggerCooldown\":"
  519. out.RawString(prefix)
  520. out.Bool(bool(in.TriggerCooldown))
  521. }
  522. out.RawByte('}')
  523. }
  524. // MarshalJSON supports json.Marshaler interface
  525. func (v DismissDialogParams) MarshalJSON() ([]byte, error) {
  526. w := jwriter.Writer{}
  527. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm6(&w, v)
  528. return w.Buffer.BuildBytes(), w.Error
  529. }
  530. // MarshalEasyJSON supports easyjson.Marshaler interface
  531. func (v DismissDialogParams) MarshalEasyJSON(w *jwriter.Writer) {
  532. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm6(w, v)
  533. }
  534. // UnmarshalJSON supports json.Unmarshaler interface
  535. func (v *DismissDialogParams) UnmarshalJSON(data []byte) error {
  536. r := jlexer.Lexer{Data: data}
  537. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm6(&r, v)
  538. return r.Error()
  539. }
  540. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  541. func (v *DismissDialogParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  542. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm6(l, v)
  543. }
  544. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm7(in *jlexer.Lexer, out *DisableParams) {
  545. isTopLevel := in.IsStart()
  546. if in.IsNull() {
  547. if isTopLevel {
  548. in.Consumed()
  549. }
  550. in.Skip()
  551. return
  552. }
  553. in.Delim('{')
  554. for !in.IsDelim('}') {
  555. key := in.UnsafeFieldName(false)
  556. in.WantColon()
  557. if in.IsNull() {
  558. in.Skip()
  559. in.WantComma()
  560. continue
  561. }
  562. switch key {
  563. default:
  564. in.SkipRecursive()
  565. }
  566. in.WantComma()
  567. }
  568. in.Delim('}')
  569. if isTopLevel {
  570. in.Consumed()
  571. }
  572. }
  573. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm7(out *jwriter.Writer, in DisableParams) {
  574. out.RawByte('{')
  575. first := true
  576. _ = first
  577. out.RawByte('}')
  578. }
  579. // MarshalJSON supports json.Marshaler interface
  580. func (v DisableParams) MarshalJSON() ([]byte, error) {
  581. w := jwriter.Writer{}
  582. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm7(&w, v)
  583. return w.Buffer.BuildBytes(), w.Error
  584. }
  585. // MarshalEasyJSON supports easyjson.Marshaler interface
  586. func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
  587. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm7(w, v)
  588. }
  589. // UnmarshalJSON supports json.Unmarshaler interface
  590. func (v *DisableParams) UnmarshalJSON(data []byte) error {
  591. r := jlexer.Lexer{Data: data}
  592. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm7(&r, v)
  593. return r.Error()
  594. }
  595. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  596. func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  597. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm7(l, v)
  598. }
  599. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm8(in *jlexer.Lexer, out *ClickDialogButtonParams) {
  600. isTopLevel := in.IsStart()
  601. if in.IsNull() {
  602. if isTopLevel {
  603. in.Consumed()
  604. }
  605. in.Skip()
  606. return
  607. }
  608. in.Delim('{')
  609. for !in.IsDelim('}') {
  610. key := in.UnsafeFieldName(false)
  611. in.WantColon()
  612. if in.IsNull() {
  613. in.Skip()
  614. in.WantComma()
  615. continue
  616. }
  617. switch key {
  618. case "dialogId":
  619. out.DialogID = string(in.String())
  620. case "dialogButton":
  621. (out.DialogButton).UnmarshalEasyJSON(in)
  622. default:
  623. in.SkipRecursive()
  624. }
  625. in.WantComma()
  626. }
  627. in.Delim('}')
  628. if isTopLevel {
  629. in.Consumed()
  630. }
  631. }
  632. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm8(out *jwriter.Writer, in ClickDialogButtonParams) {
  633. out.RawByte('{')
  634. first := true
  635. _ = first
  636. {
  637. const prefix string = ",\"dialogId\":"
  638. out.RawString(prefix[1:])
  639. out.String(string(in.DialogID))
  640. }
  641. {
  642. const prefix string = ",\"dialogButton\":"
  643. out.RawString(prefix)
  644. (in.DialogButton).MarshalEasyJSON(out)
  645. }
  646. out.RawByte('}')
  647. }
  648. // MarshalJSON supports json.Marshaler interface
  649. func (v ClickDialogButtonParams) MarshalJSON() ([]byte, error) {
  650. w := jwriter.Writer{}
  651. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm8(&w, v)
  652. return w.Buffer.BuildBytes(), w.Error
  653. }
  654. // MarshalEasyJSON supports easyjson.Marshaler interface
  655. func (v ClickDialogButtonParams) MarshalEasyJSON(w *jwriter.Writer) {
  656. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm8(w, v)
  657. }
  658. // UnmarshalJSON supports json.Unmarshaler interface
  659. func (v *ClickDialogButtonParams) UnmarshalJSON(data []byte) error {
  660. r := jlexer.Lexer{Data: data}
  661. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm8(&r, v)
  662. return r.Error()
  663. }
  664. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  665. func (v *ClickDialogButtonParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  666. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm8(l, v)
  667. }
  668. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm9(in *jlexer.Lexer, out *Account) {
  669. isTopLevel := in.IsStart()
  670. if in.IsNull() {
  671. if isTopLevel {
  672. in.Consumed()
  673. }
  674. in.Skip()
  675. return
  676. }
  677. in.Delim('{')
  678. for !in.IsDelim('}') {
  679. key := in.UnsafeFieldName(false)
  680. in.WantColon()
  681. if in.IsNull() {
  682. in.Skip()
  683. in.WantComma()
  684. continue
  685. }
  686. switch key {
  687. case "accountId":
  688. out.AccountID = string(in.String())
  689. case "email":
  690. out.Email = string(in.String())
  691. case "name":
  692. out.Name = string(in.String())
  693. case "givenName":
  694. out.GivenName = string(in.String())
  695. case "pictureUrl":
  696. out.PictureURL = string(in.String())
  697. case "idpConfigUrl":
  698. out.IdpConfigURL = string(in.String())
  699. case "idpLoginUrl":
  700. out.IdpLoginURL = string(in.String())
  701. case "loginState":
  702. (out.LoginState).UnmarshalEasyJSON(in)
  703. case "termsOfServiceUrl":
  704. out.TermsOfServiceURL = string(in.String())
  705. case "privacyPolicyUrl":
  706. out.PrivacyPolicyURL = string(in.String())
  707. default:
  708. in.SkipRecursive()
  709. }
  710. in.WantComma()
  711. }
  712. in.Delim('}')
  713. if isTopLevel {
  714. in.Consumed()
  715. }
  716. }
  717. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm9(out *jwriter.Writer, in Account) {
  718. out.RawByte('{')
  719. first := true
  720. _ = first
  721. {
  722. const prefix string = ",\"accountId\":"
  723. out.RawString(prefix[1:])
  724. out.String(string(in.AccountID))
  725. }
  726. {
  727. const prefix string = ",\"email\":"
  728. out.RawString(prefix)
  729. out.String(string(in.Email))
  730. }
  731. {
  732. const prefix string = ",\"name\":"
  733. out.RawString(prefix)
  734. out.String(string(in.Name))
  735. }
  736. {
  737. const prefix string = ",\"givenName\":"
  738. out.RawString(prefix)
  739. out.String(string(in.GivenName))
  740. }
  741. {
  742. const prefix string = ",\"pictureUrl\":"
  743. out.RawString(prefix)
  744. out.String(string(in.PictureURL))
  745. }
  746. {
  747. const prefix string = ",\"idpConfigUrl\":"
  748. out.RawString(prefix)
  749. out.String(string(in.IdpConfigURL))
  750. }
  751. {
  752. const prefix string = ",\"idpLoginUrl\":"
  753. out.RawString(prefix)
  754. out.String(string(in.IdpLoginURL))
  755. }
  756. {
  757. const prefix string = ",\"loginState\":"
  758. out.RawString(prefix)
  759. (in.LoginState).MarshalEasyJSON(out)
  760. }
  761. if in.TermsOfServiceURL != "" {
  762. const prefix string = ",\"termsOfServiceUrl\":"
  763. out.RawString(prefix)
  764. out.String(string(in.TermsOfServiceURL))
  765. }
  766. if in.PrivacyPolicyURL != "" {
  767. const prefix string = ",\"privacyPolicyUrl\":"
  768. out.RawString(prefix)
  769. out.String(string(in.PrivacyPolicyURL))
  770. }
  771. out.RawByte('}')
  772. }
  773. // MarshalJSON supports json.Marshaler interface
  774. func (v Account) MarshalJSON() ([]byte, error) {
  775. w := jwriter.Writer{}
  776. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm9(&w, v)
  777. return w.Buffer.BuildBytes(), w.Error
  778. }
  779. // MarshalEasyJSON supports easyjson.Marshaler interface
  780. func (v Account) MarshalEasyJSON(w *jwriter.Writer) {
  781. easyjsonC5a4559bEncodeGithubComChromedpCdprotoFedcm9(w, v)
  782. }
  783. // UnmarshalJSON supports json.Unmarshaler interface
  784. func (v *Account) UnmarshalJSON(data []byte) error {
  785. r := jlexer.Lexer{Data: data}
  786. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm9(&r, v)
  787. return r.Error()
  788. }
  789. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  790. func (v *Account) UnmarshalEasyJSON(l *jlexer.Lexer) {
  791. easyjsonC5a4559bDecodeGithubComChromedpCdprotoFedcm9(l, v)
  792. }