1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186 |
- // Code generated by easyjson for marshaling/unmarshaling. DO NOT EDIT.
- package preload
- import (
- json "encoding/json"
- cdp "github.com/chromedp/cdproto/cdp"
- network "github.com/chromedp/cdproto/network"
- 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 easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload(in *jlexer.Lexer, out *RuleSet) {
- 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 "id":
- out.ID = RuleSetID(in.String())
- case "loaderId":
- out.LoaderID = cdp.LoaderID(in.String())
- case "sourceText":
- out.SourceText = string(in.String())
- case "backendNodeId":
- (out.BackendNodeID).UnmarshalEasyJSON(in)
- case "url":
- out.URL = string(in.String())
- case "requestId":
- out.RequestID = network.RequestID(in.String())
- case "errorType":
- (out.ErrorType).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload(out *jwriter.Writer, in RuleSet) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.String(string(in.ID))
- }
- {
- const prefix string = ",\"loaderId\":"
- out.RawString(prefix)
- out.String(string(in.LoaderID))
- }
- {
- const prefix string = ",\"sourceText\":"
- out.RawString(prefix)
- out.String(string(in.SourceText))
- }
- if in.BackendNodeID != 0 {
- const prefix string = ",\"backendNodeId\":"
- out.RawString(prefix)
- out.Int64(int64(in.BackendNodeID))
- }
- if in.URL != "" {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- if in.RequestID != "" {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix)
- out.String(string(in.RequestID))
- }
- if in.ErrorType != "" {
- const prefix string = ",\"errorType\":"
- out.RawString(prefix)
- (in.ErrorType).MarshalEasyJSON(out)
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v RuleSet) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v RuleSet) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *RuleSet) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *RuleSet) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload1(in *jlexer.Lexer, out *PrerenderMismatchedHeaders) {
- 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 "headerName":
- out.HeaderName = string(in.String())
- case "initialValue":
- out.InitialValue = string(in.String())
- case "activationValue":
- out.ActivationValue = string(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload1(out *jwriter.Writer, in PrerenderMismatchedHeaders) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"headerName\":"
- out.RawString(prefix[1:])
- out.String(string(in.HeaderName))
- }
- if in.InitialValue != "" {
- const prefix string = ",\"initialValue\":"
- out.RawString(prefix)
- out.String(string(in.InitialValue))
- }
- if in.ActivationValue != "" {
- const prefix string = ",\"activationValue\":"
- out.RawString(prefix)
- out.String(string(in.ActivationValue))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v PrerenderMismatchedHeaders) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload1(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v PrerenderMismatchedHeaders) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload1(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *PrerenderMismatchedHeaders) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload1(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *PrerenderMismatchedHeaders) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload1(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload2(in *jlexer.Lexer, out *IngAttemptSource) {
- 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 "key":
- if in.IsNull() {
- in.Skip()
- out.Key = nil
- } else {
- if out.Key == nil {
- out.Key = new(IngAttemptKey)
- }
- (*out.Key).UnmarshalEasyJSON(in)
- }
- case "ruleSetIds":
- if in.IsNull() {
- in.Skip()
- out.RuleSetIDs = nil
- } else {
- in.Delim('[')
- if out.RuleSetIDs == nil {
- if !in.IsDelim(']') {
- out.RuleSetIDs = make([]RuleSetID, 0, 4)
- } else {
- out.RuleSetIDs = []RuleSetID{}
- }
- } else {
- out.RuleSetIDs = (out.RuleSetIDs)[:0]
- }
- for !in.IsDelim(']') {
- var v1 RuleSetID
- v1 = RuleSetID(in.String())
- out.RuleSetIDs = append(out.RuleSetIDs, v1)
- in.WantComma()
- }
- in.Delim(']')
- }
- case "nodeIds":
- if in.IsNull() {
- in.Skip()
- out.NodeIDs = nil
- } else {
- in.Delim('[')
- if out.NodeIDs == nil {
- if !in.IsDelim(']') {
- out.NodeIDs = make([]cdp.BackendNodeID, 0, 8)
- } else {
- out.NodeIDs = []cdp.BackendNodeID{}
- }
- } else {
- out.NodeIDs = (out.NodeIDs)[:0]
- }
- for !in.IsDelim(']') {
- var v2 cdp.BackendNodeID
- (v2).UnmarshalEasyJSON(in)
- out.NodeIDs = append(out.NodeIDs, v2)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload2(out *jwriter.Writer, in IngAttemptSource) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"key\":"
- out.RawString(prefix[1:])
- if in.Key == nil {
- out.RawString("null")
- } else {
- (*in.Key).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"ruleSetIds\":"
- out.RawString(prefix)
- if in.RuleSetIDs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v3, v4 := range in.RuleSetIDs {
- if v3 > 0 {
- out.RawByte(',')
- }
- out.String(string(v4))
- }
- out.RawByte(']')
- }
- }
- {
- const prefix string = ",\"nodeIds\":"
- out.RawString(prefix)
- if in.NodeIDs == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v5, v6 := range in.NodeIDs {
- if v5 > 0 {
- out.RawByte(',')
- }
- out.Int64(int64(v6))
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v IngAttemptSource) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload2(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v IngAttemptSource) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload2(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *IngAttemptSource) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload2(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *IngAttemptSource) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload2(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload3(in *jlexer.Lexer, out *IngAttemptKey) {
- 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 "loaderId":
- out.LoaderID = cdp.LoaderID(in.String())
- case "action":
- (out.Action).UnmarshalEasyJSON(in)
- case "url":
- out.URL = string(in.String())
- case "targetHint":
- (out.TargetHint).UnmarshalEasyJSON(in)
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload3(out *jwriter.Writer, in IngAttemptKey) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"loaderId\":"
- out.RawString(prefix[1:])
- out.String(string(in.LoaderID))
- }
- {
- const prefix string = ",\"action\":"
- out.RawString(prefix)
- (in.Action).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"url\":"
- out.RawString(prefix)
- out.String(string(in.URL))
- }
- if in.TargetHint != "" {
- const prefix string = ",\"targetHint\":"
- out.RawString(prefix)
- (in.TargetHint).MarshalEasyJSON(out)
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v IngAttemptKey) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload3(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v IngAttemptKey) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload3(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *IngAttemptKey) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload3(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *IngAttemptKey) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload3(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload4(in *jlexer.Lexer, out *EventRuleSetUpdated) {
- 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 "ruleSet":
- if in.IsNull() {
- in.Skip()
- out.RuleSet = nil
- } else {
- if out.RuleSet == nil {
- out.RuleSet = new(RuleSet)
- }
- (*out.RuleSet).UnmarshalEasyJSON(in)
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload4(out *jwriter.Writer, in EventRuleSetUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"ruleSet\":"
- out.RawString(prefix[1:])
- if in.RuleSet == nil {
- out.RawString("null")
- } else {
- (*in.RuleSet).MarshalEasyJSON(out)
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EventRuleSetUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload4(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EventRuleSetUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload4(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EventRuleSetUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload4(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EventRuleSetUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload4(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload5(in *jlexer.Lexer, out *EventRuleSetRemoved) {
- 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 "id":
- out.ID = RuleSetID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload5(out *jwriter.Writer, in EventRuleSetRemoved) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"id\":"
- out.RawString(prefix[1:])
- out.String(string(in.ID))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EventRuleSetRemoved) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload5(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EventRuleSetRemoved) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload5(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EventRuleSetRemoved) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload5(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EventRuleSetRemoved) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload5(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload6(in *jlexer.Lexer, out *EventPrerenderStatusUpdated) {
- 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 "key":
- if in.IsNull() {
- in.Skip()
- out.Key = nil
- } else {
- if out.Key == nil {
- out.Key = new(IngAttemptKey)
- }
- (*out.Key).UnmarshalEasyJSON(in)
- }
- case "status":
- (out.Status).UnmarshalEasyJSON(in)
- case "prerenderStatus":
- (out.PrerenderStatus).UnmarshalEasyJSON(in)
- case "disallowedMojoInterface":
- out.DisallowedMojoInterface = string(in.String())
- case "mismatchedHeaders":
- if in.IsNull() {
- in.Skip()
- out.MismatchedHeaders = nil
- } else {
- in.Delim('[')
- if out.MismatchedHeaders == nil {
- if !in.IsDelim(']') {
- out.MismatchedHeaders = make([]*PrerenderMismatchedHeaders, 0, 8)
- } else {
- out.MismatchedHeaders = []*PrerenderMismatchedHeaders{}
- }
- } else {
- out.MismatchedHeaders = (out.MismatchedHeaders)[:0]
- }
- for !in.IsDelim(']') {
- var v7 *PrerenderMismatchedHeaders
- if in.IsNull() {
- in.Skip()
- v7 = nil
- } else {
- if v7 == nil {
- v7 = new(PrerenderMismatchedHeaders)
- }
- (*v7).UnmarshalEasyJSON(in)
- }
- out.MismatchedHeaders = append(out.MismatchedHeaders, v7)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload6(out *jwriter.Writer, in EventPrerenderStatusUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"key\":"
- out.RawString(prefix[1:])
- if in.Key == nil {
- out.RawString("null")
- } else {
- (*in.Key).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"status\":"
- out.RawString(prefix)
- (in.Status).MarshalEasyJSON(out)
- }
- if in.PrerenderStatus != "" {
- const prefix string = ",\"prerenderStatus\":"
- out.RawString(prefix)
- (in.PrerenderStatus).MarshalEasyJSON(out)
- }
- if in.DisallowedMojoInterface != "" {
- const prefix string = ",\"disallowedMojoInterface\":"
- out.RawString(prefix)
- out.String(string(in.DisallowedMojoInterface))
- }
- if len(in.MismatchedHeaders) != 0 {
- const prefix string = ",\"mismatchedHeaders\":"
- out.RawString(prefix)
- {
- out.RawByte('[')
- for v8, v9 := range in.MismatchedHeaders {
- if v8 > 0 {
- out.RawByte(',')
- }
- if v9 == nil {
- out.RawString("null")
- } else {
- (*v9).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EventPrerenderStatusUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload6(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EventPrerenderStatusUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload6(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EventPrerenderStatusUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload6(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EventPrerenderStatusUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload6(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload7(in *jlexer.Lexer, out *EventPreloadingAttemptSourcesUpdated) {
- 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 "loaderId":
- out.LoaderID = cdp.LoaderID(in.String())
- case "preloadingAttemptSources":
- if in.IsNull() {
- in.Skip()
- out.PreloadingAttemptSources = nil
- } else {
- in.Delim('[')
- if out.PreloadingAttemptSources == nil {
- if !in.IsDelim(']') {
- out.PreloadingAttemptSources = make([]*IngAttemptSource, 0, 8)
- } else {
- out.PreloadingAttemptSources = []*IngAttemptSource{}
- }
- } else {
- out.PreloadingAttemptSources = (out.PreloadingAttemptSources)[:0]
- }
- for !in.IsDelim(']') {
- var v10 *IngAttemptSource
- if in.IsNull() {
- in.Skip()
- v10 = nil
- } else {
- if v10 == nil {
- v10 = new(IngAttemptSource)
- }
- (*v10).UnmarshalEasyJSON(in)
- }
- out.PreloadingAttemptSources = append(out.PreloadingAttemptSources, v10)
- in.WantComma()
- }
- in.Delim(']')
- }
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload7(out *jwriter.Writer, in EventPreloadingAttemptSourcesUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"loaderId\":"
- out.RawString(prefix[1:])
- out.String(string(in.LoaderID))
- }
- {
- const prefix string = ",\"preloadingAttemptSources\":"
- out.RawString(prefix)
- if in.PreloadingAttemptSources == nil && (out.Flags&jwriter.NilSliceAsEmpty) == 0 {
- out.RawString("null")
- } else {
- out.RawByte('[')
- for v11, v12 := range in.PreloadingAttemptSources {
- if v11 > 0 {
- out.RawByte(',')
- }
- if v12 == nil {
- out.RawString("null")
- } else {
- (*v12).MarshalEasyJSON(out)
- }
- }
- out.RawByte(']')
- }
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EventPreloadingAttemptSourcesUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload7(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EventPreloadingAttemptSourcesUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload7(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EventPreloadingAttemptSourcesUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload7(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EventPreloadingAttemptSourcesUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload7(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload8(in *jlexer.Lexer, out *EventPreloadEnabledStateUpdated) {
- 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 "disabledByPreference":
- out.DisabledByPreference = bool(in.Bool())
- case "disabledByDataSaver":
- out.DisabledByDataSaver = bool(in.Bool())
- case "disabledByBatterySaver":
- out.DisabledByBatterySaver = bool(in.Bool())
- case "disabledByHoldbackPrefetchSpeculationRules":
- out.DisabledByHoldbackPrefetchSpeculationRules = bool(in.Bool())
- case "disabledByHoldbackPrerenderSpeculationRules":
- out.DisabledByHoldbackPrerenderSpeculationRules = bool(in.Bool())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload8(out *jwriter.Writer, in EventPreloadEnabledStateUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"disabledByPreference\":"
- out.RawString(prefix[1:])
- out.Bool(bool(in.DisabledByPreference))
- }
- {
- const prefix string = ",\"disabledByDataSaver\":"
- out.RawString(prefix)
- out.Bool(bool(in.DisabledByDataSaver))
- }
- {
- const prefix string = ",\"disabledByBatterySaver\":"
- out.RawString(prefix)
- out.Bool(bool(in.DisabledByBatterySaver))
- }
- {
- const prefix string = ",\"disabledByHoldbackPrefetchSpeculationRules\":"
- out.RawString(prefix)
- out.Bool(bool(in.DisabledByHoldbackPrefetchSpeculationRules))
- }
- {
- const prefix string = ",\"disabledByHoldbackPrerenderSpeculationRules\":"
- out.RawString(prefix)
- out.Bool(bool(in.DisabledByHoldbackPrerenderSpeculationRules))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EventPreloadEnabledStateUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload8(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EventPreloadEnabledStateUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload8(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EventPreloadEnabledStateUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload8(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EventPreloadEnabledStateUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload8(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload9(in *jlexer.Lexer, out *EventPrefetchStatusUpdated) {
- 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 "key":
- if in.IsNull() {
- in.Skip()
- out.Key = nil
- } else {
- if out.Key == nil {
- out.Key = new(IngAttemptKey)
- }
- (*out.Key).UnmarshalEasyJSON(in)
- }
- case "initiatingFrameId":
- (out.InitiatingFrameID).UnmarshalEasyJSON(in)
- case "prefetchUrl":
- out.PrefetchURL = string(in.String())
- case "status":
- (out.Status).UnmarshalEasyJSON(in)
- case "prefetchStatus":
- (out.PrefetchStatus).UnmarshalEasyJSON(in)
- case "requestId":
- out.RequestID = network.RequestID(in.String())
- default:
- in.SkipRecursive()
- }
- in.WantComma()
- }
- in.Delim('}')
- if isTopLevel {
- in.Consumed()
- }
- }
- func easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload9(out *jwriter.Writer, in EventPrefetchStatusUpdated) {
- out.RawByte('{')
- first := true
- _ = first
- {
- const prefix string = ",\"key\":"
- out.RawString(prefix[1:])
- if in.Key == nil {
- out.RawString("null")
- } else {
- (*in.Key).MarshalEasyJSON(out)
- }
- }
- {
- const prefix string = ",\"initiatingFrameId\":"
- out.RawString(prefix)
- out.String(string(in.InitiatingFrameID))
- }
- {
- const prefix string = ",\"prefetchUrl\":"
- out.RawString(prefix)
- out.String(string(in.PrefetchURL))
- }
- {
- const prefix string = ",\"status\":"
- out.RawString(prefix)
- (in.Status).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"prefetchStatus\":"
- out.RawString(prefix)
- (in.PrefetchStatus).MarshalEasyJSON(out)
- }
- {
- const prefix string = ",\"requestId\":"
- out.RawString(prefix)
- out.String(string(in.RequestID))
- }
- out.RawByte('}')
- }
- // MarshalJSON supports json.Marshaler interface
- func (v EventPrefetchStatusUpdated) MarshalJSON() ([]byte, error) {
- w := jwriter.Writer{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload9(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EventPrefetchStatusUpdated) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload9(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EventPrefetchStatusUpdated) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload9(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EventPrefetchStatusUpdated) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload9(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload10(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 easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload10(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{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload10(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v EnableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload10(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *EnableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload10(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *EnableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload10(l, v)
- }
- func easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload11(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 easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload11(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{}
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload11(&w, v)
- return w.Buffer.BuildBytes(), w.Error
- }
- // MarshalEasyJSON supports easyjson.Marshaler interface
- func (v DisableParams) MarshalEasyJSON(w *jwriter.Writer) {
- easyjsonC5a4559bEncodeGithubComChromedpCdprotoPreload11(w, v)
- }
- // UnmarshalJSON supports json.Unmarshaler interface
- func (v *DisableParams) UnmarshalJSON(data []byte) error {
- r := jlexer.Lexer{Data: data}
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload11(&r, v)
- return r.Error()
- }
- // UnmarshalEasyJSON supports easyjson.Unmarshaler interface
- func (v *DisableParams) UnmarshalEasyJSON(l *jlexer.Lexer) {
- easyjsonC5a4559bDecodeGithubComChromedpCdprotoPreload11(l, v)
- }
|