easyjson.go 42 KB

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