easyjson.go 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901
  1. // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
  2. package security
  3. import (
  4. json "encoding/json"
  5. cdp "github.com/chromedp/cdproto/cdp"
  6. easyjson "github.com/mailru/easyjson"
  7. jlexer "github.com/mailru/easyjson/jlexer"
  8. jwriter "github.com/mailru/easyjson/jwriter"
  9. )
  10. // suppress unused package warning
  11. var (
  12. _ *json.RawMessage
  13. _ *jlexer.Lexer
  14. _ *jwriter.Writer
  15. _ easyjson.Marshaler
  16. )
  17. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity(in *jlexer.Lexer, out *VisibleSecurityState) {
  18. isTopLevel := in.IsStart()
  19. if in.IsNull() {
  20. if isTopLevel {
  21. in.Consumed()
  22. }
  23. in.Skip()
  24. return
  25. }
  26. in.Delim('{')
  27. for !in.IsDelim('}') {
  28. key := in.UnsafeFieldName(false)
  29. in.WantColon()
  30. if in.IsNull() {
  31. in.Skip()
  32. in.WantComma()
  33. continue
  34. }
  35. switch key {
  36. case "securityState":
  37. (out.SecurityState).UnmarshalEasyJSON(in)
  38. case "certificateSecurityState":
  39. if in.IsNull() {
  40. in.Skip()
  41. out.CertificateSecurityState = nil
  42. } else {
  43. if out.CertificateSecurityState == nil {
  44. out.CertificateSecurityState = new(CertificateSecurityState)
  45. }
  46. (*out.CertificateSecurityState).UnmarshalEasyJSON(in)
  47. }
  48. case "safetyTipInfo":
  49. if in.IsNull() {
  50. in.Skip()
  51. out.SafetyTipInfo = nil
  52. } else {
  53. if out.SafetyTipInfo == nil {
  54. out.SafetyTipInfo = new(SafetyTipInfo)
  55. }
  56. (*out.SafetyTipInfo).UnmarshalEasyJSON(in)
  57. }
  58. case "securityStateIssueIds":
  59. if in.IsNull() {
  60. in.Skip()
  61. out.SecurityStateIssueIDs = nil
  62. } else {
  63. in.Delim('[')
  64. if out.SecurityStateIssueIDs == nil {
  65. if !in.IsDelim(']') {
  66. out.SecurityStateIssueIDs = make([]string, 0, 4)
  67. } else {
  68. out.SecurityStateIssueIDs = []string{}
  69. }
  70. } else {
  71. out.SecurityStateIssueIDs = (out.SecurityStateIssueIDs)[:0]
  72. }
  73. for !in.IsDelim(']') {
  74. var v1 string
  75. v1 = string(in.String())
  76. out.SecurityStateIssueIDs = append(out.SecurityStateIssueIDs, v1)
  77. in.WantComma()
  78. }
  79. in.Delim(']')
  80. }
  81. default:
  82. in.SkipRecursive()
  83. }
  84. in.WantComma()
  85. }
  86. in.Delim('}')
  87. if isTopLevel {
  88. in.Consumed()
  89. }
  90. }
  91. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity(out *jwriter.Writer, in VisibleSecurityState) {
  92. out.RawByte('{')
  93. first := true
  94. _ = first
  95. {
  96. const prefix string = ",\"securityState\":"
  97. out.RawString(prefix[1:])
  98. (in.SecurityState).MarshalEasyJSON(out)
  99. }
  100. if in.CertificateSecurityState != nil {
  101. const prefix string = ",\"certificateSecurityState\":"
  102. out.RawString(prefix)
  103. (*in.CertificateSecurityState).MarshalEasyJSON(out)
  104. }
  105. if in.SafetyTipInfo != nil {
  106. const prefix string = ",\"safetyTipInfo\":"
  107. out.RawString(prefix)
  108. (*in.SafetyTipInfo).MarshalEasyJSON(out)
  109. }
  110. {
  111. const prefix string = ",\"securityStateIssueIds\":"
  112. out.RawString(prefix)
  113. if in.SecurityStateIssueIDs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  114. out.RawString("null")
  115. } else {
  116. out.RawByte('[')
  117. for v2, v3 := range in.SecurityStateIssueIDs {
  118. if v2 > 0 {
  119. out.RawByte(',')
  120. }
  121. out.String(string(v3))
  122. }
  123. out.RawByte(']')
  124. }
  125. }
  126. out.RawByte('}')
  127. }
  128. // MarshalJSON supports json.Marshaler interface
  129. func (v VisibleSecurityState) MarshalJSON() ([]byte, error) {
  130. w := jwriter.Writer{}
  131. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity(&w, v)
  132. return w.Buffer.BuildBytes(), w.Error
  133. }
  134. // MarshalEasyJSON supports easyjson.Marshaler interface
  135. func (v VisibleSecurityState) MarshalEasyJSON(w *jwriter.Writer) {
  136. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity(w, v)
  137. }
  138. // UnmarshalJSON supports json.Unmarshaler interface
  139. func (v *VisibleSecurityState) UnmarshalJSON(data []byte) error {
  140. r := jlexer.Lexer{Data: data}
  141. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity(&r, v)
  142. return r.Error()
  143. }
  144. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  145. func (v *VisibleSecurityState) UnmarshalEasyJSON(l *jlexer.Lexer) {
  146. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity(l, v)
  147. }
  148. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity1(in *jlexer.Lexer, out *StateExplanation) {
  149. isTopLevel := in.IsStart()
  150. if in.IsNull() {
  151. if isTopLevel {
  152. in.Consumed()
  153. }
  154. in.Skip()
  155. return
  156. }
  157. in.Delim('{')
  158. for !in.IsDelim('}') {
  159. key := in.UnsafeFieldName(false)
  160. in.WantColon()
  161. if in.IsNull() {
  162. in.Skip()
  163. in.WantComma()
  164. continue
  165. }
  166. switch key {
  167. case "securityState":
  168. (out.SecurityState).UnmarshalEasyJSON(in)
  169. case "title":
  170. out.Title = string(in.String())
  171. case "summary":
  172. out.Summary = string(in.String())
  173. case "description":
  174. out.Description = string(in.String())
  175. case "mixedContentType":
  176. (out.MixedContentType).UnmarshalEasyJSON(in)
  177. case "certificate":
  178. if in.IsNull() {
  179. in.Skip()
  180. out.Certificate = nil
  181. } else {
  182. in.Delim('[')
  183. if out.Certificate == nil {
  184. if !in.IsDelim(']') {
  185. out.Certificate = make([]string, 0, 4)
  186. } else {
  187. out.Certificate = []string{}
  188. }
  189. } else {
  190. out.Certificate = (out.Certificate)[:0]
  191. }
  192. for !in.IsDelim(']') {
  193. var v4 string
  194. v4 = string(in.String())
  195. out.Certificate = append(out.Certificate, v4)
  196. in.WantComma()
  197. }
  198. in.Delim(']')
  199. }
  200. case "recommendations":
  201. if in.IsNull() {
  202. in.Skip()
  203. out.Recommendations = nil
  204. } else {
  205. in.Delim('[')
  206. if out.Recommendations == nil {
  207. if !in.IsDelim(']') {
  208. out.Recommendations = make([]string, 0, 4)
  209. } else {
  210. out.Recommendations = []string{}
  211. }
  212. } else {
  213. out.Recommendations = (out.Recommendations)[:0]
  214. }
  215. for !in.IsDelim(']') {
  216. var v5 string
  217. v5 = string(in.String())
  218. out.Recommendations = append(out.Recommendations, v5)
  219. in.WantComma()
  220. }
  221. in.Delim(']')
  222. }
  223. default:
  224. in.SkipRecursive()
  225. }
  226. in.WantComma()
  227. }
  228. in.Delim('}')
  229. if isTopLevel {
  230. in.Consumed()
  231. }
  232. }
  233. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity1(out *jwriter.Writer, in StateExplanation) {
  234. out.RawByte('{')
  235. first := true
  236. _ = first
  237. {
  238. const prefix string = ",\"securityState\":"
  239. out.RawString(prefix[1:])
  240. (in.SecurityState).MarshalEasyJSON(out)
  241. }
  242. {
  243. const prefix string = ",\"title\":"
  244. out.RawString(prefix)
  245. out.String(string(in.Title))
  246. }
  247. {
  248. const prefix string = ",\"summary\":"
  249. out.RawString(prefix)
  250. out.String(string(in.Summary))
  251. }
  252. {
  253. const prefix string = ",\"description\":"
  254. out.RawString(prefix)
  255. out.String(string(in.Description))
  256. }
  257. {
  258. const prefix string = ",\"mixedContentType\":"
  259. out.RawString(prefix)
  260. (in.MixedContentType).MarshalEasyJSON(out)
  261. }
  262. {
  263. const prefix string = ",\"certificate\":"
  264. out.RawString(prefix)
  265. if in.Certificate == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  266. out.RawString("null")
  267. } else {
  268. out.RawByte('[')
  269. for v6, v7 := range in.Certificate {
  270. if v6 > 0 {
  271. out.RawByte(',')
  272. }
  273. out.String(string(v7))
  274. }
  275. out.RawByte(']')
  276. }
  277. }
  278. if len(in.Recommendations) != 0 {
  279. const prefix string = ",\"recommendations\":"
  280. out.RawString(prefix)
  281. {
  282. out.RawByte('[')
  283. for v8, v9 := range in.Recommendations {
  284. if v8 > 0 {
  285. out.RawByte(',')
  286. }
  287. out.String(string(v9))
  288. }
  289. out.RawByte(']')
  290. }
  291. }
  292. out.RawByte('}')
  293. }
  294. // MarshalJSON supports json.Marshaler interface
  295. func (v StateExplanation) MarshalJSON() ([]byte, error) {
  296. w := jwriter.Writer{}
  297. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity1(&w, v)
  298. return w.Buffer.BuildBytes(), w.Error
  299. }
  300. // MarshalEasyJSON supports easyjson.Marshaler interface
  301. func (v StateExplanation) MarshalEasyJSON(w *jwriter.Writer) {
  302. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity1(w, v)
  303. }
  304. // UnmarshalJSON supports json.Unmarshaler interface
  305. func (v *StateExplanation) UnmarshalJSON(data []byte) error {
  306. r := jlexer.Lexer{Data: data}
  307. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity1(&r, v)
  308. return r.Error()
  309. }
  310. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  311. func (v *StateExplanation) UnmarshalEasyJSON(l *jlexer.Lexer) {
  312. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity1(l, v)
  313. }
  314. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity2(in *jlexer.Lexer, out *SetIgnoreCertificateErrorsParams) {
  315. isTopLevel := in.IsStart()
  316. if in.IsNull() {
  317. if isTopLevel {
  318. in.Consumed()
  319. }
  320. in.Skip()
  321. return
  322. }
  323. in.Delim('{')
  324. for !in.IsDelim('}') {
  325. key := in.UnsafeFieldName(false)
  326. in.WantColon()
  327. if in.IsNull() {
  328. in.Skip()
  329. in.WantComma()
  330. continue
  331. }
  332. switch key {
  333. case "ignore":
  334. out.Ignore = bool(in.Bool())
  335. default:
  336. in.SkipRecursive()
  337. }
  338. in.WantComma()
  339. }
  340. in.Delim('}')
  341. if isTopLevel {
  342. in.Consumed()
  343. }
  344. }
  345. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity2(out *jwriter.Writer, in SetIgnoreCertificateErrorsParams) {
  346. out.RawByte('{')
  347. first := true
  348. _ = first
  349. {
  350. const prefix string = ",\"ignore\":"
  351. out.RawString(prefix[1:])
  352. out.Bool(bool(in.Ignore))
  353. }
  354. out.RawByte('}')
  355. }
  356. // MarshalJSON supports json.Marshaler interface
  357. func (v SetIgnoreCertificateErrorsParams) MarshalJSON() ([]byte, error) {
  358. w := jwriter.Writer{}
  359. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity2(&w, v)
  360. return w.Buffer.BuildBytes(), w.Error
  361. }
  362. // MarshalEasyJSON supports easyjson.Marshaler interface
  363. func (v SetIgnoreCertificateErrorsParams) MarshalEasyJSON(w *jwriter.Writer) {
  364. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity2(w, v)
  365. }
  366. // UnmarshalJSON supports json.Unmarshaler interface
  367. func (v *SetIgnoreCertificateErrorsParams) UnmarshalJSON(data []byte) error {
  368. r := jlexer.Lexer{Data: data}
  369. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity2(&r, v)
  370. return r.Error()
  371. }
  372. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  373. func (v *SetIgnoreCertificateErrorsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  374. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity2(l, v)
  375. }
  376. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity3(in *jlexer.Lexer, out *SafetyTipInfo) {
  377. isTopLevel := in.IsStart()
  378. if in.IsNull() {
  379. if isTopLevel {
  380. in.Consumed()
  381. }
  382. in.Skip()
  383. return
  384. }
  385. in.Delim('{')
  386. for !in.IsDelim('}') {
  387. key := in.UnsafeFieldName(false)
  388. in.WantColon()
  389. if in.IsNull() {
  390. in.Skip()
  391. in.WantComma()
  392. continue
  393. }
  394. switch key {
  395. case "safetyTipStatus":
  396. (out.SafetyTipStatus).UnmarshalEasyJSON(in)
  397. case "safeUrl":
  398. out.SafeURL = string(in.String())
  399. default:
  400. in.SkipRecursive()
  401. }
  402. in.WantComma()
  403. }
  404. in.Delim('}')
  405. if isTopLevel {
  406. in.Consumed()
  407. }
  408. }
  409. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity3(out *jwriter.Writer, in SafetyTipInfo) {
  410. out.RawByte('{')
  411. first := true
  412. _ = first
  413. {
  414. const prefix string = ",\"safetyTipStatus\":"
  415. out.RawString(prefix[1:])
  416. (in.SafetyTipStatus).MarshalEasyJSON(out)
  417. }
  418. if in.SafeURL != "" {
  419. const prefix string = ",\"safeUrl\":"
  420. out.RawString(prefix)
  421. out.String(string(in.SafeURL))
  422. }
  423. out.RawByte('}')
  424. }
  425. // MarshalJSON supports json.Marshaler interface
  426. func (v SafetyTipInfo) MarshalJSON() ([]byte, error) {
  427. w := jwriter.Writer{}
  428. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity3(&w, v)
  429. return w.Buffer.BuildBytes(), w.Error
  430. }
  431. // MarshalEasyJSON supports easyjson.Marshaler interface
  432. func (v SafetyTipInfo) MarshalEasyJSON(w *jwriter.Writer) {
  433. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity3(w, v)
  434. }
  435. // UnmarshalJSON supports json.Unmarshaler interface
  436. func (v *SafetyTipInfo) UnmarshalJSON(data []byte) error {
  437. r := jlexer.Lexer{Data: data}
  438. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity3(&r, v)
  439. return r.Error()
  440. }
  441. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  442. func (v *SafetyTipInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
  443. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity3(l, v)
  444. }
  445. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity4(in *jlexer.Lexer, out *EventVisibleSecurityStateChanged) {
  446. isTopLevel := in.IsStart()
  447. if in.IsNull() {
  448. if isTopLevel {
  449. in.Consumed()
  450. }
  451. in.Skip()
  452. return
  453. }
  454. in.Delim('{')
  455. for !in.IsDelim('}') {
  456. key := in.UnsafeFieldName(false)
  457. in.WantColon()
  458. if in.IsNull() {
  459. in.Skip()
  460. in.WantComma()
  461. continue
  462. }
  463. switch key {
  464. case "visibleSecurityState":
  465. if in.IsNull() {
  466. in.Skip()
  467. out.VisibleSecurityState = nil
  468. } else {
  469. if out.VisibleSecurityState == nil {
  470. out.VisibleSecurityState = new(VisibleSecurityState)
  471. }
  472. (*out.VisibleSecurityState).UnmarshalEasyJSON(in)
  473. }
  474. default:
  475. in.SkipRecursive()
  476. }
  477. in.WantComma()
  478. }
  479. in.Delim('}')
  480. if isTopLevel {
  481. in.Consumed()
  482. }
  483. }
  484. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity4(out *jwriter.Writer, in EventVisibleSecurityStateChanged) {
  485. out.RawByte('{')
  486. first := true
  487. _ = first
  488. {
  489. const prefix string = ",\"visibleSecurityState\":"
  490. out.RawString(prefix[1:])
  491. if in.VisibleSecurityState == nil {
  492. out.RawString("null")
  493. } else {
  494. (*in.VisibleSecurityState).MarshalEasyJSON(out)
  495. }
  496. }
  497. out.RawByte('}')
  498. }
  499. // MarshalJSON supports json.Marshaler interface
  500. func (v EventVisibleSecurityStateChanged) MarshalJSON() ([]byte, error) {
  501. w := jwriter.Writer{}
  502. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity4(&w, v)
  503. return w.Buffer.BuildBytes(), w.Error
  504. }
  505. // MarshalEasyJSON supports easyjson.Marshaler interface
  506. func (v EventVisibleSecurityStateChanged) MarshalEasyJSON(w *jwriter.Writer) {
  507. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity4(w, v)
  508. }
  509. // UnmarshalJSON supports json.Unmarshaler interface
  510. func (v *EventVisibleSecurityStateChanged) UnmarshalJSON(data []byte) error {
  511. r := jlexer.Lexer{Data: data}
  512. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity4(&r, v)
  513. return r.Error()
  514. }
  515. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  516. func (v *EventVisibleSecurityStateChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
  517. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity4(l, v)
  518. }
  519. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(in *jlexer.Lexer, out *EnableParams) {
  520. isTopLevel := in.IsStart()
  521. if in.IsNull() {
  522. if isTopLevel {
  523. in.Consumed()
  524. }
  525. in.Skip()
  526. return
  527. }
  528. in.Delim('{')
  529. for !in.IsDelim('}') {
  530. key := in.UnsafeFieldName(false)
  531. in.WantColon()
  532. if in.IsNull() {
  533. in.Skip()
  534. in.WantComma()
  535. continue
  536. }
  537. switch key {
  538. default:
  539. in.SkipRecursive()
  540. }
  541. in.WantComma()
  542. }
  543. in.Delim('}')
  544. if isTopLevel {
  545. in.Consumed()
  546. }
  547. }
  548. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(out *jwriter.Writer, in EnableParams) {
  549. out.RawByte('{')
  550. first := true
  551. _ = first
  552. out.RawByte('}')
  553. }
  554. // MarshalJSON supports json.Marshaler interface
  555. func (v EnableParams) MarshalJSON() ([]byte, error) {
  556. w := jwriter.Writer{}
  557. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(&w, v)
  558. return w.Buffer.BuildBytes(), w.Error
  559. }
  560. // MarshalEasyJSON supports easyjson.Marshaler interface
  561. func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
  562. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(w, v)
  563. }
  564. // UnmarshalJSON supports json.Unmarshaler interface
  565. func (v *EnableParams) UnmarshalJSON(data []byte) error {
  566. r := jlexer.Lexer{Data: data}
  567. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(&r, v)
  568. return r.Error()
  569. }
  570. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  571. func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  572. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(l, v)
  573. }
  574. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(in *jlexer.Lexer, out *DisableParams) {
  575. isTopLevel := in.IsStart()
  576. if in.IsNull() {
  577. if isTopLevel {
  578. in.Consumed()
  579. }
  580. in.Skip()
  581. return
  582. }
  583. in.Delim('{')
  584. for !in.IsDelim('}') {
  585. key := in.UnsafeFieldName(false)
  586. in.WantColon()
  587. if in.IsNull() {
  588. in.Skip()
  589. in.WantComma()
  590. continue
  591. }
  592. switch key {
  593. default:
  594. in.SkipRecursive()
  595. }
  596. in.WantComma()
  597. }
  598. in.Delim('}')
  599. if isTopLevel {
  600. in.Consumed()
  601. }
  602. }
  603. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(out *jwriter.Writer, in DisableParams) {
  604. out.RawByte('{')
  605. first := true
  606. _ = first
  607. out.RawByte('}')
  608. }
  609. // MarshalJSON supports json.Marshaler interface
  610. func (v DisableParams) MarshalJSON() ([]byte, error) {
  611. w := jwriter.Writer{}
  612. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(&w, v)
  613. return w.Buffer.BuildBytes(), w.Error
  614. }
  615. // MarshalEasyJSON supports easyjson.Marshaler interface
  616. func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
  617. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(w, v)
  618. }
  619. // UnmarshalJSON supports json.Unmarshaler interface
  620. func (v *DisableParams) UnmarshalJSON(data []byte) error {
  621. r := jlexer.Lexer{Data: data}
  622. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(&r, v)
  623. return r.Error()
  624. }
  625. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  626. func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
  627. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(l, v)
  628. }
  629. func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(in *jlexer.Lexer, out *CertificateSecurityState) {
  630. isTopLevel := in.IsStart()
  631. if in.IsNull() {
  632. if isTopLevel {
  633. in.Consumed()
  634. }
  635. in.Skip()
  636. return
  637. }
  638. in.Delim('{')
  639. for !in.IsDelim('}') {
  640. key := in.UnsafeFieldName(false)
  641. in.WantColon()
  642. if in.IsNull() {
  643. in.Skip()
  644. in.WantComma()
  645. continue
  646. }
  647. switch key {
  648. case "protocol":
  649. out.Protocol = string(in.String())
  650. case "keyExchange":
  651. out.KeyExchange = string(in.String())
  652. case "keyExchangeGroup":
  653. out.KeyExchangeGroup = string(in.String())
  654. case "cipher":
  655. out.Cipher = string(in.String())
  656. case "mac":
  657. out.Mac = string(in.String())
  658. case "certificate":
  659. if in.IsNull() {
  660. in.Skip()
  661. out.Certificate = nil
  662. } else {
  663. in.Delim('[')
  664. if out.Certificate == nil {
  665. if !in.IsDelim(']') {
  666. out.Certificate = make([]string, 0, 4)
  667. } else {
  668. out.Certificate = []string{}
  669. }
  670. } else {
  671. out.Certificate = (out.Certificate)[:0]
  672. }
  673. for !in.IsDelim(']') {
  674. var v10 string
  675. v10 = string(in.String())
  676. out.Certificate = append(out.Certificate, v10)
  677. in.WantComma()
  678. }
  679. in.Delim(']')
  680. }
  681. case "subjectName":
  682. out.SubjectName = string(in.String())
  683. case "issuer":
  684. out.Issuer = string(in.String())
  685. case "validFrom":
  686. if in.IsNull() {
  687. in.Skip()
  688. out.ValidFrom = nil
  689. } else {
  690. if out.ValidFrom == nil {
  691. out.ValidFrom = new(cdp.TimeSinceEpoch)
  692. }
  693. (*out.ValidFrom).UnmarshalEasyJSON(in)
  694. }
  695. case "validTo":
  696. if in.IsNull() {
  697. in.Skip()
  698. out.ValidTo = nil
  699. } else {
  700. if out.ValidTo == nil {
  701. out.ValidTo = new(cdp.TimeSinceEpoch)
  702. }
  703. (*out.ValidTo).UnmarshalEasyJSON(in)
  704. }
  705. case "certificateNetworkError":
  706. out.CertificateNetworkError = string(in.String())
  707. case "certificateHasWeakSignature":
  708. out.CertificateHasWeakSignature = bool(in.Bool())
  709. case "certificateHasSha1Signature":
  710. out.CertificateHasSha1signature = bool(in.Bool())
  711. case "modernSSL":
  712. out.ModernSSL = bool(in.Bool())
  713. case "obsoleteSslProtocol":
  714. out.ObsoleteSslProtocol = bool(in.Bool())
  715. case "obsoleteSslKeyExchange":
  716. out.ObsoleteSslKeyExchange = bool(in.Bool())
  717. case "obsoleteSslCipher":
  718. out.ObsoleteSslCipher = bool(in.Bool())
  719. case "obsoleteSslSignature":
  720. out.ObsoleteSslSignature = bool(in.Bool())
  721. default:
  722. in.SkipRecursive()
  723. }
  724. in.WantComma()
  725. }
  726. in.Delim('}')
  727. if isTopLevel {
  728. in.Consumed()
  729. }
  730. }
  731. func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(out *jwriter.Writer, in CertificateSecurityState) {
  732. out.RawByte('{')
  733. first := true
  734. _ = first
  735. {
  736. const prefix string = ",\"protocol\":"
  737. out.RawString(prefix[1:])
  738. out.String(string(in.Protocol))
  739. }
  740. {
  741. const prefix string = ",\"keyExchange\":"
  742. out.RawString(prefix)
  743. out.String(string(in.KeyExchange))
  744. }
  745. if in.KeyExchangeGroup != "" {
  746. const prefix string = ",\"keyExchangeGroup\":"
  747. out.RawString(prefix)
  748. out.String(string(in.KeyExchangeGroup))
  749. }
  750. {
  751. const prefix string = ",\"cipher\":"
  752. out.RawString(prefix)
  753. out.String(string(in.Cipher))
  754. }
  755. if in.Mac != "" {
  756. const prefix string = ",\"mac\":"
  757. out.RawString(prefix)
  758. out.String(string(in.Mac))
  759. }
  760. {
  761. const prefix string = ",\"certificate\":"
  762. out.RawString(prefix)
  763. if in.Certificate == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
  764. out.RawString("null")
  765. } else {
  766. out.RawByte('[')
  767. for v11, v12 := range in.Certificate {
  768. if v11 > 0 {
  769. out.RawByte(',')
  770. }
  771. out.String(string(v12))
  772. }
  773. out.RawByte(']')
  774. }
  775. }
  776. {
  777. const prefix string = ",\"subjectName\":"
  778. out.RawString(prefix)
  779. out.String(string(in.SubjectName))
  780. }
  781. {
  782. const prefix string = ",\"issuer\":"
  783. out.RawString(prefix)
  784. out.String(string(in.Issuer))
  785. }
  786. {
  787. const prefix string = ",\"validFrom\":"
  788. out.RawString(prefix)
  789. if in.ValidFrom == nil {
  790. out.RawString("null")
  791. } else {
  792. (*in.ValidFrom).MarshalEasyJSON(out)
  793. }
  794. }
  795. {
  796. const prefix string = ",\"validTo\":"
  797. out.RawString(prefix)
  798. if in.ValidTo == nil {
  799. out.RawString("null")
  800. } else {
  801. (*in.ValidTo).MarshalEasyJSON(out)
  802. }
  803. }
  804. if in.CertificateNetworkError != "" {
  805. const prefix string = ",\"certificateNetworkError\":"
  806. out.RawString(prefix)
  807. out.String(string(in.CertificateNetworkError))
  808. }
  809. {
  810. const prefix string = ",\"certificateHasWeakSignature\":"
  811. out.RawString(prefix)
  812. out.Bool(bool(in.CertificateHasWeakSignature))
  813. }
  814. {
  815. const prefix string = ",\"certificateHasSha1Signature\":"
  816. out.RawString(prefix)
  817. out.Bool(bool(in.CertificateHasSha1signature))
  818. }
  819. {
  820. const prefix string = ",\"modernSSL\":"
  821. out.RawString(prefix)
  822. out.Bool(bool(in.ModernSSL))
  823. }
  824. {
  825. const prefix string = ",\"obsoleteSslProtocol\":"
  826. out.RawString(prefix)
  827. out.Bool(bool(in.ObsoleteSslProtocol))
  828. }
  829. {
  830. const prefix string = ",\"obsoleteSslKeyExchange\":"
  831. out.RawString(prefix)
  832. out.Bool(bool(in.ObsoleteSslKeyExchange))
  833. }
  834. {
  835. const prefix string = ",\"obsoleteSslCipher\":"
  836. out.RawString(prefix)
  837. out.Bool(bool(in.ObsoleteSslCipher))
  838. }
  839. {
  840. const prefix string = ",\"obsoleteSslSignature\":"
  841. out.RawString(prefix)
  842. out.Bool(bool(in.ObsoleteSslSignature))
  843. }
  844. out.RawByte('}')
  845. }
  846. // MarshalJSON supports json.Marshaler interface
  847. func (v CertificateSecurityState) MarshalJSON() ([]byte, error) {
  848. w := jwriter.Writer{}
  849. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(&w, v)
  850. return w.Buffer.BuildBytes(), w.Error
  851. }
  852. // MarshalEasyJSON supports easyjson.Marshaler interface
  853. func (v CertificateSecurityState) MarshalEasyJSON(w *jwriter.Writer) {
  854. easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(w, v)
  855. }
  856. // UnmarshalJSON supports json.Unmarshaler interface
  857. func (v *CertificateSecurityState) UnmarshalJSON(data []byte) error {
  858. r := jlexer.Lexer{Data: data}
  859. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(&r, v)
  860. return r.Error()
  861. }
  862. // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
  863. func (v *CertificateSecurityState) UnmarshalEasyJSON(l *jlexer.Lexer) {
  864. easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(l, v)
  865. }