123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901 |
- // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
- package security
- import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- easyjson "github.com/mailru/easyjson"
- jlexer "github.com/mailru/easyjson/jlexer"
- jwriter "github.com/mailru/easyjson/jwriter"
- )
- // suppress unused package warning
- var (
- _ *json.RawMessage
- _ *jlexer.Lexer
- _ *jwriter.Writer
- _ easyjson.Marshaler
- )
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity(in *jlexer.Lexer, out *VisibleSecurityState) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityState":
- (out.SecurityState).UnmarshalEasyJSON(in)
- case "certificateSecurityState":
- if in.IsNull() {
- in.Skip()
- out.CertificateSecurityState = nil
- } else {
- if out.CertificateSecurityState == nil {
- out.CertificateSecurityState = new(CertificateSecurityState)
- }
- (*out.CertificateSecurityState).UnmarshalEasyJSON(in)
- }
- case "safetyTipInfo":
- if in.IsNull() {
- in.Skip()
- out.SafetyTipInfo = nil
- } else {
- if out.SafetyTipInfo == nil {
- out.SafetyTipInfo = new(SafetyTipInfo)
- }
- (*out.SafetyTipInfo).UnmarshalEasyJSON(in)
- }
- case "securityStateIssueIds":
- if in.IsNull() {
- in.Skip()
- out.SecurityStateIssueIDs = nil
- } else {
- in.Delim('[')
- if out.SecurityStateIssueIDs == nil {
- if !in.IsDelim(']') {
- out.SecurityStateIssueIDs = make([]string, 0, 4)
- } else {
- out.SecurityStateIssueIDs = []string{}
- }
- } else {
- out.SecurityStateIssueIDs = (out.SecurityStateIssueIDs)[:0]
- }
- for !in.IsDelim(']') {
- var v1 string
- v1 = string(in.String())
- out.SecurityStateIssueIDs = append(out.SecurityStateIssueIDs, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity(out *jwriter.Writer, in VisibleSecurityState) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"securityState\":"
- out.RawString(prefix[1:])
- (in.SecurityState).MarshalEasyJSON(out)
- }
- if in.CertificateSecurityState != nil {
- const prefix string = ",\"certificateSecurityState\":"
- out.RawString(prefix)
- (*in.CertificateSecurityState).MarshalEasyJSON(out)
- }
- if in.SafetyTipInfo != nil {
- const prefix string = ",\"safetyTipInfo\":"
- out.RawString(prefix)
- (*in.SafetyTipInfo).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"securityStateIssueIds\":"
- out.RawString(prefix)
- if in.SecurityStateIssueIDs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v2, v3 := range in.SecurityStateIssueIDs {
- if v2 > 0 {
- out.RawByte(',')
- }
- out.String(string(v3))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v VisibleSecurityState) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v VisibleSecurityState) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *VisibleSecurityState) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *VisibleSecurityState) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity1(in *jlexer.Lexer, out *StateExplanation) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "securityState":
- (out.SecurityState).UnmarshalEasyJSON(in)
- case "title":
- out.Title = string(in.String())
- case "summary":
- out.Summary = string(in.String())
- case "description":
- out.Description = string(in.String())
- case "mixedContentType":
- (out.MixedContentType).UnmarshalEasyJSON(in)
- case "certificate":
- if in.IsNull() {
- in.Skip()
- out.Certificate = nil
- } else {
- in.Delim('[')
- if out.Certificate == nil {
- if !in.IsDelim(']') {
- out.Certificate = make([]string, 0, 4)
- } else {
- out.Certificate = []string{}
- }
- } else {
- out.Certificate = (out.Certificate)[:0]
- }
- for !in.IsDelim(']') {
- var v4 string
- v4 = string(in.String())
- out.Certificate = append(out.Certificate, v4)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "recommendations":
- if in.IsNull() {
- in.Skip()
- out.Recommendations = nil
- } else {
- in.Delim('[')
- if out.Recommendations == nil {
- if !in.IsDelim(']') {
- out.Recommendations = make([]string, 0, 4)
- } else {
- out.Recommendations = []string{}
- }
- } else {
- out.Recommendations = (out.Recommendations)[:0]
- }
- for !in.IsDelim(']') {
- var v5 string
- v5 = string(in.String())
- out.Recommendations = append(out.Recommendations, v5)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity1(out *jwriter.Writer, in StateExplanation) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"securityState\":"
- out.RawString(prefix[1:])
- (in.SecurityState).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"title\":"
- out.RawString(prefix)
- out.String(string(in.Title))
- }
- {
- const prefix string = ",\"summary\":"
- out.RawString(prefix)
- out.String(string(in.Summary))
- }
- {
- const prefix string = ",\"description\":"
- out.RawString(prefix)
- out.String(string(in.Description))
- }
- {
- const prefix string = ",\"mixedContentType\":"
- out.RawString(prefix)
- (in.MixedContentType).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"certificate\":"
- out.RawString(prefix)
- if in.Certificate == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v6, v7 := range in.Certificate {
- if v6 > 0 {
- out.RawByte(',')
- }
- out.String(string(v7))
- }
- out.RawByte(']')
- }
- }
- if len(in.Recommendations) != 0 {
- const prefix string = ",\"recommendations\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v8, v9 := range in.Recommendations {
- if v8 > 0 {
- out.RawByte(',')
- }
- out.String(string(v9))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v StateExplanation) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v StateExplanation) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity1(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *StateExplanation) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity1(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *StateExplanation) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity1(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity2(in *jlexer.Lexer, out *SetIgnoreCertificateErrorsParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "ignore":
- out.Ignore = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity2(out *jwriter.Writer, in SetIgnoreCertificateErrorsParams) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"ignore\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.Ignore))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v SetIgnoreCertificateErrorsParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v SetIgnoreCertificateErrorsParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity2(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *SetIgnoreCertificateErrorsParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity2(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *SetIgnoreCertificateErrorsParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity2(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity3(in *jlexer.Lexer, out *SafetyTipInfo) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "safetyTipStatus":
- (out.SafetyTipStatus).UnmarshalEasyJSON(in)
- case "safeUrl":
- out.SafeURL = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity3(out *jwriter.Writer, in SafetyTipInfo) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"safetyTipStatus\":"
- out.RawString(prefix[1:])
- (in.SafetyTipStatus).MarshalEasyJSON(out)
- }
- if in.SafeURL != "" {
- const prefix string = ",\"safeUrl\":"
- out.RawString(prefix)
- out.String(string(in.SafeURL))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v SafetyTipInfo) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v SafetyTipInfo) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity3(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *SafetyTipInfo) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity3(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *SafetyTipInfo) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity3(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity4(in *jlexer.Lexer, out *EventVisibleSecurityStateChanged) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "visibleSecurityState":
- if in.IsNull() {
- in.Skip()
- out.VisibleSecurityState = nil
- } else {
- if out.VisibleSecurityState == nil {
- out.VisibleSecurityState = new(VisibleSecurityState)
- }
- (*out.VisibleSecurityState).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity4(out *jwriter.Writer, in EventVisibleSecurityStateChanged) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"visibleSecurityState\":"
- out.RawString(prefix[1:])
- if in.VisibleSecurityState == nil {
- out.RawString("null")
- } else {
- (*in.VisibleSecurityState).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EventVisibleSecurityStateChanged) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EventVisibleSecurityStateChanged) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity4(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EventVisibleSecurityStateChanged) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity4(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EventVisibleSecurityStateChanged) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity4(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(in *jlexer.Lexer, out *EnableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(out *jwriter.Writer, in EnableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EnableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity5(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity5(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(in *jlexer.Lexer, out *DisableParams) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(out *jwriter.Writer, in DisableParams) {
- out.RawByte('{')
- first := true
- _ = first
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v DisableParams) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity6(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity6(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(in *jlexer.Lexer, out *CertificateSecurityState) {
- isTopLevel := in.IsStart()
- if in.IsNull() {
- if isTopLevel {
- in.Consumed()
- }
- in.Skip()
- return
- }
- in.Delim('{')
- for !in.IsDelim('}') {
- key := in.UnsafeFieldName(false)
- in.WantColon()
- if in.IsNull() {
- in.Skip()
- in.WantComma()
- continue
- }
- switch key {
- case "protocol":
- out.Protocol = string(in.String())
- case "keyExchange":
- out.KeyExchange = string(in.String())
- case "keyExchangeGroup":
- out.KeyExchangeGroup = string(in.String())
- case "cipher":
- out.Cipher = string(in.String())
- case "mac":
- out.Mac = string(in.String())
- case "certificate":
- if in.IsNull() {
- in.Skip()
- out.Certificate = nil
- } else {
- in.Delim('[')
- if out.Certificate == nil {
- if !in.IsDelim(']') {
- out.Certificate = make([]string, 0, 4)
- } else {
- out.Certificate = []string{}
- }
- } else {
- out.Certificate = (out.Certificate)[:0]
- }
- for !in.IsDelim(']') {
- var v10 string
- v10 = string(in.String())
- out.Certificate = append(out.Certificate, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "subjectName":
- out.SubjectName = string(in.String())
- case "issuer":
- out.Issuer = string(in.String())
- case "validFrom":
- if in.IsNull() {
- in.Skip()
- out.ValidFrom = nil
- } else {
- if out.ValidFrom == nil {
- out.ValidFrom = new(cdp.TimeSinceEpoch)
- }
- (*out.ValidFrom).UnmarshalEasyJSON(in)
- }
- case "validTo":
- if in.IsNull() {
- in.Skip()
- out.ValidTo = nil
- } else {
- if out.ValidTo == nil {
- out.ValidTo = new(cdp.TimeSinceEpoch)
- }
- (*out.ValidTo).UnmarshalEasyJSON(in)
- }
- case "certificateNetworkError":
- out.CertificateNetworkError = string(in.String())
- case "certificateHasWeakSignature":
- out.CertificateHasWeakSignature = bool(in.Bool())
- case "certificateHasSha1Signature":
- out.CertificateHasSha1signature = bool(in.Bool())
- case "modernSSL":
- out.ModernSSL = bool(in.Bool())
- case "obsoleteSslProtocol":
- out.ObsoleteSslProtocol = bool(in.Bool())
- case "obsoleteSslKeyExchange":
- out.ObsoleteSslKeyExchange = bool(in.Bool())
- case "obsoleteSslCipher":
- out.ObsoleteSslCipher = bool(in.Bool())
- case "obsoleteSslSignature":
- out.ObsoleteSslSignature = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(out *jwriter.Writer, in CertificateSecurityState) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"protocol\":"
- out.RawString(prefix[1:])
- out.String(string(in.Protocol))
- }
- {
- const prefix string = ",\"keyExchange\":"
- out.RawString(prefix)
- out.String(string(in.KeyExchange))
- }
- if in.KeyExchangeGroup != "" {
- const prefix string = ",\"keyExchangeGroup\":"
- out.RawString(prefix)
- out.String(string(in.KeyExchangeGroup))
- }
- {
- const prefix string = ",\"cipher\":"
- out.RawString(prefix)
- out.String(string(in.Cipher))
- }
- if in.Mac != "" {
- const prefix string = ",\"mac\":"
- out.RawString(prefix)
- out.String(string(in.Mac))
- }
- {
- const prefix string = ",\"certificate\":"
- out.RawString(prefix)
- if in.Certificate == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v11, v12 := range in.Certificate {
- if v11 > 0 {
- out.RawByte(',')
- }
- out.String(string(v12))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"subjectName\":"
- out.RawString(prefix)
- out.String(string(in.SubjectName))
- }
- {
- const prefix string = ",\"issuer\":"
- out.RawString(prefix)
- out.String(string(in.Issuer))
- }
- {
- const prefix string = ",\"validFrom\":"
- out.RawString(prefix)
- if in.ValidFrom == nil {
- out.RawString("null")
- } else {
- (*in.ValidFrom).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"validTo\":"
- out.RawString(prefix)
- if in.ValidTo == nil {
- out.RawString("null")
- } else {
- (*in.ValidTo).MarshalEasyJSON(out)
- }
- }
- if in.CertificateNetworkError != "" {
- const prefix string = ",\"certificateNetworkError\":"
- out.RawString(prefix)
- out.String(string(in.CertificateNetworkError))
- }
- {
- const prefix string = ",\"certificateHasWeakSignature\":"
- out.RawString(prefix)
- out.Bool(bool(in.CertificateHasWeakSignature))
- }
- {
- const prefix string = ",\"certificateHasSha1Signature\":"
- out.RawString(prefix)
- out.Bool(bool(in.CertificateHasSha1signature))
- }
- {
- const prefix string = ",\"modernSSL\":"
- out.RawString(prefix)
- out.Bool(bool(in.ModernSSL))
- }
- {
- const prefix string = ",\"obsoleteSslProtocol\":"
- out.RawString(prefix)
- out.Bool(bool(in.ObsoleteSslProtocol))
- }
- {
- const prefix string = ",\"obsoleteSslKeyExchange\":"
- out.RawString(prefix)
- out.Bool(bool(in.ObsoleteSslKeyExchange))
- }
- {
- const prefix string = ",\"obsoleteSslCipher\":"
- out.RawString(prefix)
- out.Bool(bool(in.ObsoleteSslCipher))
- }
- {
- const prefix string = ",\"obsoleteSslSignature\":"
- out.RawString(prefix)
- out.Bool(bool(in.ObsoleteSslSignature))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v CertificateSecurityState) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v CertificateSecurityState) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoSecurity7(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *CertificateSecurityState) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *CertificateSecurityState) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoSecurity7(l, v)
- }
|