easyjson.go 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package database
  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 easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase(in *jlexer.Lexer, out *GetDatabaseTableNamesReturns) {
  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 "tableNames":
  36. if in.IsNull() {
  37. in.Skip()
  38. out.TableNames = nil
  39. } else {
  40. in.Delim('[')
  41. if out.TableNames == nil {
  42. if !in.IsDelim(']') {
  43. out.TableNames = make([]string, 0, 4)
  44. } else {
  45. out.TableNames = []string{}
  46. }
  47. } else {
  48. out.TableNames = (out.TableNames)[:0]
  49. }
  50. for !in.IsDelim(']') {
  51. var v1 string
  52. v1 = string(in.String())
  53. out.TableNames = append(out.TableNames, v1)
  54. in.WantComma()
  55. }
  56. in.Delim(']')
  57. }
  58. default:
  59. in.SkipRecursive()
  60. }
  61. in.WantComma()
  62. }
  63. in.Delim('}')
  64. if isTopLevel {
  65. in.Consumed()
  66. }
  67. }
  68. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase(out *jwriter.Writer, in GetDatabaseTableNamesReturns) {
  69. out.RawByte('{')
  70. first := true
  71. _ = first
  72. if len(in.TableNames) != 0 {
  73. const prefix string = ",\"tableNames\":"
  74. first = false
  75. out.RawString(prefix[1:])
  76. {
  77. out.RawByte('[')
  78. for v2, v3 := range in.TableNames {
  79. if v2 > 0 {
  80. out.RawByte(',')
  81. }
  82. out.String(string(v3))
  83. }
  84. out.RawByte(']')
  85. }
  86. }
  87. out.RawByte('}')
  88. }
  89. // MarshalJSON supports json.Marshaler interface
  90. func (v GetDatabaseTableNamesReturns) MarshalJSON() ([]byte, error) {
  91. w := jwriter.Writer{}
  92. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase(&w, v)
  93. return w.Buffer.BuildBytes(), w.Error
  94. }
  95. // MarshalEasyJSON supports easyjson.Marshaler interface
  96. func (v GetDatabaseTableNamesReturns) MarshalEasyJSON(w *jwriter.Writer) {
  97. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase(w, v)
  98. }
  99. // UnmarshalJSON supports json.Unmarshaler interface
  100. func (v *GetDatabaseTableNamesReturns) UnmarshalJSON(data []byte) error {
  101. r := jlexer.Lexer{Data: data}
  102. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase(&r, v)
  103. return r.Error()
  104. }
  105. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  106. func (v *GetDatabaseTableNamesReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  107. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase(l, v)
  108. }
  109. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase1(in *jlexer.Lexer, out *GetDatabaseTableNamesParams) {
  110. isTopLevel := in.IsStart()
  111. if in.IsNull() {
  112. if isTopLevel {
  113. in.Consumed()
  114. }
  115. in.Skip()
  116. return
  117. }
  118. in.Delim('{')
  119. for !in.IsDelim('}') {
  120. key := in.UnsafeFieldName(false)
  121. in.WantColon()
  122. if in.IsNull() {
  123. in.Skip()
  124. in.WantComma()
  125. continue
  126. }
  127. switch key {
  128. case "databaseId":
  129. out.DatabaseID = ID(in.String())
  130. default:
  131. in.SkipRecursive()
  132. }
  133. in.WantComma()
  134. }
  135. in.Delim('}')
  136. if isTopLevel {
  137. in.Consumed()
  138. }
  139. }
  140. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase1(out *jwriter.Writer, in GetDatabaseTableNamesParams) {
  141. out.RawByte('{')
  142. first := true
  143. _ = first
  144. {
  145. const prefix string = ",\"databaseId\":"
  146. out.RawString(prefix[1:])
  147. out.String(string(in.DatabaseID))
  148. }
  149. out.RawByte('}')
  150. }
  151. // MarshalJSON supports json.Marshaler interface
  152. func (v GetDatabaseTableNamesParams) MarshalJSON() ([]byte, error) {
  153. w := jwriter.Writer{}
  154. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase1(&w, v)
  155. return w.Buffer.BuildBytes(), w.Error
  156. }
  157. // MarshalEasyJSON supports easyjson.Marshaler interface
  158. func (v GetDatabaseTableNamesParams) MarshalEasyJSON(w *jwriter.Writer) {
  159. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase1(w, v)
  160. }
  161. // UnmarshalJSON supports json.Unmarshaler interface
  162. func (v *GetDatabaseTableNamesParams) UnmarshalJSON(data []byte) error {
  163. r := jlexer.Lexer{Data: data}
  164. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase1(&r, v)
  165. return r.Error()
  166. }
  167. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  168. func (v *GetDatabaseTableNamesParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  169. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase1(l, v)
  170. }
  171. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase2(in *jlexer.Lexer, out *ExecuteSQLReturns) {
  172. isTopLevel := in.IsStart()
  173. if in.IsNull() {
  174. if isTopLevel {
  175. in.Consumed()
  176. }
  177. in.Skip()
  178. return
  179. }
  180. in.Delim('{')
  181. for !in.IsDelim('}') {
  182. key := in.UnsafeFieldName(false)
  183. in.WantColon()
  184. if in.IsNull() {
  185. in.Skip()
  186. in.WantComma()
  187. continue
  188. }
  189. switch key {
  190. case "columnNames":
  191. if in.IsNull() {
  192. in.Skip()
  193. out.ColumnNames = nil
  194. } else {
  195. in.Delim('[')
  196. if out.ColumnNames == nil {
  197. if !in.IsDelim(']') {
  198. out.ColumnNames = make([]string, 0, 4)
  199. } else {
  200. out.ColumnNames = []string{}
  201. }
  202. } else {
  203. out.ColumnNames = (out.ColumnNames)[:0]
  204. }
  205. for !in.IsDelim(']') {
  206. var v4 string
  207. v4 = string(in.String())
  208. out.ColumnNames = append(out.ColumnNames, v4)
  209. in.WantComma()
  210. }
  211. in.Delim(']')
  212. }
  213. case "values":
  214. if in.IsNull() {
  215. in.Skip()
  216. out.Values = nil
  217. } else {
  218. in.Delim('[')
  219. if out.Values == nil {
  220. if !in.IsDelim(']') {
  221. out.Values = make([]easyjson.RawMessage, 0, 2)
  222. } else {
  223. out.Values = []easyjson.RawMessage{}
  224. }
  225. } else {
  226. out.Values = (out.Values)[:0]
  227. }
  228. for !in.IsDelim(']') {
  229. var v5 easyjson.RawMessage
  230. (v5).UnmarshalEasyJSON(in)
  231. out.Values = append(out.Values, v5)
  232. in.WantComma()
  233. }
  234. in.Delim(']')
  235. }
  236. case "sqlError":
  237. if in.IsNull() {
  238. in.Skip()
  239. out.SQLError = nil
  240. } else {
  241. if out.SQLError == nil {
  242. out.SQLError = new(Error)
  243. }
  244. (*out.SQLError).UnmarshalEasyJSON(in)
  245. }
  246. default:
  247. in.SkipRecursive()
  248. }
  249. in.WantComma()
  250. }
  251. in.Delim('}')
  252. if isTopLevel {
  253. in.Consumed()
  254. }
  255. }
  256. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase2(out *jwriter.Writer, in ExecuteSQLReturns) {
  257. out.RawByte('{')
  258. first := true
  259. _ = first
  260. if len(in.ColumnNames) != 0 {
  261. const prefix string = ",\"columnNames\":"
  262. first = false
  263. out.RawString(prefix[1:])
  264. {
  265. out.RawByte('[')
  266. for v6, v7 := range in.ColumnNames {
  267. if v6 > 0 {
  268. out.RawByte(',')
  269. }
  270. out.String(string(v7))
  271. }
  272. out.RawByte(']')
  273. }
  274. }
  275. if len(in.Values) != 0 {
  276. const prefix string = ",\"values\":"
  277. if first {
  278. first = false
  279. out.RawString(prefix[1:])
  280. } else {
  281. out.RawString(prefix)
  282. }
  283. {
  284. out.RawByte('[')
  285. for v8, v9 := range in.Values {
  286. if v8 > 0 {
  287. out.RawByte(',')
  288. }
  289. (v9).MarshalEasyJSON(out)
  290. }
  291. out.RawByte(']')
  292. }
  293. }
  294. if in.SQLError != nil {
  295. const prefix string = ",\"sqlError\":"
  296. if first {
  297. first = false
  298. out.RawString(prefix[1:])
  299. } else {
  300. out.RawString(prefix)
  301. }
  302. (*in.SQLError).MarshalEasyJSON(out)
  303. }
  304. out.RawByte('}')
  305. }
  306. // MarshalJSON supports json.Marshaler interface
  307. func (v ExecuteSQLReturns) MarshalJSON() ([]byte, error) {
  308. w := jwriter.Writer{}
  309. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase2(&w, v)
  310. return w.Buffer.BuildBytes(), w.Error
  311. }
  312. // MarshalEasyJSON supports easyjson.Marshaler interface
  313. func (v ExecuteSQLReturns) MarshalEasyJSON(w *jwriter.Writer) {
  314. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase2(w, v)
  315. }
  316. // UnmarshalJSON supports json.Unmarshaler interface
  317. func (v *ExecuteSQLReturns) UnmarshalJSON(data []byte) error {
  318. r := jlexer.Lexer{Data: data}
  319. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase2(&r, v)
  320. return r.Error()
  321. }
  322. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  323. func (v *ExecuteSQLReturns) UnmarshalEasyJSON(l *jlexer.Lexer) {
  324. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase2(l, v)
  325. }
  326. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase3(in *jlexer.Lexer, out *ExecuteSQLParams) {
  327. isTopLevel := in.IsStart()
  328. if in.IsNull() {
  329. if isTopLevel {
  330. in.Consumed()
  331. }
  332. in.Skip()
  333. return
  334. }
  335. in.Delim('{')
  336. for !in.IsDelim('}') {
  337. key := in.UnsafeFieldName(false)
  338. in.WantColon()
  339. if in.IsNull() {
  340. in.Skip()
  341. in.WantComma()
  342. continue
  343. }
  344. switch key {
  345. case "databaseId":
  346. out.DatabaseID = ID(in.String())
  347. case "query":
  348. out.Query = string(in.String())
  349. default:
  350. in.SkipRecursive()
  351. }
  352. in.WantComma()
  353. }
  354. in.Delim('}')
  355. if isTopLevel {
  356. in.Consumed()
  357. }
  358. }
  359. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase3(out *jwriter.Writer, in ExecuteSQLParams) {
  360. out.RawByte('{')
  361. first := true
  362. _ = first
  363. {
  364. const prefix string = ",\"databaseId\":"
  365. out.RawString(prefix[1:])
  366. out.String(string(in.DatabaseID))
  367. }
  368. {
  369. const prefix string = ",\"query\":"
  370. out.RawString(prefix)
  371. out.String(string(in.Query))
  372. }
  373. out.RawByte('}')
  374. }
  375. // MarshalJSON supports json.Marshaler interface
  376. func (v ExecuteSQLParams) MarshalJSON() ([]byte, error) {
  377. w := jwriter.Writer{}
  378. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase3(&w, v)
  379. return w.Buffer.BuildBytes(), w.Error
  380. }
  381. // MarshalEasyJSON supports easyjson.Marshaler interface
  382. func (v ExecuteSQLParams) MarshalEasyJSON(w *jwriter.Writer) {
  383. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase3(w, v)
  384. }
  385. // UnmarshalJSON supports json.Unmarshaler interface
  386. func (v *ExecuteSQLParams) UnmarshalJSON(data []byte) error {
  387. r := jlexer.Lexer{Data: data}
  388. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase3(&r, v)
  389. return r.Error()
  390. }
  391. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  392. func (v *ExecuteSQLParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  393. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase3(l, v)
  394. }
  395. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase4(in *jlexer.Lexer, out *EventAddDatabase) {
  396. isTopLevel := in.IsStart()
  397. if in.IsNull() {
  398. if isTopLevel {
  399. in.Consumed()
  400. }
  401. in.Skip()
  402. return
  403. }
  404. in.Delim('{')
  405. for !in.IsDelim('}') {
  406. key := in.UnsafeFieldName(false)
  407. in.WantColon()
  408. if in.IsNull() {
  409. in.Skip()
  410. in.WantComma()
  411. continue
  412. }
  413. switch key {
  414. case "database":
  415. if in.IsNull() {
  416. in.Skip()
  417. out.Database = nil
  418. } else {
  419. if out.Database == nil {
  420. out.Database = new(Database)
  421. }
  422. (*out.Database).UnmarshalEasyJSON(in)
  423. }
  424. default:
  425. in.SkipRecursive()
  426. }
  427. in.WantComma()
  428. }
  429. in.Delim('}')
  430. if isTopLevel {
  431. in.Consumed()
  432. }
  433. }
  434. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase4(out *jwriter.Writer, in EventAddDatabase) {
  435. out.RawByte('{')
  436. first := true
  437. _ = first
  438. {
  439. const prefix string = ",\"database\":"
  440. out.RawString(prefix[1:])
  441. if in.Database == nil {
  442. out.RawString("null")
  443. } else {
  444. (*in.Database).MarshalEasyJSON(out)
  445. }
  446. }
  447. out.RawByte('}')
  448. }
  449. // MarshalJSON supports json.Marshaler interface
  450. func (v EventAddDatabase) MarshalJSON() ([]byte, error) {
  451. w := jwriter.Writer{}
  452. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase4(&w, v)
  453. return w.Buffer.BuildBytes(), w.Error
  454. }
  455. // MarshalEasyJSON supports easyjson.Marshaler interface
  456. func (v EventAddDatabase) MarshalEasyJSON(w *jwriter.Writer) {
  457. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase4(w, v)
  458. }
  459. // UnmarshalJSON supports json.Unmarshaler interface
  460. func (v *EventAddDatabase) UnmarshalJSON(data []byte) error {
  461. r := jlexer.Lexer{Data: data}
  462. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase4(&r, v)
  463. return r.Error()
  464. }
  465. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  466. func (v *EventAddDatabase) UnmarshalEasyJSON(l *jlexer.Lexer) {
  467. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase4(l, v)
  468. }
  469. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase5(in *jlexer.Lexer, out *Error) {
  470. isTopLevel := in.IsStart()
  471. if in.IsNull() {
  472. if isTopLevel {
  473. in.Consumed()
  474. }
  475. in.Skip()
  476. return
  477. }
  478. in.Delim('{')
  479. for !in.IsDelim('}') {
  480. key := in.UnsafeFieldName(false)
  481. in.WantColon()
  482. if in.IsNull() {
  483. in.Skip()
  484. in.WantComma()
  485. continue
  486. }
  487. switch key {
  488. case "message":
  489. out.Message = string(in.String())
  490. case "code":
  491. out.Code = int64(in.Int64())
  492. default:
  493. in.SkipRecursive()
  494. }
  495. in.WantComma()
  496. }
  497. in.Delim('}')
  498. if isTopLevel {
  499. in.Consumed()
  500. }
  501. }
  502. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase5(out *jwriter.Writer, in Error) {
  503. out.RawByte('{')
  504. first := true
  505. _ = first
  506. {
  507. const prefix string = ",\"message\":"
  508. out.RawString(prefix[1:])
  509. out.String(string(in.Message))
  510. }
  511. {
  512. const prefix string = ",\"code\":"
  513. out.RawString(prefix)
  514. out.Int64(int64(in.Code))
  515. }
  516. out.RawByte('}')
  517. }
  518. // MarshalJSON supports json.Marshaler interface
  519. func (v Error) MarshalJSON() ([]byte, error) {
  520. w := jwriter.Writer{}
  521. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase5(&w, v)
  522. return w.Buffer.BuildBytes(), w.Error
  523. }
  524. // MarshalEasyJSON supports easyjson.Marshaler interface
  525. func (v Error) MarshalEasyJSON(w *jwriter.Writer) {
  526. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase5(w, v)
  527. }
  528. // UnmarshalJSON supports json.Unmarshaler interface
  529. func (v *Error) UnmarshalJSON(data []byte) error {
  530. r := jlexer.Lexer{Data: data}
  531. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase5(&r, v)
  532. return r.Error()
  533. }
  534. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  535. func (v *Error) UnmarshalEasyJSON(l *jlexer.Lexer) {
  536. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase5(l, v)
  537. }
  538. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase6(in *jlexer.Lexer, out *EnableParams) {
  539. isTopLevel := in.IsStart()
  540. if in.IsNull() {
  541. if isTopLevel {
  542. in.Consumed()
  543. }
  544. in.Skip()
  545. return
  546. }
  547. in.Delim('{')
  548. for !in.IsDelim('}') {
  549. key := in.UnsafeFieldName(false)
  550. in.WantColon()
  551. if in.IsNull() {
  552. in.Skip()
  553. in.WantComma()
  554. continue
  555. }
  556. switch key {
  557. default:
  558. in.SkipRecursive()
  559. }
  560. in.WantComma()
  561. }
  562. in.Delim('}')
  563. if isTopLevel {
  564. in.Consumed()
  565. }
  566. }
  567. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase6(out *jwriter.Writer, in EnableParams) {
  568. out.RawByte('{')
  569. first := true
  570. _ = first
  571. out.RawByte('}')
  572. }
  573. // MarshalJSON supports json.Marshaler interface
  574. func (v EnableParams) MarshalJSON() ([]byte, error) {
  575. w := jwriter.Writer{}
  576. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase6(&w, v)
  577. return w.Buffer.BuildBytes(), w.Error
  578. }
  579. // MarshalEasyJSON supports easyjson.Marshaler interface
  580. func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
  581. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase6(w, v)
  582. }
  583. // UnmarshalJSON supports json.Unmarshaler interface
  584. func (v *EnableParams) UnmarshalJSON(data []byte) error {
  585. r := jlexer.Lexer{Data: data}
  586. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase6(&r, v)
  587. return r.Error()
  588. }
  589. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  590. func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  591. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase6(l, v)
  592. }
  593. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase7(in *jlexer.Lexer, out *DisableParams) {
  594. isTopLevel := in.IsStart()
  595. if in.IsNull() {
  596. if isTopLevel {
  597. in.Consumed()
  598. }
  599. in.Skip()
  600. return
  601. }
  602. in.Delim('{')
  603. for !in.IsDelim('}') {
  604. key := in.UnsafeFieldName(false)
  605. in.WantColon()
  606. if in.IsNull() {
  607. in.Skip()
  608. in.WantComma()
  609. continue
  610. }
  611. switch key {
  612. default:
  613. in.SkipRecursive()
  614. }
  615. in.WantComma()
  616. }
  617. in.Delim('}')
  618. if isTopLevel {
  619. in.Consumed()
  620. }
  621. }
  622. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase7(out *jwriter.Writer, in DisableParams) {
  623. out.RawByte('{')
  624. first := true
  625. _ = first
  626. out.RawByte('}')
  627. }
  628. // MarshalJSON supports json.Marshaler interface
  629. func (v DisableParams) MarshalJSON() ([]byte, error) {
  630. w := jwriter.Writer{}
  631. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase7(&w, v)
  632. return w.Buffer.BuildBytes(), w.Error
  633. }
  634. // MarshalEasyJSON supports easyjson.Marshaler interface
  635. func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
  636. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase7(w, v)
  637. }
  638. // UnmarshalJSON supports json.Unmarshaler interface
  639. func (v *DisableParams) UnmarshalJSON(data []byte) error {
  640. r := jlexer.Lexer{Data: data}
  641. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase7(&r, v)
  642. return r.Error()
  643. }
  644. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  645. func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  646. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase7(l, v)
  647. }
  648. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase8(in *jlexer.Lexer, out *Database) {
  649. isTopLevel := in.IsStart()
  650. if in.IsNull() {
  651. if isTopLevel {
  652. in.Consumed()
  653. }
  654. in.Skip()
  655. return
  656. }
  657. in.Delim('{')
  658. for !in.IsDelim('}') {
  659. key := in.UnsafeFieldName(false)
  660. in.WantColon()
  661. if in.IsNull() {
  662. in.Skip()
  663. in.WantComma()
  664. continue
  665. }
  666. switch key {
  667. case "id":
  668. out.ID = ID(in.String())
  669. case "domain":
  670. out.Domain = string(in.String())
  671. case "name":
  672. out.Name = string(in.String())
  673. case "version":
  674. out.Version = string(in.String())
  675. default:
  676. in.SkipRecursive()
  677. }
  678. in.WantComma()
  679. }
  680. in.Delim('}')
  681. if isTopLevel {
  682. in.Consumed()
  683. }
  684. }
  685. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase8(out *jwriter.Writer, in Database) {
  686. out.RawByte('{')
  687. first := true
  688. _ = first
  689. {
  690. const prefix string = ",\"id\":"
  691. out.RawString(prefix[1:])
  692. out.String(string(in.ID))
  693. }
  694. {
  695. const prefix string = ",\"domain\":"
  696. out.RawString(prefix)
  697. out.String(string(in.Domain))
  698. }
  699. {
  700. const prefix string = ",\"name\":"
  701. out.RawString(prefix)
  702. out.String(string(in.Name))
  703. }
  704. {
  705. const prefix string = ",\"version\":"
  706. out.RawString(prefix)
  707. out.String(string(in.Version))
  708. }
  709. out.RawByte('}')
  710. }
  711. // MarshalJSON supports json.Marshaler interface
  712. func (v Database) MarshalJSON() ([]byte, error) {
  713. w := jwriter.Writer{}
  714. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase8(&w, v)
  715. return w.Buffer.BuildBytes(), w.Error
  716. }
  717. // MarshalEasyJSON supports easyjson.Marshaler interface
  718. func (v Database) MarshalEasyJSON(w *jwriter.Writer) {
  719. easyjsonC5a4559bEncodeGithubComChromedpCdprotoDatabase8(w, v)
  720. }
  721. // UnmarshalJSON supports json.Unmarshaler interface
  722. func (v *Database) UnmarshalJSON(data []byte) error {
  723. r := jlexer.Lexer{Data: data}
  724. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase8(&r, v)
  725. return r.Error()
  726. }
  727. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  728. func (v *Database) UnmarshalEasyJSON(l *jlexer.Lexer) {
  729. easyjsonC5a4559bDecodeGithubComChromedpCdprotoDatabase8(l, v)
  730. }