easyjson.go 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package autofill
  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 easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill(in *jlexer.Lexer, out *TriggerParams) {
  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 "fieldId":
  36. (out.FieldID).UnmarshalEasyJSON(in)
  37. case "frameId":
  38. (out.FrameID).UnmarshalEasyJSON(in)
  39. case "card":
  40. if in.IsNull() {
  41. in.Skip()
  42. out.Card = nil
  43. } else {
  44. if out.Card == nil {
  45. out.Card = new(CreditCard)
  46. }
  47. (*out.Card).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 easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill(out *jwriter.Writer, in TriggerParams) {
  60. out.RawByte('{')
  61. first := true
  62. _ = first
  63. {
  64. const prefix string = ",\"fieldId\":"
  65. out.RawString(prefix[1:])
  66. out.Int64(int64(in.FieldID))
  67. }
  68. if in.FrameID != "" {
  69. const prefix string = ",\"frameId\":"
  70. out.RawString(prefix)
  71. out.String(string(in.FrameID))
  72. }
  73. {
  74. const prefix string = ",\"card\":"
  75. out.RawString(prefix)
  76. if in.Card == nil {
  77. out.RawString("null")
  78. } else {
  79. (*in.Card).MarshalEasyJSON(out)
  80. }
  81. }
  82. out.RawByte('}')
  83. }
  84. // MarshalJSON supports json.Marshaler interface
  85. func (v TriggerParams) MarshalJSON() ([]byte, error) {
  86. w := jwriter.Writer{}
  87. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill(&w, v)
  88. return w.Buffer.BuildBytes(), w.Error
  89. }
  90. // MarshalEasyJSON supports easyjson.Marshaler interface
  91. func (v TriggerParams) MarshalEasyJSON(w *jwriter.Writer) {
  92. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill(w, v)
  93. }
  94. // UnmarshalJSON supports json.Unmarshaler interface
  95. func (v *TriggerParams) UnmarshalJSON(data []byte) error {
  96. r := jlexer.Lexer{Data: data}
  97. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill(&r, v)
  98. return r.Error()
  99. }
  100. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  101. func (v *TriggerParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  102. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill(l, v)
  103. }
  104. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill1(in *jlexer.Lexer, out *SetAddressesParams) {
  105. isTopLevel := in.IsStart()
  106. if in.IsNull() {
  107. if isTopLevel {
  108. in.Consumed()
  109. }
  110. in.Skip()
  111. return
  112. }
  113. in.Delim('{')
  114. for !in.IsDelim('}') {
  115. key := in.UnsafeFieldName(false)
  116. in.WantColon()
  117. if in.IsNull() {
  118. in.Skip()
  119. in.WantComma()
  120. continue
  121. }
  122. switch key {
  123. case "addresses":
  124. if in.IsNull() {
  125. in.Skip()
  126. out.Addresses = nil
  127. } else {
  128. in.Delim('[')
  129. if out.Addresses == nil {
  130. if !in.IsDelim(']') {
  131. out.Addresses = make([]*Address, 0, 8)
  132. } else {
  133. out.Addresses = []*Address{}
  134. }
  135. } else {
  136. out.Addresses = (out.Addresses)[:0]
  137. }
  138. for !in.IsDelim(']') {
  139. var v1 *Address
  140. if in.IsNull() {
  141. in.Skip()
  142. v1 = nil
  143. } else {
  144. if v1 == nil {
  145. v1 = new(Address)
  146. }
  147. (*v1).UnmarshalEasyJSON(in)
  148. }
  149. out.Addresses = append(out.Addresses, v1)
  150. in.WantComma()
  151. }
  152. in.Delim(']')
  153. }
  154. default:
  155. in.SkipRecursive()
  156. }
  157. in.WantComma()
  158. }
  159. in.Delim('}')
  160. if isTopLevel {
  161. in.Consumed()
  162. }
  163. }
  164. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill1(out *jwriter.Writer, in SetAddressesParams) {
  165. out.RawByte('{')
  166. first := true
  167. _ = first
  168. {
  169. const prefix string = ",\"addresses\":"
  170. out.RawString(prefix[1:])
  171. if in.Addresses == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  172. out.RawString("null")
  173. } else {
  174. out.RawByte('[')
  175. for v2, v3 := range in.Addresses {
  176. if v2 > 0 {
  177. out.RawByte(',')
  178. }
  179. if v3 == nil {
  180. out.RawString("null")
  181. } else {
  182. (*v3).MarshalEasyJSON(out)
  183. }
  184. }
  185. out.RawByte(']')
  186. }
  187. }
  188. out.RawByte('}')
  189. }
  190. // MarshalJSON supports json.Marshaler interface
  191. func (v SetAddressesParams) MarshalJSON() ([]byte, error) {
  192. w := jwriter.Writer{}
  193. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill1(&w, v)
  194. return w.Buffer.BuildBytes(), w.Error
  195. }
  196. // MarshalEasyJSON supports easyjson.Marshaler interface
  197. func (v SetAddressesParams) MarshalEasyJSON(w *jwriter.Writer) {
  198. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill1(w, v)
  199. }
  200. // UnmarshalJSON supports json.Unmarshaler interface
  201. func (v *SetAddressesParams) UnmarshalJSON(data []byte) error {
  202. r := jlexer.Lexer{Data: data}
  203. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill1(&r, v)
  204. return r.Error()
  205. }
  206. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  207. func (v *SetAddressesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  208. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill1(l, v)
  209. }
  210. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill2(in *jlexer.Lexer, out *FilledField) {
  211. isTopLevel := in.IsStart()
  212. if in.IsNull() {
  213. if isTopLevel {
  214. in.Consumed()
  215. }
  216. in.Skip()
  217. return
  218. }
  219. in.Delim('{')
  220. for !in.IsDelim('}') {
  221. key := in.UnsafeFieldName(false)
  222. in.WantColon()
  223. if in.IsNull() {
  224. in.Skip()
  225. in.WantComma()
  226. continue
  227. }
  228. switch key {
  229. case "htmlType":
  230. out.HTMLType = string(in.String())
  231. case "id":
  232. out.ID = string(in.String())
  233. case "name":
  234. out.Name = string(in.String())
  235. case "value":
  236. out.Value = string(in.String())
  237. case "autofillType":
  238. out.AutofillType = string(in.String())
  239. case "fillingStrategy":
  240. (out.FillingStrategy).UnmarshalEasyJSON(in)
  241. case "frameId":
  242. (out.FrameID).UnmarshalEasyJSON(in)
  243. case "fieldId":
  244. (out.FieldID).UnmarshalEasyJSON(in)
  245. default:
  246. in.SkipRecursive()
  247. }
  248. in.WantComma()
  249. }
  250. in.Delim('}')
  251. if isTopLevel {
  252. in.Consumed()
  253. }
  254. }
  255. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill2(out *jwriter.Writer, in FilledField) {
  256. out.RawByte('{')
  257. first := true
  258. _ = first
  259. {
  260. const prefix string = ",\"htmlType\":"
  261. out.RawString(prefix[1:])
  262. out.String(string(in.HTMLType))
  263. }
  264. {
  265. const prefix string = ",\"id\":"
  266. out.RawString(prefix)
  267. out.String(string(in.ID))
  268. }
  269. {
  270. const prefix string = ",\"name\":"
  271. out.RawString(prefix)
  272. out.String(string(in.Name))
  273. }
  274. {
  275. const prefix string = ",\"value\":"
  276. out.RawString(prefix)
  277. out.String(string(in.Value))
  278. }
  279. {
  280. const prefix string = ",\"autofillType\":"
  281. out.RawString(prefix)
  282. out.String(string(in.AutofillType))
  283. }
  284. {
  285. const prefix string = ",\"fillingStrategy\":"
  286. out.RawString(prefix)
  287. (in.FillingStrategy).MarshalEasyJSON(out)
  288. }
  289. {
  290. const prefix string = ",\"frameId\":"
  291. out.RawString(prefix)
  292. out.String(string(in.FrameID))
  293. }
  294. {
  295. const prefix string = ",\"fieldId\":"
  296. out.RawString(prefix)
  297. out.Int64(int64(in.FieldID))
  298. }
  299. out.RawByte('}')
  300. }
  301. // MarshalJSON supports json.Marshaler interface
  302. func (v FilledField) MarshalJSON() ([]byte, error) {
  303. w := jwriter.Writer{}
  304. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill2(&w, v)
  305. return w.Buffer.BuildBytes(), w.Error
  306. }
  307. // MarshalEasyJSON supports easyjson.Marshaler interface
  308. func (v FilledField) MarshalEasyJSON(w *jwriter.Writer) {
  309. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill2(w, v)
  310. }
  311. // UnmarshalJSON supports json.Unmarshaler interface
  312. func (v *FilledField) UnmarshalJSON(data []byte) error {
  313. r := jlexer.Lexer{Data: data}
  314. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill2(&r, v)
  315. return r.Error()
  316. }
  317. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  318. func (v *FilledField) UnmarshalEasyJSON(l *jlexer.Lexer) {
  319. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill2(l, v)
  320. }
  321. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill3(in *jlexer.Lexer, out *EventAddressFormFilled) {
  322. isTopLevel := in.IsStart()
  323. if in.IsNull() {
  324. if isTopLevel {
  325. in.Consumed()
  326. }
  327. in.Skip()
  328. return
  329. }
  330. in.Delim('{')
  331. for !in.IsDelim('}') {
  332. key := in.UnsafeFieldName(false)
  333. in.WantColon()
  334. if in.IsNull() {
  335. in.Skip()
  336. in.WantComma()
  337. continue
  338. }
  339. switch key {
  340. case "filledFields":
  341. if in.IsNull() {
  342. in.Skip()
  343. out.FilledFields = nil
  344. } else {
  345. in.Delim('[')
  346. if out.FilledFields == nil {
  347. if !in.IsDelim(']') {
  348. out.FilledFields = make([]*FilledField, 0, 8)
  349. } else {
  350. out.FilledFields = []*FilledField{}
  351. }
  352. } else {
  353. out.FilledFields = (out.FilledFields)[:0]
  354. }
  355. for !in.IsDelim(']') {
  356. var v4 *FilledField
  357. if in.IsNull() {
  358. in.Skip()
  359. v4 = nil
  360. } else {
  361. if v4 == nil {
  362. v4 = new(FilledField)
  363. }
  364. (*v4).UnmarshalEasyJSON(in)
  365. }
  366. out.FilledFields = append(out.FilledFields, v4)
  367. in.WantComma()
  368. }
  369. in.Delim(']')
  370. }
  371. case "addressUi":
  372. if in.IsNull() {
  373. in.Skip()
  374. out.AddressUI = nil
  375. } else {
  376. if out.AddressUI == nil {
  377. out.AddressUI = new(AddressUI)
  378. }
  379. (*out.AddressUI).UnmarshalEasyJSON(in)
  380. }
  381. default:
  382. in.SkipRecursive()
  383. }
  384. in.WantComma()
  385. }
  386. in.Delim('}')
  387. if isTopLevel {
  388. in.Consumed()
  389. }
  390. }
  391. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill3(out *jwriter.Writer, in EventAddressFormFilled) {
  392. out.RawByte('{')
  393. first := true
  394. _ = first
  395. {
  396. const prefix string = ",\"filledFields\":"
  397. out.RawString(prefix[1:])
  398. if in.FilledFields == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  399. out.RawString("null")
  400. } else {
  401. out.RawByte('[')
  402. for v5, v6 := range in.FilledFields {
  403. if v5 > 0 {
  404. out.RawByte(',')
  405. }
  406. if v6 == nil {
  407. out.RawString("null")
  408. } else {
  409. (*v6).MarshalEasyJSON(out)
  410. }
  411. }
  412. out.RawByte(']')
  413. }
  414. }
  415. {
  416. const prefix string = ",\"addressUi\":"
  417. out.RawString(prefix)
  418. if in.AddressUI == nil {
  419. out.RawString("null")
  420. } else {
  421. (*in.AddressUI).MarshalEasyJSON(out)
  422. }
  423. }
  424. out.RawByte('}')
  425. }
  426. // MarshalJSON supports json.Marshaler interface
  427. func (v EventAddressFormFilled) MarshalJSON() ([]byte, error) {
  428. w := jwriter.Writer{}
  429. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill3(&w, v)
  430. return w.Buffer.BuildBytes(), w.Error
  431. }
  432. // MarshalEasyJSON supports easyjson.Marshaler interface
  433. func (v EventAddressFormFilled) MarshalEasyJSON(w *jwriter.Writer) {
  434. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill3(w, v)
  435. }
  436. // UnmarshalJSON supports json.Unmarshaler interface
  437. func (v *EventAddressFormFilled) UnmarshalJSON(data []byte) error {
  438. r := jlexer.Lexer{Data: data}
  439. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill3(&r, v)
  440. return r.Error()
  441. }
  442. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  443. func (v *EventAddressFormFilled) UnmarshalEasyJSON(l *jlexer.Lexer) {
  444. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill3(l, v)
  445. }
  446. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill4(in *jlexer.Lexer, out *EnableParams) {
  447. isTopLevel := in.IsStart()
  448. if in.IsNull() {
  449. if isTopLevel {
  450. in.Consumed()
  451. }
  452. in.Skip()
  453. return
  454. }
  455. in.Delim('{')
  456. for !in.IsDelim('}') {
  457. key := in.UnsafeFieldName(false)
  458. in.WantColon()
  459. if in.IsNull() {
  460. in.Skip()
  461. in.WantComma()
  462. continue
  463. }
  464. switch key {
  465. default:
  466. in.SkipRecursive()
  467. }
  468. in.WantComma()
  469. }
  470. in.Delim('}')
  471. if isTopLevel {
  472. in.Consumed()
  473. }
  474. }
  475. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill4(out *jwriter.Writer, in EnableParams) {
  476. out.RawByte('{')
  477. first := true
  478. _ = first
  479. out.RawByte('}')
  480. }
  481. // MarshalJSON supports json.Marshaler interface
  482. func (v EnableParams) MarshalJSON() ([]byte, error) {
  483. w := jwriter.Writer{}
  484. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill4(&w, v)
  485. return w.Buffer.BuildBytes(), w.Error
  486. }
  487. // MarshalEasyJSON supports easyjson.Marshaler interface
  488. func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
  489. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill4(w, v)
  490. }
  491. // UnmarshalJSON supports json.Unmarshaler interface
  492. func (v *EnableParams) UnmarshalJSON(data []byte) error {
  493. r := jlexer.Lexer{Data: data}
  494. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill4(&r, v)
  495. return r.Error()
  496. }
  497. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  498. func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  499. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill4(l, v)
  500. }
  501. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill5(in *jlexer.Lexer, out *DisableParams) {
  502. isTopLevel := in.IsStart()
  503. if in.IsNull() {
  504. if isTopLevel {
  505. in.Consumed()
  506. }
  507. in.Skip()
  508. return
  509. }
  510. in.Delim('{')
  511. for !in.IsDelim('}') {
  512. key := in.UnsafeFieldName(false)
  513. in.WantColon()
  514. if in.IsNull() {
  515. in.Skip()
  516. in.WantComma()
  517. continue
  518. }
  519. switch key {
  520. default:
  521. in.SkipRecursive()
  522. }
  523. in.WantComma()
  524. }
  525. in.Delim('}')
  526. if isTopLevel {
  527. in.Consumed()
  528. }
  529. }
  530. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill5(out *jwriter.Writer, in DisableParams) {
  531. out.RawByte('{')
  532. first := true
  533. _ = first
  534. out.RawByte('}')
  535. }
  536. // MarshalJSON supports json.Marshaler interface
  537. func (v DisableParams) MarshalJSON() ([]byte, error) {
  538. w := jwriter.Writer{}
  539. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill5(&w, v)
  540. return w.Buffer.BuildBytes(), w.Error
  541. }
  542. // MarshalEasyJSON supports easyjson.Marshaler interface
  543. func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
  544. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill5(w, v)
  545. }
  546. // UnmarshalJSON supports json.Unmarshaler interface
  547. func (v *DisableParams) UnmarshalJSON(data []byte) error {
  548. r := jlexer.Lexer{Data: data}
  549. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill5(&r, v)
  550. return r.Error()
  551. }
  552. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  553. func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  554. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill5(l, v)
  555. }
  556. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill6(in *jlexer.Lexer, out *CreditCard) {
  557. isTopLevel := in.IsStart()
  558. if in.IsNull() {
  559. if isTopLevel {
  560. in.Consumed()
  561. }
  562. in.Skip()
  563. return
  564. }
  565. in.Delim('{')
  566. for !in.IsDelim('}') {
  567. key := in.UnsafeFieldName(false)
  568. in.WantColon()
  569. if in.IsNull() {
  570. in.Skip()
  571. in.WantComma()
  572. continue
  573. }
  574. switch key {
  575. case "number":
  576. out.Number = string(in.String())
  577. case "name":
  578. out.Name = string(in.String())
  579. case "expiryMonth":
  580. out.ExpiryMonth = string(in.String())
  581. case "expiryYear":
  582. out.ExpiryYear = string(in.String())
  583. case "cvc":
  584. out.Cvc = string(in.String())
  585. default:
  586. in.SkipRecursive()
  587. }
  588. in.WantComma()
  589. }
  590. in.Delim('}')
  591. if isTopLevel {
  592. in.Consumed()
  593. }
  594. }
  595. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill6(out *jwriter.Writer, in CreditCard) {
  596. out.RawByte('{')
  597. first := true
  598. _ = first
  599. {
  600. const prefix string = ",\"number\":"
  601. out.RawString(prefix[1:])
  602. out.String(string(in.Number))
  603. }
  604. {
  605. const prefix string = ",\"name\":"
  606. out.RawString(prefix)
  607. out.String(string(in.Name))
  608. }
  609. {
  610. const prefix string = ",\"expiryMonth\":"
  611. out.RawString(prefix)
  612. out.String(string(in.ExpiryMonth))
  613. }
  614. {
  615. const prefix string = ",\"expiryYear\":"
  616. out.RawString(prefix)
  617. out.String(string(in.ExpiryYear))
  618. }
  619. {
  620. const prefix string = ",\"cvc\":"
  621. out.RawString(prefix)
  622. out.String(string(in.Cvc))
  623. }
  624. out.RawByte('}')
  625. }
  626. // MarshalJSON supports json.Marshaler interface
  627. func (v CreditCard) MarshalJSON() ([]byte, error) {
  628. w := jwriter.Writer{}
  629. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill6(&w, v)
  630. return w.Buffer.BuildBytes(), w.Error
  631. }
  632. // MarshalEasyJSON supports easyjson.Marshaler interface
  633. func (v CreditCard) MarshalEasyJSON(w *jwriter.Writer) {
  634. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill6(w, v)
  635. }
  636. // UnmarshalJSON supports json.Unmarshaler interface
  637. func (v *CreditCard) UnmarshalJSON(data []byte) error {
  638. r := jlexer.Lexer{Data: data}
  639. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill6(&r, v)
  640. return r.Error()
  641. }
  642. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  643. func (v *CreditCard) UnmarshalEasyJSON(l *jlexer.Lexer) {
  644. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill6(l, v)
  645. }
  646. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill7(in *jlexer.Lexer, out *AddressUI) {
  647. isTopLevel := in.IsStart()
  648. if in.IsNull() {
  649. if isTopLevel {
  650. in.Consumed()
  651. }
  652. in.Skip()
  653. return
  654. }
  655. in.Delim('{')
  656. for !in.IsDelim('}') {
  657. key := in.UnsafeFieldName(false)
  658. in.WantColon()
  659. if in.IsNull() {
  660. in.Skip()
  661. in.WantComma()
  662. continue
  663. }
  664. switch key {
  665. case "addressFields":
  666. if in.IsNull() {
  667. in.Skip()
  668. out.AddressFields = nil
  669. } else {
  670. in.Delim('[')
  671. if out.AddressFields == nil {
  672. if !in.IsDelim(']') {
  673. out.AddressFields = make([]*AddressFields, 0, 8)
  674. } else {
  675. out.AddressFields = []*AddressFields{}
  676. }
  677. } else {
  678. out.AddressFields = (out.AddressFields)[:0]
  679. }
  680. for !in.IsDelim(']') {
  681. var v7 *AddressFields
  682. if in.IsNull() {
  683. in.Skip()
  684. v7 = nil
  685. } else {
  686. if v7 == nil {
  687. v7 = new(AddressFields)
  688. }
  689. (*v7).UnmarshalEasyJSON(in)
  690. }
  691. out.AddressFields = append(out.AddressFields, v7)
  692. in.WantComma()
  693. }
  694. in.Delim(']')
  695. }
  696. default:
  697. in.SkipRecursive()
  698. }
  699. in.WantComma()
  700. }
  701. in.Delim('}')
  702. if isTopLevel {
  703. in.Consumed()
  704. }
  705. }
  706. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill7(out *jwriter.Writer, in AddressUI) {
  707. out.RawByte('{')
  708. first := true
  709. _ = first
  710. {
  711. const prefix string = ",\"addressFields\":"
  712. out.RawString(prefix[1:])
  713. if in.AddressFields == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  714. out.RawString("null")
  715. } else {
  716. out.RawByte('[')
  717. for v8, v9 := range in.AddressFields {
  718. if v8 > 0 {
  719. out.RawByte(',')
  720. }
  721. if v9 == nil {
  722. out.RawString("null")
  723. } else {
  724. (*v9).MarshalEasyJSON(out)
  725. }
  726. }
  727. out.RawByte(']')
  728. }
  729. }
  730. out.RawByte('}')
  731. }
  732. // MarshalJSON supports json.Marshaler interface
  733. func (v AddressUI) MarshalJSON() ([]byte, error) {
  734. w := jwriter.Writer{}
  735. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill7(&w, v)
  736. return w.Buffer.BuildBytes(), w.Error
  737. }
  738. // MarshalEasyJSON supports easyjson.Marshaler interface
  739. func (v AddressUI) MarshalEasyJSON(w *jwriter.Writer) {
  740. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill7(w, v)
  741. }
  742. // UnmarshalJSON supports json.Unmarshaler interface
  743. func (v *AddressUI) UnmarshalJSON(data []byte) error {
  744. r := jlexer.Lexer{Data: data}
  745. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill7(&r, v)
  746. return r.Error()
  747. }
  748. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  749. func (v *AddressUI) UnmarshalEasyJSON(l *jlexer.Lexer) {
  750. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill7(l, v)
  751. }
  752. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill8(in *jlexer.Lexer, out *AddressFields) {
  753. isTopLevel := in.IsStart()
  754. if in.IsNull() {
  755. if isTopLevel {
  756. in.Consumed()
  757. }
  758. in.Skip()
  759. return
  760. }
  761. in.Delim('{')
  762. for !in.IsDelim('}') {
  763. key := in.UnsafeFieldName(false)
  764. in.WantColon()
  765. if in.IsNull() {
  766. in.Skip()
  767. in.WantComma()
  768. continue
  769. }
  770. switch key {
  771. case "fields":
  772. if in.IsNull() {
  773. in.Skip()
  774. out.Fields = nil
  775. } else {
  776. in.Delim('[')
  777. if out.Fields == nil {
  778. if !in.IsDelim(']') {
  779. out.Fields = make([]*AddressField, 0, 8)
  780. } else {
  781. out.Fields = []*AddressField{}
  782. }
  783. } else {
  784. out.Fields = (out.Fields)[:0]
  785. }
  786. for !in.IsDelim(']') {
  787. var v10 *AddressField
  788. if in.IsNull() {
  789. in.Skip()
  790. v10 = nil
  791. } else {
  792. if v10 == nil {
  793. v10 = new(AddressField)
  794. }
  795. (*v10).UnmarshalEasyJSON(in)
  796. }
  797. out.Fields = append(out.Fields, v10)
  798. in.WantComma()
  799. }
  800. in.Delim(']')
  801. }
  802. default:
  803. in.SkipRecursive()
  804. }
  805. in.WantComma()
  806. }
  807. in.Delim('}')
  808. if isTopLevel {
  809. in.Consumed()
  810. }
  811. }
  812. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill8(out *jwriter.Writer, in AddressFields) {
  813. out.RawByte('{')
  814. first := true
  815. _ = first
  816. {
  817. const prefix string = ",\"fields\":"
  818. out.RawString(prefix[1:])
  819. if in.Fields == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  820. out.RawString("null")
  821. } else {
  822. out.RawByte('[')
  823. for v11, v12 := range in.Fields {
  824. if v11 > 0 {
  825. out.RawByte(',')
  826. }
  827. if v12 == nil {
  828. out.RawString("null")
  829. } else {
  830. (*v12).MarshalEasyJSON(out)
  831. }
  832. }
  833. out.RawByte(']')
  834. }
  835. }
  836. out.RawByte('}')
  837. }
  838. // MarshalJSON supports json.Marshaler interface
  839. func (v AddressFields) MarshalJSON() ([]byte, error) {
  840. w := jwriter.Writer{}
  841. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill8(&w, v)
  842. return w.Buffer.BuildBytes(), w.Error
  843. }
  844. // MarshalEasyJSON supports easyjson.Marshaler interface
  845. func (v AddressFields) MarshalEasyJSON(w *jwriter.Writer) {
  846. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill8(w, v)
  847. }
  848. // UnmarshalJSON supports json.Unmarshaler interface
  849. func (v *AddressFields) UnmarshalJSON(data []byte) error {
  850. r := jlexer.Lexer{Data: data}
  851. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill8(&r, v)
  852. return r.Error()
  853. }
  854. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  855. func (v *AddressFields) UnmarshalEasyJSON(l *jlexer.Lexer) {
  856. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill8(l, v)
  857. }
  858. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill9(in *jlexer.Lexer, out *AddressField) {
  859. isTopLevel := in.IsStart()
  860. if in.IsNull() {
  861. if isTopLevel {
  862. in.Consumed()
  863. }
  864. in.Skip()
  865. return
  866. }
  867. in.Delim('{')
  868. for !in.IsDelim('}') {
  869. key := in.UnsafeFieldName(false)
  870. in.WantColon()
  871. if in.IsNull() {
  872. in.Skip()
  873. in.WantComma()
  874. continue
  875. }
  876. switch key {
  877. case "name":
  878. out.Name = string(in.String())
  879. case "value":
  880. out.Value = string(in.String())
  881. default:
  882. in.SkipRecursive()
  883. }
  884. in.WantComma()
  885. }
  886. in.Delim('}')
  887. if isTopLevel {
  888. in.Consumed()
  889. }
  890. }
  891. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill9(out *jwriter.Writer, in AddressField) {
  892. out.RawByte('{')
  893. first := true
  894. _ = first
  895. {
  896. const prefix string = ",\"name\":"
  897. out.RawString(prefix[1:])
  898. out.String(string(in.Name))
  899. }
  900. {
  901. const prefix string = ",\"value\":"
  902. out.RawString(prefix)
  903. out.String(string(in.Value))
  904. }
  905. out.RawByte('}')
  906. }
  907. // MarshalJSON supports json.Marshaler interface
  908. func (v AddressField) MarshalJSON() ([]byte, error) {
  909. w := jwriter.Writer{}
  910. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill9(&w, v)
  911. return w.Buffer.BuildBytes(), w.Error
  912. }
  913. // MarshalEasyJSON supports easyjson.Marshaler interface
  914. func (v AddressField) MarshalEasyJSON(w *jwriter.Writer) {
  915. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill9(w, v)
  916. }
  917. // UnmarshalJSON supports json.Unmarshaler interface
  918. func (v *AddressField) UnmarshalJSON(data []byte) error {
  919. r := jlexer.Lexer{Data: data}
  920. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill9(&r, v)
  921. return r.Error()
  922. }
  923. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  924. func (v *AddressField) UnmarshalEasyJSON(l *jlexer.Lexer) {
  925. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill9(l, v)
  926. }
  927. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill10(in *jlexer.Lexer, out *Address) {
  928. isTopLevel := in.IsStart()
  929. if in.IsNull() {
  930. if isTopLevel {
  931. in.Consumed()
  932. }
  933. in.Skip()
  934. return
  935. }
  936. in.Delim('{')
  937. for !in.IsDelim('}') {
  938. key := in.UnsafeFieldName(false)
  939. in.WantColon()
  940. if in.IsNull() {
  941. in.Skip()
  942. in.WantComma()
  943. continue
  944. }
  945. switch key {
  946. case "fields":
  947. if in.IsNull() {
  948. in.Skip()
  949. out.Fields = nil
  950. } else {
  951. in.Delim('[')
  952. if out.Fields == nil {
  953. if !in.IsDelim(']') {
  954. out.Fields = make([]*AddressField, 0, 8)
  955. } else {
  956. out.Fields = []*AddressField{}
  957. }
  958. } else {
  959. out.Fields = (out.Fields)[:0]
  960. }
  961. for !in.IsDelim(']') {
  962. var v13 *AddressField
  963. if in.IsNull() {
  964. in.Skip()
  965. v13 = nil
  966. } else {
  967. if v13 == nil {
  968. v13 = new(AddressField)
  969. }
  970. (*v13).UnmarshalEasyJSON(in)
  971. }
  972. out.Fields = append(out.Fields, v13)
  973. in.WantComma()
  974. }
  975. in.Delim(']')
  976. }
  977. default:
  978. in.SkipRecursive()
  979. }
  980. in.WantComma()
  981. }
  982. in.Delim('}')
  983. if isTopLevel {
  984. in.Consumed()
  985. }
  986. }
  987. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill10(out *jwriter.Writer, in Address) {
  988. out.RawByte('{')
  989. first := true
  990. _ = first
  991. {
  992. const prefix string = ",\"fields\":"
  993. out.RawString(prefix[1:])
  994. if in.Fields == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  995. out.RawString("null")
  996. } else {
  997. out.RawByte('[')
  998. for v14, v15 := range in.Fields {
  999. if v14 > 0 {
  1000. out.RawByte(',')
  1001. }
  1002. if v15 == nil {
  1003. out.RawString("null")
  1004. } else {
  1005. (*v15).MarshalEasyJSON(out)
  1006. }
  1007. }
  1008. out.RawByte(']')
  1009. }
  1010. }
  1011. out.RawByte('}')
  1012. }
  1013. // MarshalJSON supports json.Marshaler interface
  1014. func (v Address) MarshalJSON() ([]byte, error) {
  1015. w := jwriter.Writer{}
  1016. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill10(&w, v)
  1017. return w.Buffer.BuildBytes(), w.Error
  1018. }
  1019. // MarshalEasyJSON supports easyjson.Marshaler interface
  1020. func (v Address) MarshalEasyJSON(w *jwriter.Writer) {
  1021. easyjsonC5a4559bEncodeGithubComChromedpCdprotoAutofill10(w, v)
  1022. }
  1023. // UnmarshalJSON supports json.Unmarshaler interface
  1024. func (v *Address) UnmarshalJSON(data []byte) error {
  1025. r := jlexer.Lexer{Data: data}
  1026. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill10(&r, v)
  1027. return r.Error()
  1028. }
  1029. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  1030. func (v *Address) UnmarshalEasyJSON(l *jlexer.Lexer) {
  1031. easyjsonC5a4559bDecodeGithubComChromedpCdprotoAutofill10(l, v)
  1032. }